Skip to content

Commit c747f0d

Browse files
committed
Clean up force undos and remove particles for non-vanilla saplings.t
1 parent 5e27740 commit c747f0d

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

src/main/java/tterrag/treesimulator/TickHandlerTGS.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,13 @@ public void tickStart(EnumSet<TickType> type, Object... tickData)
6363

6464
BonemealEvent event = new BonemealEvent(player, player.worldObj, player.worldObj.getBlockId(pos[0], pos[1], pos[2]), pos[0], pos[1], pos[2]);
6565
MinecraftForge.EVENT_BUS.post(event);
66+
67+
BlockSapling sapling = (BlockSapling) Block.blocksList[player.worldObj.getBlockId(pos[0], pos[1], pos[2])];
6668

6769
if ((double)player.worldObj.rand.nextFloat() < 0.45D)
68-
((BlockSapling)Block.blocksList[player.worldObj.getBlockId(pos[0], pos[1], pos[2])]).markOrGrowMarked(player.worldObj, pos[0], pos[1], pos[2], player.worldObj.rand);
70+
sapling.markOrGrowMarked(player.worldObj, pos[0], pos[1], pos[2], player.worldObj.rand);
6971

70-
if (TreeSimulator.showParticles)
72+
if (TreeSimulator.showParticles && sapling.blockID == Block.sapling.blockID)
7173
sendPacket(pos[0], pos[1], pos[2], player.worldObj, basePlayer);
7274

7375
movementCounter = 0;

src/main/java/tterrag/treesimulator/TreeSimulator.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,7 @@ public void preInit(FMLPreInitializationEvent event)
3232
@EventHandler
3333
public void init(FMLInitializationEvent event)
3434
{
35-
<<<<<<< HEAD
36-
<<<<<<< HEAD
3735
TickRegistry.registerTickHandler(new TickHandlerTGS(), Side.SERVER);
38-
=======
39-
tickHandler = new TickHandlerTGS();
40-
TickRegistry.registerTickHandler(tickHandler, Side.SERVER);
41-
if (event.getSide() == Side.CLIENT && yellingWorks) {
42-
micListener = new MicListener();
43-
}
44-
>>>>>>> parent of 5194366... Merge pull request #2 from impiaaa/master
45-
=======
46-
TickRegistry.registerTickHandler(new TickHandlerTGS(), Side.SERVER);
47-
>>>>>>> parent of e5bfa06... Merge pull request #1 from impiaaa/master
4836
}
4937

5038
private void initConfig(File file)

0 commit comments

Comments
 (0)