public class FarmController extends RectangularMultiblockControllerBase implements IFarmControllerInternal, ILiquidTankTile
MultiblockControllerBase.AssemblyStateassemblyState, connectedParts, world| Constructor and Description |
|---|
FarmController(net.minecraft.world.World world) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canPlantSoil(boolean manual) |
void |
cleanExtents(FarmDirection direction)
Clears the cache for the given direction.
|
void |
decodeDescriptionPacket(net.minecraft.nbt.NBTTagCompound data)
Called when the save delegate's tile entity receiving a description packet
|
boolean |
doWork() |
void |
formatDescriptionPacket(net.minecraft.nbt.NBTTagCompound data)
Called when the save delegate's tile entity is being asked for its description packet
|
net.minecraft.util.math.Vec3i |
getArea() |
net.minecraft.util.math.BlockPos |
getCoordinates() |
net.minecraft.util.math.BlockPos |
getCoords() |
float |
getExactHumidity() |
float |
getExactTemperature() |
int |
getExtents(FarmDirection direction,
net.minecraft.util.math.BlockPos pos)
Gets the current extent for the given direction and position.
|
net.minecraft.util.math.BlockPos |
getFarmCorner(FarmDirection direction) |
IFarmInventory |
getFarmInventory() |
IFarmLedgerDelegate |
getFarmLedgerDelegate() |
IFarmLogic |
getFarmLogic(FarmDirection direction) |
EnumHumidity |
getHumidity() |
IInventoryAdapter |
getInternalInventory() |
net.minecraft.util.math.Vec3i |
getOffset() |
net.minecraft.item.ItemStack |
getSocket(int slot) |
int |
getSocketCount() |
ICircuitSocketType |
getSocketType() |
int |
getStoredFertilizerScaled(int scale) |
TankManager |
getTankManager() |
EnumTemperature |
getTemperature() |
java.lang.String |
getUnlocalizedType() |
boolean |
hasLiquid(net.minecraftforge.fluids.FluidStack liquid) |
void |
isGoodForExteriorLevel(IMultiblockComponent part,
int level) |
void |
isGoodForInterior(IMultiblockComponent part) |
protected void |
isMachineWhole()
Checks if a machine is whole.
|
boolean |
isSquare() |
boolean |
isValidPlatform(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos) |
void |
onAssimilate(IMultiblockControllerInternal assimilated)
Callback.
|
void |
onAssimilated(IMultiblockControllerInternal assimilator)
Callback.
|
void |
onAttachedPartWithMultiblockData(IMultiblockComponent part,
net.minecraft.nbt.NBTTagCompound data)
Call when a block with cached save-delegate data is added to the multiblock.
|
protected void |
onBlockAdded(IMultiblockComponent newPart)
Called when a new part is added to the machine.
|
protected void |
onBlockRemoved(IMultiblockComponent oldPart)
Called when a part is removed from the machine.
|
protected void |
onMachineDisassembled()
Called when a machine is disassembled from an assembled state.
|
boolean |
plantGermling(IFarmable germling,
net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos)
Callback for
IFarmLogics to plant a sapling, seed, germling, stem. |
void |
readFromNBT(net.minecraft.nbt.NBTTagCompound data) |
void |
readGuiData(PacketBufferForestry data) |
void |
removeLiquid(net.minecraftforge.fluids.FluidStack liquid) |
void |
resetFarmLogic(FarmDirection direction) |
void |
setExtents(FarmDirection direction,
net.minecraft.util.math.BlockPos pos,
int extend)
Sets the current extent for the given direction and position.
|
void |
setFarmLogic(FarmDirection direction,
IFarmLogic logic) |
void |
setSocket(int slot,
net.minecraft.item.ItemStack stack) |
java.lang.String |
toString() |
protected void |
updateClient(int tickCount)
Client-side update loop.
|
protected boolean |
updateServer(int tickCount)
The server-side update loop! Use this similarly to a TileEntity's update loop.
|
void |
writeGuiData(PacketBufferForestry data) |
net.minecraft.nbt.NBTTagCompound |
writeToNBT(net.minecraft.nbt.NBTTagCompound data) |
getSizeLimitscanExtractItem, canInsertItem, clear, closeInventory, decrStackSize, getDisplayName, getErrorLogic, getField, getFieldCount, getInventoryStackLimit, getName, getOwnerHandler, getSizeInventory, getSlotsForFace, getStackInSlot, getWorldObj, hasCustomName, isItemValidForSlot, isUsableByPlayer, markDirty, onMachineAssembled, openInventory, removeStackFromSlot, setField, setInventorySlotContents_onAssimilated, assimilate, attachBlock, auditParts, checkForDisconnections, checkIfMachineIsWhole, detachAllBlocks, detachBlock, getCenterCoord, getComponents, getLastValidationError, getLastValidationErrorPosition, getMaximumCoord, getMinimumCoord, getNumConnectedBlocks, getPartsListString, getReferenceCoord, getTickCount, getTopCenterCoord, isAssembled, isBlockGoodForExteriorLevel, isBlockGoodForInterior, isCoordInMultiblock, isEmpty, onMachinePaused, onMachineRestored, reassemble, recalculateMinMaxCoords, shouldConsume, updateMultiblockEntity, updateOnIntervalclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddPendingProduce, plantGermlinggetErrorLogicgetValidExtent, getValidPosition, increaseExtent_onAssimilated, assimilate, attachBlock, auditParts, checkForDisconnections, checkIfMachineIsWhole, detachAllBlocks, detachBlock, getPartsListString, getReferenceCoord, getWorldObj, isEmpty, recalculateMinMaxCoords, shouldConsume, updateMultiblockEntitygetComponents, getLastValidationError, getLastValidationErrorPosition, isAssembled, reassemblegetOwnerHandlergetWorldObjpublic IFarmLedgerDelegate getFarmLedgerDelegate()
getFarmLedgerDelegate in interface IFarmControllerInternalpublic IInventoryAdapter getInternalInventory()
getInternalInventory in interface IFarmControllerInternalgetInternalInventory in class MultiblockControllerForestrypublic TankManager getTankManager()
getTankManager in interface ILiquidTankTilegetTankManager in interface IFarmControllerInternalpublic void onAttachedPartWithMultiblockData(IMultiblockComponent part, net.minecraft.nbt.NBTTagCompound data)
MultiblockControllerBaseonAttachedPartWithMultiblockData in class MultiblockControllerBasepart - The NBT tag containing this controller's data.protected void onBlockAdded(IMultiblockComponent newPart)
MultiblockControllerBaseonBlockAdded in class MultiblockControllerBasenewPart - The part being added.protected void onBlockRemoved(IMultiblockComponent oldPart)
MultiblockControllerBaseonBlockRemoved in class MultiblockControllerBaseoldPart - The part being removed.protected void isMachineWhole()
throws MultiblockValidationException
MultiblockControllerBaseisMachineWhole in class RectangularMultiblockControllerBaseMultiblockValidationExceptionprotected void onMachineDisassembled()
MultiblockControllerBaseonMachineDisassembled in class MultiblockControllerBasepublic void isGoodForExteriorLevel(IMultiblockComponent part, int level) throws MultiblockValidationException
isGoodForExteriorLevel in class RectangularMultiblockControllerBaseMultiblockValidationExceptionpublic void isGoodForInterior(IMultiblockComponent part) throws MultiblockValidationException
isGoodForInterior in class RectangularMultiblockControllerBaseMultiblockValidationExceptionpublic void onAssimilate(IMultiblockControllerInternal assimilated)
MultiblockControllerBaseonAssimilate in class MultiblockControllerBaseassimilated - The controller whose uniqueness was added to our own.public void onAssimilated(IMultiblockControllerInternal assimilator)
MultiblockControllerBaseonAssimilated in interface IMultiblockControllerInternalonAssimilated in class MultiblockControllerBaseassimilator - The controller which has assimilated this controller.protected boolean updateServer(int tickCount)
MultiblockControllerBaseupdateServer in class MultiblockControllerBaseprotected void updateClient(int tickCount)
MultiblockControllerBaseupdateClient in class MultiblockControllerBasepublic net.minecraft.nbt.NBTTagCompound writeToNBT(net.minecraft.nbt.NBTTagCompound data)
writeToNBT in interface INbtWritablewriteToNBT in class MultiblockControllerForestrypublic void readFromNBT(net.minecraft.nbt.NBTTagCompound data)
readFromNBT in interface INbtReadablereadFromNBT in class MultiblockControllerForestrypublic void formatDescriptionPacket(net.minecraft.nbt.NBTTagCompound data)
IMultiblockControllerInternalformatDescriptionPacket in interface IMultiblockControllerInternaldata - A fresh compound tag to write your multiblock data intopublic void decodeDescriptionPacket(net.minecraft.nbt.NBTTagCompound data)
IMultiblockControllerInternaldecodeDescriptionPacket in interface IMultiblockControllerInternaldata - A compound tag containing multiblock data to importpublic net.minecraft.util.math.BlockPos getCoordinates()
getCoordinates in interface ILocatablepublic void writeGuiData(PacketBufferForestry data)
writeGuiData in interface IStreamableGuipublic void readGuiData(PacketBufferForestry data) throws java.io.IOException
readGuiData in interface IStreamableGuijava.io.IOExceptionpublic EnumTemperature getTemperature()
getTemperature in interface IClimatisedpublic EnumHumidity getHumidity()
getHumidity in interface IClimatisedpublic float getExactTemperature()
getExactTemperature in interface IClimatisedpublic float getExactHumidity()
getExactHumidity in interface IClimatisedpublic net.minecraft.util.math.BlockPos getCoords()
getCoords in interface IFarmHousingpublic net.minecraft.util.math.Vec3i getOffset()
getOffset in interface IFarmHousingpublic net.minecraft.util.math.Vec3i getArea()
getArea in interface IFarmHousingpublic net.minecraft.util.math.BlockPos getFarmCorner(FarmDirection direction)
getFarmCorner in interface IFarmHousingpublic java.lang.String getUnlocalizedType()
getUnlocalizedType in interface IMultiblockControllerInternalpublic boolean doWork()
doWork in interface IFarmHousingpublic int getStoredFertilizerScaled(int scale)
getStoredFertilizerScaled in interface IFarmHousingpublic boolean hasLiquid(net.minecraftforge.fluids.FluidStack liquid)
hasLiquid in interface IFarmHousingpublic void removeLiquid(net.minecraftforge.fluids.FluidStack liquid)
removeLiquid in interface IFarmHousingpublic boolean plantGermling(IFarmable germling, net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos)
IFarmHousingIFarmLogics to plant a sapling, seed, germling, stem.
Will remove the appropriate germling from the farm's inventory.
It's up to the logic to only call this on a valid location.plantGermling in interface IFarmHousingpublic IFarmInventory getFarmInventory()
getFarmInventory in interface IFarmHousingpublic void setFarmLogic(FarmDirection direction, IFarmLogic logic)
setFarmLogic in interface IFarmHousingpublic void resetFarmLogic(FarmDirection direction)
resetFarmLogic in interface IFarmHousingpublic IFarmLogic getFarmLogic(FarmDirection direction)
getFarmLogic in interface IFarmHousingpublic int getSocketCount()
getSocketCount in interface ISocketablepublic net.minecraft.item.ItemStack getSocket(int slot)
getSocket in interface ISocketablepublic void setSocket(int slot,
net.minecraft.item.ItemStack stack)
setSocket in interface ISocketablepublic ICircuitSocketType getSocketType()
getSocketType in interface ISocketablepublic boolean canPlantSoil(boolean manual)
canPlantSoil in interface IFarmHousingpublic boolean isValidPlatform(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos)
isValidPlatform in interface IFarmHousingpublic boolean isSquare()
isSquare in interface IFarmHousingpublic int getExtents(FarmDirection direction, net.minecraft.util.math.BlockPos pos)
IExtentCachegetExtents in interface IExtentCachedirection - The direction of the farm logic.pos - The position the logic starts to operate onpublic void setExtents(FarmDirection direction, net.minecraft.util.math.BlockPos pos, int extend)
IExtentCachesetExtents in interface IExtentCachedirection - The direction of the farm logic.pos - The position the logic starts to operate onextend - The extentpublic void cleanExtents(FarmDirection direction)
IExtentCacheFor example used if the player remove the circuit from the farm.
cleanExtents in interface IExtentCachedirection - The direction that should be clearedpublic java.lang.String toString()
toString in class java.lang.Object