Fixed Slow Rift Regeneration and Various Improvements #173
@@ -441,7 +441,10 @@ public abstract class BaseDimDoor extends BlockDoor implements IDimDoor, ITileEn
|
||||
// We MUST call super.breakBlock() since it involves removing tile entities
|
||||
super.breakBlock(world, x, y, z, oldBlockID, oldMeta);
|
||||
|
||||
// Schedule rift regeneration for this block
|
||||
// Schedule rift regeneration for this block if it was replaced
|
||||
if (world.getBlockId(x, y, z) != oldBlockID)
|
||||
{
|
||||
mod_pocketDim.riftRegenerator.scheduleFastRegeneration(x, y, z, world);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -466,7 +466,10 @@ public class BlockRift extends Block implements ITileEntityProvider
|
||||
// We MUST call super.breakBlock() since it involves removing tile entities
|
||||
super.breakBlock(world, x, y, z, oldBlockID, oldMeta);
|
||||
|
||||
// Schedule rift regeneration for this block
|
||||
// Schedule rift regeneration for this block if it was changed
|
||||
if (world.getBlockId(x, y, z) != oldBlockID)
|
||||
{
|
||||
mod_pocketDim.riftRegenerator.scheduleSlowRegeneration(x, y, z, world);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -140,4 +140,18 @@ public class TransTrapdoor extends BlockTrapDoor implements IDimDoor, ITileEntit
|
||||
world.setBlockTileEntity(x, y, z, te);
|
||||
return te;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, int oldBlockID, int oldMeta)
|
||||
{
|
||||
// This function runs on the server side after a block is replaced
|
||||
// We MUST call super.breakBlock() since it involves removing tile entities
|
||||
super.breakBlock(world, x, y, z, oldBlockID, oldMeta);
|
||||
|
||||
// Schedule rift regeneration for this block if it was replaced
|
||||
if (world.getBlockId(x, y, z) != oldBlockID)
|
||||
{
|
||||
mod_pocketDim.riftRegenerator.scheduleFastRegeneration(x, y, z, world);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,8 @@
|
||||
package StevenDimDoors.mod_pocketDim.tileentities;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import StevenDimDoors.mod_pocketDim.mod_pocketDim;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class TileEntityTransTrapdoor extends DDTileEntityBase
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user