public abstract class MixinTileEntity extends Object implements org.spongepowered.api.block.tileentity.TileEntity, IMixinTileEntity
Modifier and Type | Field and Description |
---|---|
protected boolean |
tileEntityInvalid |
protected net.minecraft.world.World |
worldObj |
Constructor and Description |
---|
MixinTileEntity() |
Modifier and Type | Method and Description |
---|---|
Collection<org.spongepowered.api.data.manipulator.DataManipulator<?,?>> |
getContainers() |
org.spongepowered.api.world.Location<org.spongepowered.api.world.World> |
getLocation() |
abstract net.minecraft.util.BlockPos |
getPos() |
boolean |
isValid() |
abstract void |
markDirty() |
void |
onReadFromNBT(net.minecraft.nbt.NBTTagCompound compound,
org.spongepowered.asm.mixin.injection.callback.CallbackInfo ci)
Hooks into vanilla's readFromNBT to call
readFromNbt(net.minecraft.nbt.NBTTagCompound) . |
void |
onWriteToNBT(net.minecraft.nbt.NBTTagCompound compound,
org.spongepowered.asm.mixin.injection.callback.CallbackInfo ci)
Hooks into vanilla's writeToNBT to call
writeToNbt(net.minecraft.nbt.NBTTagCompound) . |
void |
readFromNbt(net.minecraft.nbt.NBTTagCompound compound)
Read extra data (SpongeData) from the tile entity's NBT tag.
|
void |
setRawData(org.spongepowered.api.data.DataContainer container) |
void |
setValid(boolean valid) |
org.spongepowered.api.data.DataContainer |
toContainer() |
boolean |
validateRawData(org.spongepowered.api.data.DataContainer container) |
void |
writeToNbt(net.minecraft.nbt.NBTTagCompound compound)
Write extra data (SpongeData) to the tile entity's NBT tag.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBlock, getType
copyFrom, copyFrom, get, getOrCreate, offer, offer, offer, offer, offer, offer, remove, remove, remove, supports, transform, undo
copy, get, getKeys, getOrElse, getOrNull, getValue, getValues, supports, supports
getSpongeData
protected boolean tileEntityInvalid
protected net.minecraft.world.World worldObj
public abstract void markDirty()
public abstract net.minecraft.util.BlockPos getPos()
public org.spongepowered.api.world.Location<org.spongepowered.api.world.World> getLocation()
getLocation
in interface org.spongepowered.api.block.tileentity.TileEntity
public org.spongepowered.api.data.DataContainer toContainer()
toContainer
in interface org.spongepowered.api.data.DataSerializable
public boolean validateRawData(org.spongepowered.api.data.DataContainer container)
validateRawData
in interface org.spongepowered.api.data.DataHolder
public void setRawData(org.spongepowered.api.data.DataContainer container) throws org.spongepowered.api.service.persistence.InvalidDataException
setRawData
in interface org.spongepowered.api.data.DataHolder
org.spongepowered.api.service.persistence.InvalidDataException
public boolean isValid()
isValid
in interface org.spongepowered.api.block.tileentity.TileEntity
public void setValid(boolean valid)
setValid
in interface org.spongepowered.api.block.tileentity.TileEntity
public void onWriteToNBT(net.minecraft.nbt.NBTTagCompound compound, org.spongepowered.asm.mixin.injection.callback.CallbackInfo ci)
writeToNbt(net.minecraft.nbt.NBTTagCompound)
.
This makes it easier for other entity mixins to override writeToNBT without having to specify the @Inject
annotation.
compound
- The compound vanilla writes to (unused because we write to SpongeData)ci
- (Unused) callback infopublic void onReadFromNBT(net.minecraft.nbt.NBTTagCompound compound, org.spongepowered.asm.mixin.injection.callback.CallbackInfo ci)
readFromNbt(net.minecraft.nbt.NBTTagCompound)
.
This makes it easier for other entity mixins to override readFromNbt without having to specify the @Inject
annotation.
compound
- The compound vanilla reads from (unused because we read from SpongeData)ci
- (Unused) callback infopublic void readFromNbt(net.minecraft.nbt.NBTTagCompound compound)
readFromNbt
in interface IMixinTileEntity
compound
- The SpongeData compound to read frompublic void writeToNbt(net.minecraft.nbt.NBTTagCompound compound)
writeToNbt
in interface IMixinTileEntity
compound
- The SpongeData compound to write topublic Collection<org.spongepowered.api.data.manipulator.DataManipulator<?,?>> getContainers()
getContainers
in interface org.spongepowered.api.data.value.mutable.CompositeValueStore<org.spongepowered.api.data.DataHolder,org.spongepowered.api.data.manipulator.DataManipulator<?,?>>