public class PneumaticCraftAPIHandler extends java.lang.Object implements PneumaticRegistry.IPneumaticCraftInterface
| Constructor and Description |
|---|
PneumaticCraftAPIHandler() |
| Modifier and Type | Method and Description |
|---|---|
net.minecraftforge.items.IItemHandler |
deserializeSmartChest(net.minecraft.nbt.CompoundNBT tag)
Return a Smart Chest item handler properly deserialized from the supplied NBT.
|
void |
forceClientShapeRecalculation(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos)
Notify tracking clients to recalculate the block shapes of all neighbours of the block at the given world
and position.
|
IAirHandlerMachineFactory |
getAirHandlerMachineFactory() |
IDroneRegistry |
getDroneRegistry() |
IFuelRegistry |
getFuelRegistry() |
IClientRegistry |
getGuiRegistry() |
IHeatRegistry |
getHeatRegistry() |
IPneumaticHelmetRegistry |
getHelmetRegistry() |
static PneumaticCraftAPIHandler |
getInstance() |
IItemRegistry |
getItemRegistry() |
int |
getProtectingSecurityStations(net.minecraft.entity.player.PlayerEntity player,
net.minecraft.util.math.BlockPos pos)
Returns the number of Security Stations that disallow interaction with the given coordinate for the given
player.
|
int |
getProtectingSecurityStations(net.minecraft.entity.player.PlayerEntity player,
net.minecraft.util.math.BlockPos pos,
boolean showRangeLines)
Returns the number of Security Stations that disallow interaction with the given coordinate for the given
player.
|
IPneumaticRecipeRegistry |
getRecipeRegistry() |
ISensorRegistry |
getSensorRegistry() |
IWrenchRegistry |
getWrenchRegistry() |
void |
registerPlayerMatcher(net.minecraft.util.ResourceLocation id,
IPlayerMatcher.MatcherFactory<?> factory)
Register a custom player matcher object.
|
void |
registerXPFluid(FluidIngredient tag,
int liquidToPointRatio)
Register a fluid ingredient that represents liquid XP.
|
void |
registerXPFluid(net.minecraft.fluid.Fluid fluid,
int liquidToPointRatio)
Deprecated.
|
net.minecraft.util.ResourceLocation |
RL(java.lang.String path)
Convenience method to get a resource location in PneumaticCraft: Repressurized's namespace.
|
void |
syncGlobalVariable(net.minecraft.entity.player.ServerPlayerEntity player,
java.lang.String varName)
Sync a global variable from server to client for the given player.
|
public static PneumaticCraftAPIHandler getInstance()
public IPneumaticRecipeRegistry getRecipeRegistry()
getRecipeRegistry in interface PneumaticRegistry.IPneumaticCraftInterfacepublic IAirHandlerMachineFactory getAirHandlerMachineFactory()
getAirHandlerMachineFactory in interface PneumaticRegistry.IPneumaticCraftInterfacepublic IPneumaticHelmetRegistry getHelmetRegistry()
getHelmetRegistry in interface PneumaticRegistry.IPneumaticCraftInterfacepublic IDroneRegistry getDroneRegistry()
getDroneRegistry in interface PneumaticRegistry.IPneumaticCraftInterfacepublic IHeatRegistry getHeatRegistry()
getHeatRegistry in interface PneumaticRegistry.IPneumaticCraftInterfacepublic int getProtectingSecurityStations(net.minecraft.entity.player.PlayerEntity player,
net.minecraft.util.math.BlockPos pos,
boolean showRangeLines)
PneumaticRegistry.IPneumaticCraftInterfacegetProtectingSecurityStations in interface PneumaticRegistry.IPneumaticCraftInterfaceplayer - the player who is trying to access the blockpos - blockpos of the block being testedshowRangeLines - this is ignored and will disappear in a future releasepublic int getProtectingSecurityStations(net.minecraft.entity.player.PlayerEntity player,
net.minecraft.util.math.BlockPos pos)
PneumaticRegistry.IPneumaticCraftInterfacegetProtectingSecurityStations in interface PneumaticRegistry.IPneumaticCraftInterfaceplayer - the player who is trying to access the blockpos - blockpos of the block being tested@Deprecated
public void registerXPFluid(net.minecraft.fluid.Fluid fluid,
int liquidToPointRatio)
PneumaticRegistry.IPneumaticCraftInterfacePneumaticRegistry.IPneumaticCraftInterface.registerXPFluid(FluidIngredient, int).registerXPFluid in interface PneumaticRegistry.IPneumaticCraftInterfacefluid - the fluid to registerliquidToPointRatio - the amount of fluid (in mB) for one XP point; use a value of 0 or less to
unregister this fluidpublic void registerXPFluid(FluidIngredient tag, int liquidToPointRatio)
PneumaticRegistry.IPneumaticCraftInterfaceregisterXPFluid in interface PneumaticRegistry.IPneumaticCraftInterfacetag - the fluid tag to register; all fluids in this tag will have the given XP valueliquidToPointRatio - the amount of fluid (in mB) for one XP point; use a value of 0 or less to
unregister all fluids matching this fluid ingredientpublic void syncGlobalVariable(net.minecraft.entity.player.ServerPlayerEntity player,
java.lang.String varName)
PneumaticRegistry.IPneumaticCraftInterfaceIPositionProvider.syncVariables(ServerPlayerEntity, ItemStack)syncGlobalVariable in interface PneumaticRegistry.IPneumaticCraftInterfaceplayer - the player to sync tovarName - the global variable name (with or without the leading '#')public void registerPlayerMatcher(net.minecraft.util.ResourceLocation id,
IPlayerMatcher.MatcherFactory<?> factory)
PneumaticRegistry.IPneumaticCraftInterfaceFMLCommonSetupEvent handler. Note that matchers should be
able to run on both client and server.registerPlayerMatcher in interface PneumaticRegistry.IPneumaticCraftInterfaceid - matcher ID, can be used as a key in recipe JSON'sfactory - a factory object used to create instances of this matcher from JSON or a packet bufferpublic IClientRegistry getGuiRegistry()
getGuiRegistry in interface PneumaticRegistry.IPneumaticCraftInterfacepublic ISensorRegistry getSensorRegistry()
getSensorRegistry in interface PneumaticRegistry.IPneumaticCraftInterfacepublic IItemRegistry getItemRegistry()
getItemRegistry in interface PneumaticRegistry.IPneumaticCraftInterfacepublic IFuelRegistry getFuelRegistry()
getFuelRegistry in interface PneumaticRegistry.IPneumaticCraftInterfacepublic IWrenchRegistry getWrenchRegistry()
getWrenchRegistry in interface PneumaticRegistry.IPneumaticCraftInterfacepublic net.minecraft.util.ResourceLocation RL(java.lang.String path)
PneumaticRegistry.IPneumaticCraftInterfaceRL in interface PneumaticRegistry.IPneumaticCraftInterfacepath - a pathpublic net.minecraftforge.items.IItemHandler deserializeSmartChest(net.minecraft.nbt.CompoundNBT tag)
PneumaticRegistry.IPneumaticCraftInterfacedeserializeSmartChest in interface PneumaticRegistry.IPneumaticCraftInterfacetag - NBT to be deserialized, previously serialized from a Smart Chestpublic void forceClientShapeRecalculation(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos)
PneumaticRegistry.IPneumaticCraftInterfaceThis is a bit of a kludge, but necessary since blocks do not normally get signalled about neighbour changes on the client, which is needed for blocks such as Pressure Tubes to recalculate their cached block shapes.
forceClientShapeRecalculation in interface PneumaticRegistry.IPneumaticCraftInterfaceworld - the worldpos - the position of the block that has been changed or removed