Skip to content

Commit

Permalink
Fix items disappearing with full inventory
Browse files Browse the repository at this point in the history
  • Loading branch information
kyrptonaught committed Sep 28, 2019
1 parent 4c80585 commit 3b4e6fc
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ yarn_mappings=1.14.4+build.12
loader_version=0.6.1+build.165

# Mod Properties
mod_version=1.0.2
mod_version=1.0.3
maven_group = net.fabricmc
archives_base_name=diggusmaximus

Expand Down
7 changes: 2 additions & 5 deletions src/main/java/net/kyrptonaught/diggusmaximus/Excavate.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,14 @@
import net.minecraft.block.Block;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.stat.Stats;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.world.World;
import net.minecraft.world.timer.Timer;
import net.minecraft.world.timer.TimerCallback;

import java.util.ArrayDeque;
import java.util.Deque;
import java.util.Stack;

class Excavate {
private BlockPos startPos;
Expand Down Expand Up @@ -59,6 +55,7 @@ private void point(BlockPos pos) {
mine(pos);
}
}

private void mine(BlockPos pos) {
// world.getLevelProperties().getScheduledEvents().addEvent(pos.toString(), world.getTime()+ 40, (var1, var2, var3) -> System.out.println("yooo" + var3));
if (DiggusMaximusMod.getOptions().toolDuribility)
Expand Down Expand Up @@ -88,7 +85,7 @@ private boolean canMine(BlockPos pos) {
return mined < maxMined && isWithinDistance(pos) && toolHasDurability() && (player.isCreative() || player.isUsingEffectiveTool(player.world.getBlockState(pos)));
}

private double distance = Math.min(DiggusMaximusMod.getOptions().maxMineDistance + 1, 256);
private double distance = Math.min(DiggusMaximusMod.getOptions().maxMineDistance + 1, 16);

private boolean isWithinDistance(BlockPos pos) {
return pos.isWithinDistance(startPos, distance);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.registry.Registry;

import java.nio.charset.StandardCharsets;

public class StartExcavatePacket {
private static final Identifier START_EXCAVATE_PACKET = new Identifier(DiggusMaximusMod.MOD_ID, "start_excavate_packet");

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "diggusmaximus",
"version": "1.0.2",
"version": "1.0.3",
"name": "Diggus Maximus",
"description": "Mine ores more better!",
"authors": [
Expand Down

0 comments on commit 3b4e6fc

Please sign in to comment.