mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-06-27 12:51:42 +02:00
35 lines
939 B
Java
35 lines
939 B
Java
package de.ellpeck.naturesaura.blocks.tiles;
|
|
|
|
import net.minecraft.nbt.CompoundNBT;
|
|
import net.minecraft.util.Direction;
|
|
|
|
public class TileEntityProjectileGenerator extends TileEntityImpl {
|
|
|
|
public Direction nextSide = Direction.NORTH;
|
|
|
|
public TileEntityProjectileGenerator() {
|
|
super(ModTileEntities.PROJECTILE_GENERATOR);
|
|
}
|
|
|
|
@Override
|
|
public void writeNBT(CompoundNBT compound, SaveType type) {
|
|
super.writeNBT(compound, type);
|
|
if (type != SaveType.BLOCK) {
|
|
compound.putInt("next_side", this.nextSide.getHorizontalIndex());
|
|
}
|
|
}
|
|
|
|
@Override
|
|
public void readNBT(CompoundNBT compound, SaveType type) {
|
|
super.readNBT(compound, type);
|
|
if (type != SaveType.BLOCK) {
|
|
this.nextSide = Direction.byHorizontalIndex(compound.getInt("next_side"));
|
|
}
|
|
}
|
|
|
|
@Override
|
|
public boolean wantsLimitRemover() {
|
|
return true;
|
|
}
|
|
}
|