1.0.13
All checks were successful
RelicCraft/pipeline/head This commit looks good

Fix Bugs
This commit is contained in:
TheBrokenRail 2020-04-09 11:34:33 -04:00
parent cfa6e499ce
commit 221f6e2336
4 changed files with 16 additions and 11 deletions

View File

@ -1,5 +1,8 @@
# Changelog
**1.0.13**
* Fix Bugs
**1.0.12**
* Improve Balancing

View File

@ -10,7 +10,7 @@ org.gradle.jvmargs = -Xmx1G
fabric_loader_version = 0.7.10+build.191
# Mod Properties
mod_version = 1.0.12
mod_version = 1.0.13
maven_group = com.thebrokenrail
archives_base_name = reliccraft

View File

@ -46,14 +46,15 @@ public abstract class AbstractDragonEggHolderBlock extends Block implements Bloc
@Override
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) {
Inventory blockEntity = (Inventory) world.getBlockEntity(pos);
BlockEntity blockEntity = world.getBlockEntity(pos);
if (blockEntity != null) {
if (blockEntity instanceof Inventory) {
Inventory inventory = (Inventory) blockEntity;
ItemStack stack = player.getStackInHand(hand);
if (!stack.isEmpty()) {
if (blockEntity.isValidInvStack(0, stack) && blockEntity.getInvStack(0).isEmpty()) {
blockEntity.setInvStack(0, stack.split(1));
if (inventory.isValidInvStack(0, stack) && inventory.getInvStack(0).isEmpty()) {
inventory.setInvStack(0, stack.split(1));
if (!world.isClient()) {
grantAdvancement(player);
}
@ -62,16 +63,16 @@ public abstract class AbstractDragonEggHolderBlock extends Block implements Bloc
return ActionResult.PASS;
}
} else {
if (!blockEntity.getInvStack(0).isEmpty()) {
player.inventory.offerOrDrop(world, blockEntity.getInvStack(0));
blockEntity.removeInvStack(0);
if (!inventory.getInvStack(0).isEmpty()) {
player.inventory.offerOrDrop(world, inventory.getInvStack(0));
inventory.removeInvStack(0);
return ActionResult.SUCCESS;
} else {
return ActionResult.PASS;
}
}
} else {
return ActionResult.PASS;
return ActionResult.FAIL;
}
}

View File

@ -32,8 +32,9 @@ public class UpdateTimeDilationS2CPacket {
TimeDilaterItem.TimeSpeed speed = TimeDilaterItem.TimeSpeed.valueOf(buf.readString());
MinecraftClient client = MinecraftClient.getInstance();
assert client.world != null;
if (client.world != null) {
((TimeDilaterItem.DilatedWorld) client.world).setTimeSpeed(speed);
}
}
}