mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-26 05:08:34 +01:00
what the fuck IntelliJ
This commit is contained in:
parent
ba7e3f24fd
commit
9bf2d912b1
5 changed files with 9 additions and 32 deletions
|
@ -208,7 +208,7 @@ public class TileEntityNatureAltar extends TileEntityImpl implements ITickable {
|
|||
public void writeNBT(NBTTagCompound compound, SaveType type) {
|
||||
super.writeNBT(compound, type);
|
||||
if (type != SaveType.BLOCK) {
|
||||
compound.setTag("ingredients", this.items.serializeNBT());
|
||||
compound.setTag("items", this.items.serializeNBT());
|
||||
compound.setBoolean("fine", this.structureFine);
|
||||
this.container.writeNBT(compound);
|
||||
}
|
||||
|
@ -224,7 +224,7 @@ public class TileEntityNatureAltar extends TileEntityImpl implements ITickable {
|
|||
public void readNBT(NBTTagCompound compound, SaveType type) {
|
||||
super.readNBT(compound, type);
|
||||
if (type != SaveType.BLOCK) {
|
||||
this.items.deserializeNBT(compound.getCompoundTag("ingredients"));
|
||||
this.items.deserializeNBT(compound.getCompoundTag("items"));
|
||||
this.structureFine = compound.getBoolean("fine");
|
||||
this.container.readNBT(compound);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ public class TileEntityOfferingTable extends TileEntityImpl {
|
|||
public void writeNBT(NBTTagCompound compound, SaveType type) {
|
||||
super.writeNBT(compound, type);
|
||||
if (type != SaveType.BLOCK) {
|
||||
compound.setTag("ingredients", this.items.serializeNBT());
|
||||
compound.setTag("items", this.items.serializeNBT());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ public class TileEntityOfferingTable extends TileEntityImpl {
|
|||
public void readNBT(NBTTagCompound compound, SaveType type) {
|
||||
super.readNBT(compound, type);
|
||||
if (type != SaveType.BLOCK) {
|
||||
this.items.deserializeNBT(compound.getCompoundTag("ingredients"));
|
||||
this.items.deserializeNBT(compound.getCompoundTag("items"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@ import net.minecraft.init.Blocks;
|
|||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
|
@ -24,15 +23,12 @@ import net.minecraftforge.common.util.FakePlayer;
|
|||
import net.minecraftforge.common.util.FakePlayerFactory;
|
||||
import net.minecraftforge.items.CapabilityItemHandler;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import net.minecraftforge.items.IItemHandlerModifiable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class TileEntityPlacer extends TileEntityImpl implements ITickable {
|
||||
|
||||
private final ItemStackHandlerNA handler = new ItemStackHandlerNA(1, this, true);
|
||||
|
||||
@Override
|
||||
public void update() {
|
||||
if (!this.world.isRemote && this.world.getTotalWorldTime() % 15 == 0) {
|
||||
|
@ -93,10 +89,10 @@ public class TileEntityPlacer extends TileEntityImpl implements ITickable {
|
|||
ItemStack frameStack = frame.getDisplayedItem();
|
||||
if (frameStack.isEmpty())
|
||||
continue;
|
||||
if(Helper.areItemsEqual(stack, frameStack, false))
|
||||
if (Helper.areItemsEqual(stack, frameStack, false))
|
||||
return true;
|
||||
|
||||
if(state.getBlock() == Blocks.FARMLAND && frameStack.getItem() == ModItems.FARMING_STENCIL)
|
||||
if (state.getBlock() == Blocks.FARMLAND && frameStack.getItem() == ModItems.FARMING_STENCIL)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -139,23 +135,4 @@ public class TileEntityPlacer extends TileEntityImpl implements ITickable {
|
|||
stack.shrink(1);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemHandlerModifiable getItemHandler(EnumFacing facing) {
|
||||
return this.handler;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readNBT(NBTTagCompound compound, SaveType type) {
|
||||
super.readNBT(compound, type);
|
||||
if (type != SaveType.BLOCK)
|
||||
this.handler.deserializeNBT(compound.getCompoundTag("ingredients"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeNBT(NBTTagCompound compound, SaveType type) {
|
||||
super.writeNBT(compound, type);
|
||||
if (type != SaveType.BLOCK)
|
||||
compound.setTag("ingredients", this.handler.serializeNBT());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -173,7 +173,7 @@ public class TileEntityWoodStand extends TileEntityImpl implements ITickable {
|
|||
public void writeNBT(NBTTagCompound compound, SaveType type) {
|
||||
super.writeNBT(compound, type);
|
||||
if (type != SaveType.BLOCK)
|
||||
compound.setTag("ingredients", this.items.serializeNBT());
|
||||
compound.setTag("items", this.items.serializeNBT());
|
||||
|
||||
if (type == SaveType.TILE) {
|
||||
if (this.ritualPos != null && this.recipe != null) {
|
||||
|
@ -188,7 +188,7 @@ public class TileEntityWoodStand extends TileEntityImpl implements ITickable {
|
|||
public void readNBT(NBTTagCompound compound, SaveType type) {
|
||||
super.readNBT(compound, type);
|
||||
if (type != SaveType.BLOCK)
|
||||
this.items.deserializeNBT(compound.getCompoundTag("ingredients"));
|
||||
this.items.deserializeNBT(compound.getCompoundTag("items"));
|
||||
|
||||
if (type == SaveType.TILE) {
|
||||
if (compound.hasKey("recipe")) {
|
||||
|
|
|
@ -37,7 +37,7 @@ import java.util.List;
|
|||
|
||||
public class ItemShockwaveCreator extends ItemImpl implements ITrinketItem {
|
||||
|
||||
private static final ResourceLocation RES_WORN = new ResourceLocation(NaturesAura.MOD_ID, "textures/ingredients/shockwave_creator_player.png");
|
||||
private static final ResourceLocation RES_WORN = new ResourceLocation(NaturesAura.MOD_ID, "textures/items/shockwave_creator_player.png");
|
||||
|
||||
public ItemShockwaveCreator() {
|
||||
super("shockwave_creator");
|
||||
|
|
Loading…
Reference in a new issue