Skip to content

Commit

Permalink
Completely infested leaves now spread.
Browse files Browse the repository at this point in the history
  • Loading branch information
NovaMachina committed May 21, 2020
1 parent 496a27b commit 2348f42
Showing 1 changed file with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,12 +1,30 @@
package com.novamachina.exnihilosequentia.common.tileentity;

import com.novamachina.exnihilosequentia.common.block.InfestingLeavesBlock;
import com.novamachina.exnihilosequentia.common.setup.ModTiles;
import com.novamachina.exnihilosequentia.common.utility.LogUtil;
import net.minecraft.tileentity.ITickableTileEntity;
import net.minecraft.tileentity.TileEntity;

public class InfestedLeavesTile extends TileEntity {
public class InfestedLeavesTile extends TileEntity implements ITickableTileEntity {

public InfestedLeavesTile() {
super(ModTiles.INFESTED_LEAVES.get());
}

//TODO: Switch to config
private int progressWaitInterval = 30;

@Override
public void tick() {
if (!world.isRemote()) {
if (progressWaitInterval <= 0) {
LogUtil.info("Spreading");
InfestingLeavesBlock.spread(world, pos);
progressWaitInterval = 30;
} else {
progressWaitInterval--;
}
}
}
}

0 comments on commit 2348f42

Please sign in to comment.