Grab the broom and sweep!

This commit is contained in:
Ellpeck 2016-05-13 21:57:53 +02:00
parent 549402d98e
commit 3495901d37
10 changed files with 13 additions and 28 deletions

View file

@ -10,8 +10,6 @@
package de.ellpeck.actuallyadditions.mod.blocks.metalists;
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import java.util.Locale;
public enum TheColoredLampColors{

View file

@ -16,7 +16,6 @@ import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy;
import de.ellpeck.actuallyadditions.mod.tile.TileEntitySmileyCloud;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.PosUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;

View file

@ -41,7 +41,6 @@ import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.util.*;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.RayTraceResult;

View file

@ -20,7 +20,6 @@ import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.World;

View file

@ -10,7 +10,6 @@
package de.ellpeck.actuallyadditions.mod.misc.special;
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import de.ellpeck.actuallyadditions.mod.util.Util;
import net.minecraft.block.Block;
import net.minecraft.item.Item;

View file

@ -21,7 +21,6 @@ import de.ellpeck.actuallyadditions.mod.blocks.render.RenderSmileyCloud;
import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues;
import de.ellpeck.actuallyadditions.mod.event.InitEvents;
import de.ellpeck.actuallyadditions.mod.fluids.InitFluids;
import de.ellpeck.actuallyadditions.mod.misc.SoundHandler;
import de.ellpeck.actuallyadditions.mod.misc.special.SpecialRenderInit;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityAtomicReconstructor;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityCompost;
@ -29,7 +28,6 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntitySmileyCloud;
import de.ellpeck.actuallyadditions.mod.util.FluidStateMapper;
import de.ellpeck.actuallyadditions.mod.util.IColorProvidingItem;
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import de.ellpeck.actuallyadditions.mod.util.playerdata.PersistentClientData;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;

View file

@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.tile;
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@ -41,18 +40,6 @@ public abstract class TileEntityInventoryBase extends TileEntityBase implements
}
}
public void initializeSlots(int itemAmount){
this.slots = new ItemStack[itemAmount];
}
@Override
public void writeSyncableNBT(NBTTagCompound compound, boolean isForSync){
super.writeSyncableNBT(compound, isForSync);
if(!isForSync || this.shouldSyncSlots()){
saveSlots(this.slots, compound);
}
}
public static void saveSlots(ItemStack[] slots, NBTTagCompound compound){
if(slots != null && slots.length > 0){
NBTTagList tagList = new NBTTagList();
@ -81,6 +68,18 @@ public abstract class TileEntityInventoryBase extends TileEntityBase implements
}
}
public void initializeSlots(int itemAmount){
this.slots = new ItemStack[itemAmount];
}
@Override
public void writeSyncableNBT(NBTTagCompound compound, boolean isForSync){
super.writeSyncableNBT(compound, isForSync);
if(!isForSync || this.shouldSyncSlots()){
saveSlots(this.slots, compound);
}
}
public boolean shouldSyncSlots(){
return false;
}

View file

@ -3,7 +3,6 @@ package de.ellpeck.actuallyadditions.mod.tile;
import de.ellpeck.actuallyadditions.mod.misc.LaserRelayConnectionHandler;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelay.TileEntityLaserRelayItem;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelay.TileEntityLaserRelayItemWhitelist;
import de.ellpeck.actuallyadditions.mod.util.PosUtil;
import de.ellpeck.actuallyadditions.mod.util.WorldUtil;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;

View file

@ -24,7 +24,6 @@ import de.ellpeck.actuallyadditions.mod.util.WorldUtil;
import io.netty.util.internal.ConcurrentSet;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
@ -167,13 +166,10 @@ public abstract class TileEntityLaserRelay extends TileEntityBase{
public static class TileEntityLaserRelayItemWhitelist extends TileEntityLaserRelayItem implements IButtonReactor{
private ItemStack[] slots = new ItemStack[24];
public IInventory filterInventory;
public boolean isLeftWhitelist;
public boolean isRightWhitelist;
private ItemStack[] slots = new ItemStack[24];
private boolean lastLeftWhitelist;
private boolean lastRightWhitelist;

View file

@ -15,7 +15,6 @@ import net.minecraft.util.text.translation.I18n;
import net.minecraftforge.fluids.FluidTank;
import java.util.List;
import java.util.Locale;
public class StringUtil{