Skip to content

Commit

Permalink
More backport fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
IzzelAliz committed Aug 29, 2020
1 parent 6fe9cd7 commit f38fc34
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public static void freezeNearby(LivingEntity living, World worldIn, BlockPos pos
BlockState blockstate2 = worldIn.getBlockState(blockpos);
boolean isFull = blockstate2.getBlock() == Blocks.WATER && blockstate2.get(FlowingFluidBlock.LEVEL) == 0; //TODO: Forge, modded waters?
if (blockstate2.getMaterial() == Material.WATER && isFull && blockstate.isValidPosition(worldIn, blockpos) && worldIn.func_226663_a_(blockstate, blockpos, ISelectionContext.dummy()) && !ForgeEventFactory.onBlockPlace(living, new BlockSnapshot(worldIn, blockpos, blockstate2), Direction.UP)) {
worldIn.setBlockState(blockpos, blockstate);
if (CraftEventFactory.handleBlockFormEvent(worldIn, blockpos, blockstate, living)) {
worldIn.getPendingBlockTicks().scheduleTick(blockpos, Blocks.FROSTED_ICE, MathHelper.nextInt(living.getRNG(), 60, 120));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public void func_225416_a(BlockPos blockPos, CPlayerDiggingPacket.Action action,
} else if (data.getBlock() instanceof TrapDoorBlock) {
this.player.connection.sendPacket(new SChangeBlockPacket(this.world, blockPos));
}
} else if (!iblockdata.isAir()) {
} else if (!iblockdata.isAir(world, blockPos)) {
if (forgeEvent.getUseBlock() != net.minecraftforge.eventbus.api.Event.Result.DENY) {
iblockdata.onBlockClicked(this.world, blockPos, this.player);
}
Expand All @@ -154,7 +154,7 @@ public void func_225416_a(BlockPos blockPos, CPlayerDiggingPacket.Action action,
if (blockEvent.getInstaBreak()) {
f = 2.0f;
}
if (!iblockdata.isAir() && f >= 1.0f) {
if (!iblockdata.isAir(world, blockPos) && f >= 1.0f) {
this.func_229860_a_(blockPos, action, "insta mine");
} else {
if (this.isDestroyingBlock) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ else if (!world.getDimension().canRespawnHere())
serverplayerentity.setPositionAndRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
serverplayerentity.connection.captureCurrentPosition();

this.setPlayerGameTypeBasedOnOther(serverplayerentity, playerIn, serverworld);
// this.setPlayerGameTypeBasedOnOther(serverplayerentity, playerIn, serverworld);

while (avoidSuffocation && !serverworld.hasNoCollisions(serverplayerentity) && serverplayerentity.posY < 256.0D) {
serverplayerentity.setPosition(serverplayerentity.posX, serverplayerentity.posY + 1.0D, serverplayerentity.posZ);
Expand Down Expand Up @@ -459,7 +459,6 @@ else if (!world.getDimension().canRespawnHere())
}

BasicEventHooks.firePlayerRespawnEvent(serverplayerentity, conqueredEnd);
System.out.println("pos " + serverplayerentity.getBedLocation());
return serverplayerentity;
}

Expand Down

0 comments on commit f38fc34

Please sign in to comment.