Made TileEntities update less often to reduce server traffic

This commit is contained in:
Ellpeck 2015-11-18 23:11:24 +01:00
parent 09bdfd98a0
commit d0b8bda5cc
33 changed files with 50 additions and 8 deletions

View file

@ -158,12 +158,7 @@ public enum ConfigIntValues{
MAGNET_RING_ENERGY_USE("Magnet Ring: Energy Used", ConfigCategories.MACHINE_VALUES, 5, 0, 500, "The Amount of Energy the Magnet Ring uses per tick"), MAGNET_RING_ENERGY_USE("Magnet Ring: Energy Used", ConfigCategories.MACHINE_VALUES, 5, 0, 500, "The Amount of Energy the Magnet Ring uses per tick"),
WATER_RING_RANGE("Water Ring: Range", ConfigCategories.MACHINE_VALUES, 3, 1, 10, "The Range of the Water Ring"), WATER_RING_RANGE("Water Ring: Range", ConfigCategories.MACHINE_VALUES, 3, 1, 10, "The Range of the Water Ring"),
WATER_RING_ENERGY_USE("Magnet Ring: Energy Used", ConfigCategories.MACHINE_VALUES, 30, 0, 500, "The Amount of Energy the Water Ring uses per Block"), WATER_RING_ENERGY_USE("Water Ring: Energy Used", ConfigCategories.MACHINE_VALUES, 30, 0, 500, "The Amount of Energy the Water Ring uses per Block"),
ORE_MAGNET_MAX_TIMER("Ore Magnet: Max Timer", ConfigCategories.MACHINE_VALUES, 20, 1, 2000, "The approximate Time it takes for the Ore Magnet to search for a new block to mine"),
ORE_MAGNET_RANGE("Ore Magnet: Range", ConfigCategories.MACHINE_VALUES, 10, 1, 60, "The range of the Ore Magnet"),
ORE_MAGNET_OIL_USE("Ore Magnet: Oil Use", ConfigCategories.MACHINE_VALUES, 30, 0, 5000, "The amount of oil the Ore Magnet uses every Block"),
ORE_MAGNET_ENERGY_USE("Ore Magnet: Energy USe", ConfigCategories.MACHINE_VALUES, 250, 10, 10000, "The amount of Energy the Ore Magnet uses every tick"),
LEAF_GENERATOR_ENERGY_PRODUCED("Leaf Generator: Energy Produced", ConfigCategories.MACHINE_VALUES, 300, 1, 10000, "How much Energy the Leaf Generator produces per Leaf broken"), LEAF_GENERATOR_ENERGY_PRODUCED("Leaf Generator: Energy Produced", ConfigCategories.MACHINE_VALUES, 300, 1, 10000, "How much Energy the Leaf Generator produces per Leaf broken"),
LEAF_GENERATOR_COOLDOWN_TIME("Leaf Generator: Cooldown Time", ConfigCategories.MACHINE_VALUES, 5, 0, 100, "The amount of ticks that it takes util another Leaf gets proken"), LEAF_GENERATOR_COOLDOWN_TIME("Leaf Generator: Cooldown Time", ConfigCategories.MACHINE_VALUES, 5, 0, 100, "The amount of ticks that it takes util another Leaf gets proken"),
@ -181,7 +176,9 @@ public enum ConfigIntValues{
RECONSTRUCTOR_DISTANCE("Atomic Reconstructor: Distance", ConfigCategories.MACHINE_VALUES, 10, 1, 50, "The max distance the Reconstructor goes forward to find blocks to convert"), RECONSTRUCTOR_DISTANCE("Atomic Reconstructor: Distance", ConfigCategories.MACHINE_VALUES, 10, 1, 50, "The max distance the Reconstructor goes forward to find blocks to convert"),
RECONSTRCUTOR_RANGE("Atomic Reconstructor: Range", ConfigCategories.MACHINE_VALUES, 2, 1, 10, "The range of Converting blocks or items into other blocks or items"), RECONSTRCUTOR_RANGE("Atomic Reconstructor: Range", ConfigCategories.MACHINE_VALUES, 2, 1, 10, "The range of Converting blocks or items into other blocks or items"),
RECONSTRUCTOR_USE_PER_BLOCK("Atomic Reconstructor: Energy Use per Block", ConfigCategories.MACHINE_VALUES, 800, 0, 100000, "The amount of Energy the Reconstructor uses per Block converted"), RECONSTRUCTOR_USE_PER_BLOCK("Atomic Reconstructor: Energy Use per Block", ConfigCategories.MACHINE_VALUES, 800, 0, 100000, "The amount of Energy the Reconstructor uses per Block converted"),
RECONSTRUCTOR_COOLDOWN_TIMER("Atomic Reconstrucor: Cooldown Timer", ConfigCategories.MACHINE_VALUES, 100, 0, 10000, "The amount of time the Reconstructor waits between shooting lasers"); RECONSTRUCTOR_COOLDOWN_TIMER("Atomic Reconstrucor: Cooldown Timer", ConfigCategories.MACHINE_VALUES, 100, 0, 10000, "The amount of time the Reconstructor waits between shooting lasers"),
TILE_ENTITY_UPDATE_INTERVAL("Tile Entities: Update Interval", ConfigCategories.OTHER, 5, 1, 100, "The amount of ticks waited before a TileEntity sends an additional Update to the Client");
public final String name; public final String name;
public final String category; public final String category;

View file

@ -40,6 +40,7 @@ public class TileEntityAtomicReconstructor extends TileEntityBase implements IEn
@Override @Override
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public void updateEntity(){ public void updateEntity(){
super.updateEntity();
if(!this.worldObj.isRemote){ if(!this.worldObj.isRemote){
int usePerBlock = ConfigIntValues.RECONSTRUCTOR_USE_PER_BLOCK.getValue(); int usePerBlock = ConfigIntValues.RECONSTRUCTOR_USE_PER_BLOCK.getValue();
if(!worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord) && this.storage.getEnergyStored() >= usePerBlock){ if(!worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord) && this.storage.getEnergyStored() >= usePerBlock){

View file

@ -11,6 +11,7 @@
package ellpeck.actuallyadditions.tile; package ellpeck.actuallyadditions.tile;
import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.GameRegistry;
import ellpeck.actuallyadditions.config.values.ConfigIntValues;
import ellpeck.actuallyadditions.util.ModUtil; import ellpeck.actuallyadditions.util.ModUtil;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
@ -22,6 +23,8 @@ import net.minecraft.world.World;
public abstract class TileEntityBase extends TileEntity{ public abstract class TileEntityBase extends TileEntity{
private int ticksElapsed;
public static void init(){ public static void init(){
ModUtil.LOGGER.info("Registering TileEntities..."); ModUtil.LOGGER.info("Registering TileEntities...");
@ -66,6 +69,11 @@ public abstract class TileEntityBase extends TileEntity{
GameRegistry.registerTileEntity(TileEntityAtomicReconstructor.class, ModUtil.MOD_ID_LOWER+":tileEntityAtomicReconstructor"); GameRegistry.registerTileEntity(TileEntityAtomicReconstructor.class, ModUtil.MOD_ID_LOWER+":tileEntityAtomicReconstructor");
} }
@Override
public void updateEntity(){
this.ticksElapsed++;
}
@Override @Override
public final void readFromNBT(NBTTagCompound compound){ public final void readFromNBT(NBTTagCompound compound){
super.readFromNBT(compound); super.readFromNBT(compound);
@ -104,6 +112,8 @@ public abstract class TileEntityBase extends TileEntity{
} }
protected void sendUpdate(){ protected void sendUpdate(){
if(this.ticksElapsed % ConfigIntValues.TILE_ENTITY_UPDATE_INTERVAL.getValue() == 0){
this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord); this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
} }
}
} }

View file

@ -38,6 +38,7 @@ public class TileEntityBreaker extends TileEntityInventoryBase{
@Override @Override
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public void updateEntity(){ public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){ if(!worldObj.isRemote){
if(!worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)){ if(!worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)){
if(this.currentTime > 0){ if(this.currentTime > 0){

View file

@ -41,6 +41,7 @@ public class TileEntityCanolaPress extends TileEntityInventoryBase implements IE
@Override @Override
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public void updateEntity(){ public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){ if(!worldObj.isRemote){
if(this.isCanola(0) && ConfigIntValues.PRESS_MB_PRODUCED.getValue() <= this.tank.getCapacity()-this.tank.getFluidAmount()){ if(this.isCanola(0) && ConfigIntValues.PRESS_MB_PRODUCED.getValue() <= this.tank.getCapacity()-this.tank.getFluidAmount()){
if(this.storage.getEnergyStored() >= ConfigIntValues.PRESS_ENERGY_USED.getValue()){ if(this.storage.getEnergyStored() >= ConfigIntValues.PRESS_ENERGY_USED.getValue()){

View file

@ -37,6 +37,7 @@ public class TileEntityCoalGenerator extends TileEntityInventoryBase implements
@Override @Override
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public void updateEntity(){ public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){ if(!worldObj.isRemote){
boolean flag = this.currentBurnTime > 0; boolean flag = this.currentBurnTime > 0;

View file

@ -50,6 +50,7 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements
@Override @Override
public void updateEntity(){ public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){ if(!worldObj.isRemote){
this.storeCoffee(); this.storeCoffee();

View file

@ -28,6 +28,7 @@ public class TileEntityCompost extends TileEntityInventoryBase{
@Override @Override
public void updateEntity(){ public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){ if(!worldObj.isRemote){
if(this.slots[0] != null && this.slots[0].stackSize > 0){ if(this.slots[0] != null && this.slots[0].stackSize > 0){

View file

@ -39,6 +39,7 @@ public class TileEntityDirectionalBreaker extends TileEntityInventoryBase implem
@Override @Override
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public void updateEntity(){ public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){ if(!worldObj.isRemote){
if(!worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)){ if(!worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)){
int usagePerBlock = ConfigIntValues.DIRECTIONAL_BREAKER_RF_PER_BLOCK.getValue(); int usagePerBlock = ConfigIntValues.DIRECTIONAL_BREAKER_RF_PER_BLOCK.getValue();

View file

@ -27,6 +27,7 @@ public class TileEntityDropper extends TileEntityInventoryBase{
@Override @Override
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public void updateEntity(){ public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){ if(!worldObj.isRemote){
if(!worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)){ if(!worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)){
if(this.currentTime > 0){ if(this.currentTime > 0){

View file

@ -30,6 +30,7 @@ public class TileEntityEnergizer extends TileEntityInventoryBase implements IEne
@Override @Override
public void updateEntity(){ public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){ if(!worldObj.isRemote){
if(this.slots[0] != null && this.slots[0].getItem() instanceof IEnergyContainerItem && this.slots[1] == null){ if(this.slots[0] != null && this.slots[0].getItem() instanceof IEnergyContainerItem && this.slots[1] == null){
if(this.storage.getEnergyStored() > 0){ if(this.storage.getEnergyStored() > 0){

View file

@ -31,6 +31,7 @@ public class TileEntityEnervator extends TileEntityInventoryBase implements IEne
@Override @Override
public void updateEntity(){ public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){ if(!worldObj.isRemote){
if(this.slots[0] != null && this.slots[0].getItem() instanceof IEnergyContainerItem && this.slots[1] == null){ if(this.slots[0] != null && this.slots[0].getItem() instanceof IEnergyContainerItem && this.slots[1] == null){
if(((IEnergyContainerItem)this.slots[0].getItem()).getEnergyStored(this.slots[0]) > 0){ if(((IEnergyContainerItem)this.slots[0].getItem()).getEnergyStored(this.slots[0]) > 0){

View file

@ -34,6 +34,7 @@ public class TileEntityFeeder extends TileEntityInventoryBase{
@Override @Override
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public void updateEntity(){ public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){ if(!worldObj.isRemote){
boolean theFlag = this.currentTimer > 0; boolean theFlag = this.currentTimer > 0;
List<EntityAnimal> animals = worldObj.getEntitiesWithinAABB(EntityAnimal.class, AxisAlignedBB.getBoundingBox(this.xCoord-ConfigIntValues.FEEDER_REACH.getValue(), this.yCoord-ConfigIntValues.FEEDER_REACH.getValue(), this.zCoord-ConfigIntValues.FEEDER_REACH.getValue(), this.xCoord+ConfigIntValues.FEEDER_REACH.getValue(), this.yCoord+ConfigIntValues.FEEDER_REACH.getValue(), this.zCoord+ConfigIntValues.FEEDER_REACH.getValue())); List<EntityAnimal> animals = worldObj.getEntitiesWithinAABB(EntityAnimal.class, AxisAlignedBB.getBoundingBox(this.xCoord-ConfigIntValues.FEEDER_REACH.getValue(), this.yCoord-ConfigIntValues.FEEDER_REACH.getValue(), this.zCoord-ConfigIntValues.FEEDER_REACH.getValue(), this.xCoord+ConfigIntValues.FEEDER_REACH.getValue(), this.yCoord+ConfigIntValues.FEEDER_REACH.getValue(), this.zCoord+ConfigIntValues.FEEDER_REACH.getValue()));

View file

@ -37,6 +37,7 @@ public class TileEntityFermentingBarrel extends TileEntityInventoryBase implemen
@Override @Override
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public void updateEntity(){ public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){ if(!worldObj.isRemote){
if(this.canolaTank.getFluidAmount() >= ConfigIntValues.BARREL_MB_PRODUCED.getValue() && ConfigIntValues.BARREL_MB_PRODUCED.getValue() <= this.oilTank.getCapacity()-this.oilTank.getFluidAmount()){ if(this.canolaTank.getFluidAmount() >= ConfigIntValues.BARREL_MB_PRODUCED.getValue() && ConfigIntValues.BARREL_MB_PRODUCED.getValue() <= this.oilTank.getCapacity()-this.oilTank.getFluidAmount()){
this.currentProcessTime++; this.currentProcessTime++;

View file

@ -37,6 +37,7 @@ public class TileEntityFishingNet extends TileEntityBase{
@Override @Override
public void updateEntity(){ public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){ if(!worldObj.isRemote){
if(!worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)){ if(!worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)){
if(worldObj.getBlock(xCoord, yCoord-1, zCoord).getMaterial() == Material.water){ if(worldObj.getBlock(xCoord, yCoord-1, zCoord).getMaterial() == Material.water){

View file

@ -80,6 +80,7 @@ public class TileEntityFluidCollector extends TileEntityInventoryBase implements
@Override @Override
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public void updateEntity(){ public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){ if(!worldObj.isRemote){
if(!worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)){ if(!worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)){
if(this.currentTime > 0){ if(this.currentTime > 0){

View file

@ -41,6 +41,7 @@ public class TileEntityFurnaceDouble extends TileEntityInventoryBase implements
@Override @Override
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public void updateEntity(){ public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){ if(!worldObj.isRemote){
boolean flag = this.firstSmeltTime > 0 || this.secondSmeltTime > 0; boolean flag = this.firstSmeltTime > 0 || this.secondSmeltTime > 0;

View file

@ -53,6 +53,7 @@ public class TileEntityFurnaceSolar extends TileEntityBase implements IEnergyPro
@Override @Override
public void updateEntity(){ public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){ if(!worldObj.isRemote){
if(worldObj.canBlockSeeTheSky(xCoord, yCoord, zCoord) && worldObj.isDaytime()){ if(worldObj.canBlockSeeTheSky(xCoord, yCoord, zCoord) && worldObj.isDaytime()){
if(ConfigIntValues.FURNACE_SOLAR_ENERGY_PRODUCED.getValue() <= this.getMaxEnergyStored(ForgeDirection.UNKNOWN)-this.getEnergyStored(ForgeDirection.UNKNOWN)){ if(ConfigIntValues.FURNACE_SOLAR_ENERGY_PRODUCED.getValue() <= this.getMaxEnergyStored(ForgeDirection.UNKNOWN)-this.getEnergyStored(ForgeDirection.UNKNOWN)){

View file

@ -24,6 +24,7 @@ public class TileEntityGreenhouseGlass extends TileEntityBase{
@Override @Override
public void updateEntity(){ public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){ if(!worldObj.isRemote){
if(worldObj.canBlockSeeTheSky(xCoord, yCoord, zCoord) && worldObj.isDaytime()){ if(worldObj.canBlockSeeTheSky(xCoord, yCoord, zCoord) && worldObj.isDaytime()){
WorldPos blockToFert = this.blockToFertilize(); WorldPos blockToFert = this.blockToFertilize();

View file

@ -71,6 +71,7 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IEnerg
@Override @Override
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public void updateEntity(){ public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){ if(!worldObj.isRemote){
boolean flag = this.firstCrushTime > 0 || this.secondCrushTime > 0; boolean flag = this.firstCrushTime > 0 || this.secondCrushTime > 0;

View file

@ -28,6 +28,7 @@ public class TileEntityHeatCollector extends TileEntityBase implements IEnergyPr
@Override @Override
public void updateEntity(){ public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){ if(!worldObj.isRemote){
ArrayList<Integer> blocksAround = new ArrayList<Integer>(); ArrayList<Integer> blocksAround = new ArrayList<Integer>();
if(ConfigIntValues.HEAT_COLLECTOR_ENERGY_PRODUCED.getValue() <= this.getMaxEnergyStored(ForgeDirection.UNKNOWN)-this.getEnergyStored(ForgeDirection.UNKNOWN)){ if(ConfigIntValues.HEAT_COLLECTOR_ENERGY_PRODUCED.getValue() <= this.getMaxEnergyStored(ForgeDirection.UNKNOWN)-this.getEnergyStored(ForgeDirection.UNKNOWN)){

View file

@ -82,6 +82,7 @@ public class TileEntityInputter extends TileEntityInventoryBase implements IButt
@Override @Override
public void updateEntity(){ public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){ if(!worldObj.isRemote){
this.initVars(); this.initVars();

View file

@ -79,6 +79,11 @@ public abstract class TileEntityInventoryBase extends TileEntityBase implements
} }
} }
@Override
public void updateEntity(){
super.updateEntity();
}
@Override @Override
public int getInventoryStackLimit(){ public int getInventoryStackLimit(){
return 64; return 64;

View file

@ -35,6 +35,7 @@ public class TileEntityItemRepairer extends TileEntityInventoryBase implements I
@Override @Override
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public void updateEntity(){ public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){ if(!worldObj.isRemote){
if(this.slots[SLOT_OUTPUT] == null && canBeRepaired(this.slots[SLOT_INPUT])){ if(this.slots[SLOT_OUTPUT] == null && canBeRepaired(this.slots[SLOT_INPUT])){
if(this.slots[SLOT_INPUT].getItemDamage() <= 0){ if(this.slots[SLOT_INPUT].getItemDamage() <= 0){

View file

@ -32,6 +32,7 @@ public class TileEntityLaserRelay extends TileEntityBase implements IEnergyRecei
@Override @Override
public void updateEntity(){ public void updateEntity(){
super.updateEntity();
if(this.worldObj.isRemote){ if(this.worldObj.isRemote){
this.renderParticles(); this.renderParticles();
} }

View file

@ -45,6 +45,7 @@ public class TileEntityLavaFactoryController extends TileEntityBase implements I
@Override @Override
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public void updateEntity(){ public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){ if(!worldObj.isRemote){
if(this.storage.getEnergyStored() >= ConfigIntValues.LAVA_FACTORY_ENERGY_USED.getValue() && this.isMultiblock() == HAS_AIR){ if(this.storage.getEnergyStored() >= ConfigIntValues.LAVA_FACTORY_ENERGY_USED.getValue() && this.isMultiblock() == HAS_AIR){
this.currentWorkTime++; this.currentWorkTime++;

View file

@ -41,6 +41,7 @@ public class TileEntityLeafGenerator extends TileEntityBase implements IEnergyPr
@Override @Override
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public void updateEntity(){ public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){ if(!worldObj.isRemote){
if(!this.worldObj.isBlockIndirectlyGettingPowered(this.xCoord, this.yCoord, this.zCoord)){ if(!this.worldObj.isBlockIndirectlyGettingPowered(this.xCoord, this.yCoord, this.zCoord)){

View file

@ -38,6 +38,7 @@ public class TileEntityOilGenerator extends TileEntityInventoryBase implements I
@Override @Override
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public void updateEntity(){ public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){ if(!worldObj.isRemote){
boolean flag = this.currentBurnTime > 0; boolean flag = this.currentBurnTime > 0;

View file

@ -42,6 +42,7 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements
@Override @Override
public void updateEntity(){ public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){ if(!worldObj.isRemote){
this.range = TileEntityPhantomface.upgradeRange(ConfigIntValues.PHANTOM_PLACER_RANGE.getValue(), worldObj, xCoord, yCoord, zCoord); this.range = TileEntityPhantomface.upgradeRange(ConfigIntValues.PHANTOM_PLACER_RANGE.getValue(), worldObj, xCoord, yCoord, zCoord);

View file

@ -41,6 +41,7 @@ public class TileEntityPhantomface extends TileEntityInventoryBase implements IP
@Override @Override
public void updateEntity(){ public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){ if(!worldObj.isRemote){
this.range = upgradeRange(ConfigIntValues.PHANTOMFACE_RANGE.getValue(), worldObj, xCoord, yCoord, zCoord); this.range = upgradeRange(ConfigIntValues.PHANTOMFACE_RANGE.getValue(), worldObj, xCoord, yCoord, zCoord);

View file

@ -35,6 +35,7 @@ public class TileEntityRangedCollector extends TileEntityInventoryBase implement
@Override @Override
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public void updateEntity(){ public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){ if(!worldObj.isRemote){
if(!worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)){ if(!worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)){
int range = ConfigIntValues.RANGED_COLLECTOR_RANGE.getValue(); int range = ConfigIntValues.RANGED_COLLECTOR_RANGE.getValue();

View file

@ -41,6 +41,7 @@ public class TileEntitySmileyCloud extends TileEntityBase implements IStringReac
@Override @Override
public void updateEntity(){ public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){ if(!worldObj.isRemote){
if(!Objects.equals(this.name, this.nameBefore)){ if(!Objects.equals(this.name, this.nameBefore)){
this.nameBefore = this.name; this.nameBefore = this.name;

View file

@ -31,6 +31,7 @@ public class TileEntityXPSolidifier extends TileEntityInventoryBase implements I
@Override @Override
public void updateEntity(){ public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){ if(!worldObj.isRemote){
if(this.amount > 0){ if(this.amount > 0){
if(this.slots[0] == null){ if(this.slots[0] == null){