public class GelPortalSize
extends java.lang.Object
PortalSize
to work with GelPortalBlock
and
GelTeleporter
. Call isValidSize()
to check if you're in a
portal frame or
trySpawnPortal(IWorld, BlockPos, GelPortalBlock, List)
to attempt to
spawn a portal at the position.Modifier and Type | Field and Description |
---|---|
java.util.List<net.minecraft.block.Block> |
allowedBlocks |
net.minecraft.util.Direction.Axis |
axis |
net.minecraft.util.math.BlockPos |
bottomLeft |
net.minecraft.block.Block |
frame |
int |
height |
net.minecraft.util.Direction |
leftDir |
GelPortalBlock |
portal |
int |
portalBlockCount |
net.minecraft.util.Direction |
rightDir |
int |
width |
net.minecraft.world.IWorld |
world |
Constructor and Description |
---|
GelPortalSize(net.minecraft.world.IWorld world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.util.Direction.Axis axis,
net.minecraft.block.Block frame,
GelPortalBlock portal,
java.util.List<net.minecraft.block.Block> allowedBlocks) |
Modifier and Type | Method and Description |
---|---|
boolean |
hasAllPortals()
Checks if all portal blocks exist within the frame.
|
static boolean |
isPortal(net.minecraft.world.World worldIn,
net.minecraft.util.math.BlockPos pos,
GelPortalBlock portalBlock,
java.util.List<net.minecraft.block.Block> allowedInsideBlocks)
Checks to see if the position is within a portal frame.
|
boolean |
isPortalComplete()
Checks to see if the portal is the right size and isn't missing any portal
blocks.
|
boolean |
isValidSize()
Checks to see if the portal is the right size.
|
void |
placePortalBlocks() |
static boolean |
trySpawnPortal(net.minecraft.world.IWorld worldIn,
net.minecraft.util.math.BlockPos pos,
GelPortalBlock portalBlock,
java.util.List<net.minecraft.block.Block> allowedBlocks)
Attempts to spawn a portal.
|
public final net.minecraft.block.Block frame
public final GelPortalBlock portal
public final net.minecraft.world.IWorld world
public final net.minecraft.util.Direction.Axis axis
public final net.minecraft.util.Direction rightDir
public final net.minecraft.util.Direction leftDir
public int portalBlockCount
@Nullable public net.minecraft.util.math.BlockPos bottomLeft
public int height
public int width
public java.util.List<net.minecraft.block.Block> allowedBlocks
public GelPortalSize(net.minecraft.world.IWorld world, net.minecraft.util.math.BlockPos pos, net.minecraft.util.Direction.Axis axis, net.minecraft.block.Block frame, GelPortalBlock portal, java.util.List<net.minecraft.block.Block> allowedBlocks)
public static boolean trySpawnPortal(net.minecraft.world.IWorld worldIn, net.minecraft.util.math.BlockPos pos, GelPortalBlock portalBlock, java.util.List<net.minecraft.block.Block> allowedBlocks)
worldIn
- pos
- portalBlock
- allowedBlocks
- Boolean
public static boolean isPortal(net.minecraft.world.World worldIn, net.minecraft.util.math.BlockPos pos, GelPortalBlock portalBlock, java.util.List<net.minecraft.block.Block> allowedInsideBlocks)
worldIn
- pos
- portalBlock
- allowedInsideBlocks
- Boolean
public boolean isValidSize()
Boolean
public boolean isPortalComplete()
Boolean
public boolean hasAllPortals()
Boolean
public void placePortalBlocks()