|
10 | 10 | import com.google.common.collect.Lists; |
11 | 11 | import com.google.common.collect.Maps; |
12 | 12 | import com.google.common.util.concurrent.FutureCallback; |
13 | | -@@ -335,6 +339,9 @@ |
| 13 | +@@ -23,6 +27,7 @@ |
| 14 | + import javax.annotation.Nullable; |
| 15 | + import net.minecraft.advancements.Advancement; |
| 16 | + import net.minecraft.block.Block; |
| 17 | ++import net.minecraft.block.state.IBlockState; |
| 18 | + import net.minecraft.client.ClientBrandRetriever; |
| 19 | + import net.minecraft.client.GameSettings; |
| 20 | + import net.minecraft.client.Minecraft; |
| 21 | +@@ -117,6 +122,7 @@ |
| 22 | + import net.minecraft.entity.projectile.EntityTippedArrow; |
| 23 | + import net.minecraft.entity.projectile.EntityTrident; |
| 24 | + import net.minecraft.entity.projectile.EntityWitherSkull; |
| 25 | ++import net.minecraft.init.Blocks; |
| 26 | + import net.minecraft.init.Items; |
| 27 | + import net.minecraft.init.Particles; |
| 28 | + import net.minecraft.init.SoundEvents; |
| 29 | +@@ -242,18 +248,7 @@ |
| 30 | + import net.minecraft.tags.FluidTags; |
| 31 | + import net.minecraft.tags.ItemTags; |
| 32 | + import net.minecraft.tags.NetworkTagManager; |
| 33 | +-import net.minecraft.tileentity.TileEntity; |
| 34 | +-import net.minecraft.tileentity.TileEntityBanner; |
| 35 | +-import net.minecraft.tileentity.TileEntityBeacon; |
| 36 | +-import net.minecraft.tileentity.TileEntityBed; |
| 37 | +-import net.minecraft.tileentity.TileEntityCommandBlock; |
| 38 | +-import net.minecraft.tileentity.TileEntityConduit; |
| 39 | +-import net.minecraft.tileentity.TileEntityEndGateway; |
| 40 | +-import net.minecraft.tileentity.TileEntityMobSpawner; |
| 41 | +-import net.minecraft.tileentity.TileEntityShulkerBox; |
| 42 | +-import net.minecraft.tileentity.TileEntitySign; |
| 43 | +-import net.minecraft.tileentity.TileEntitySkull; |
| 44 | +-import net.minecraft.tileentity.TileEntityStructure; |
| 45 | ++import net.minecraft.tileentity.*; |
| 46 | + import net.minecraft.util.EnumFacing; |
| 47 | + import net.minecraft.util.EnumHand; |
| 48 | + import net.minecraft.util.ResourceLocation; |
| 49 | +@@ -335,6 +330,9 @@ |
14 | 50 | this.client.playerController.setGameType(packetIn.getGameType()); |
15 | 51 | this.client.gameSettings.sendSettingsToServer(); |
16 | 52 | this.netManager.sendPacket(new CPacketCustomPayload(CPacketCustomPayload.BRAND, (new PacketBuffer(Unpooled.buffer())).writeString(ClientBrandRetriever.getClientModName()))); |
|
20 | 56 | } |
21 | 57 |
|
22 | 58 | public void handleSpawnObject(SPacketSpawnObject packetIn) |
23 | | -@@ -798,6 +805,10 @@ |
| 59 | +@@ -797,7 +795,28 @@ |
| 60 | + { |
24 | 61 | tileentity.read(nbttagcompound); |
25 | 62 | } |
| 63 | ++ |
| 64 | ++ // Carpet smoothClientAnimations |
| 65 | ++ // fix as suggested by G4me4u |
| 66 | ++ if (CarpetSettings.smoothClientAnimations && tileentity == null) |
| 67 | ++ { |
| 68 | ++ if ("minecraft:piston".equals(nbttagcompound.getString("id"))) |
| 69 | ++ { |
| 70 | ++ IBlockState blockState = world.getBlockState(blockpos); |
| 71 | ++ if (blockState.getBlock() == Blocks.MOVING_PISTON) { |
| 72 | ++ nbttagcompound.putFloat("progress", Math.min(nbttagcompound.getFloat("progress") + 0.5F, 1.0F)); |
| 73 | ++ tileentity = new TileEntityPiston(); |
| 74 | ++ tileentity.read(nbttagcompound); |
| 75 | ++ this.world.setTileEntity(blockpos, tileentity); |
| 76 | ++ tileentity.updateContainingBlockInfo(); |
| 77 | ++ } |
| 78 | ++ } |
| 79 | ++ } |
26 | 80 | } |
27 | 81 | + |
28 | 82 | + // [TISCM] Newlight |
|
31 | 85 | } |
32 | 86 |
|
33 | 87 | public void processChunkUnload(SPacketUnloadChunk packetIn) |
34 | | -@@ -818,6 +829,9 @@ |
| 88 | +@@ -818,6 +837,9 @@ |
35 | 89 | public void handleDisconnect(SPacketDisconnect packetIn) |
36 | 90 | { |
37 | 91 | this.netManager.closeChannel(packetIn.getReason()); |
|
41 | 95 | } |
42 | 96 |
|
43 | 97 | public void onDisconnect(ITextComponent reason) |
44 | | -@@ -1954,6 +1968,14 @@ |
| 98 | +@@ -1954,6 +1976,14 @@ |
45 | 99 |
|
46 | 100 | public void handleCustomPayload(SPacketCustomPayload packetIn) |
47 | 101 | { |
|
0 commit comments