public class GelPortalBlock
extends net.minecraft.block.NetherPortalBlock
net.minecraft.block.Block.RenderSideCacheKey
net.minecraft.block.AbstractBlock.AbstractBlockState, net.minecraft.block.AbstractBlock.IExtendedPositionPredicate<A>, net.minecraft.block.AbstractBlock.IPositionPredicate, net.minecraft.block.AbstractBlock.OffsetType, net.minecraft.block.AbstractBlock.Properties
Constructor and Description |
---|
GelPortalBlock(net.minecraft.block.AbstractBlock.Properties properties,
java.util.function.Function<net.minecraft.world.server.ServerWorld,GelTeleporter> teleporter) |
Modifier and Type | Method and Description |
---|---|
static boolean |
fillPortal(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
GelPortalBlock portal,
java.util.List<net.minecraft.block.Block> allowedBlocks)
Call this to fill the portal when whatever condition you need to fill it
occurs.
|
java.util.function.Supplier<net.minecraft.block.BlockState> |
getFrameBlock()
Gets the state of the frame block for this portal.
|
int |
getMaxTimeInside(net.minecraft.entity.Entity entityIn)
The amount of time that an entity can sit in the portal before teleporting.
|
net.minecraft.client.renderer.texture.TextureAtlasSprite |
getPortalTexture()
Gets the texture for the portal overlay to render with.
|
GelTeleporter |
getTeleporter(net.minecraft.world.server.ServerWorld world)
Returns the the teleporter instance for the world passed.
|
net.minecraft.client.audio.ISound |
getTravelSound()
Gets the sound that plays when the player goes through the portal.
|
net.minecraft.client.audio.ISound |
getTriggerSound()
Gets the sound that plays when the player steps in the portal.
|
void |
onEntityCollision(net.minecraft.block.BlockState state,
net.minecraft.world.World worldIn,
net.minecraft.util.math.BlockPos pos,
net.minecraft.entity.Entity entityIn) |
void |
randomTick(net.minecraft.block.BlockState state,
net.minecraft.world.server.ServerWorld worldIn,
net.minecraft.util.math.BlockPos pos,
java.util.Random random) |
void |
renderPortal(float timeInPortal,
int scaledHeight,
int scaledWidth)
Code to execute when rendering portal texture on the player's screen.
|
net.minecraft.block.BlockState |
updatePostPlacement(net.minecraft.block.BlockState stateIn,
net.minecraft.util.Direction facing,
net.minecraft.block.BlockState facingState,
net.minecraft.world.IWorld worldIn,
net.minecraft.util.math.BlockPos currentPos,
net.minecraft.util.math.BlockPos facingPos) |
animateTick, getItem, getShape, rotate
addInformation, asItem, canDropFromExplosion, cannotAttach, canSpawnInBlock, canSustainPlant, doesSideFillSquare, dropXpOnBlockBreak, fillItemGroup, fillWithRain, getBlockFromItem, getDefaultState, getDrops, getDrops, getExplosionResistance, getHarvestLevel, getHarvestTool, getJumpFactor, getSlipperiness, getSlipperiness, getSoundType, getSpeedFactor, getStateById, getStateContainer, getStateForPlacement, getStateId, getTags, getTranslatedName, getTranslationKey, getValidBlockForPosition, harvestBlock, hasEnoughSolidSide, hasSolidSideOnTop, isIn, isOpaque, isVariableOpacity, makeCuboidShape, matchesBlock, nudgeEntitiesWithNewState, onBlockHarvested, onBlockPlacedBy, onEntityWalk, onExplosionDestroy, onFallenUpon, onLanded, onPlayerDestroy, propagatesSkylightDown, replaceBlock, replaceBlockState, shouldSideBeRendered, spawnAsEntity, spawnDrops, spawnDrops, spawnDrops, ticksRandomly, toString
allowsMovement, canProvidePower, eventReceived, getAmbientOcclusionLightValue, getCollisionShape, getCollisionShape, getComparatorInputOverride, getContainer, getDrops, getFluidState, getLootTable, getMaterialColor, getOffsetType, getOpacity, getPlayerRelativeBlockHardness, getPositionRandom, getPushReaction, getRaytraceShape, getRayTraceShape, getRenderShape, getRenderType, getStrongPower, getWeakPower, hasComparatorInputOverride, isReplaceable, isReplaceable, isSideInvisible, isTileEntityProvider, isTransparent, isValidPosition, mirror, neighborChanged, onBlockActivated, onBlockAdded, onBlockClicked, onProjectileCollision, onReplaced, spawnAdditionalDrops, tick, updateDiagonalNeighbors
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
addDestroyEffects, addHitEffects, addLandingEffects, addRunningEffects, canBeReplacedByLeaves, canBeReplacedByLogs, canConnectRedstone, canCreatureSpawn, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, catchFire, collisionExtendsVertically, createTileEntity, getAiPathNodeType, getBeaconColorMultiplier, getBedDirection, getBedSpawnPosition, getBlock, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFogColor, getLightValue, getPickBlock, getSoundType, getStateAtViewpoint, getToolModifiedState, getWeakChanges, hasTileEntity, isAir, isBed, isBurning, isConduitFrame, isFertile, isFireSource, isFlammable, isLadder, isPortalFrame, isScaffolding, isSlimeBlock, isStickyBlock, isToolEffective, observedNeighborChange, onBlockExploded, onNeighborChange, onPlantGrow, removedByPlayer, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay
public GelPortalBlock(net.minecraft.block.AbstractBlock.Properties properties, java.util.function.Function<net.minecraft.world.server.ServerWorld,GelTeleporter> teleporter)
public void renderPortal(float timeInPortal, int scaledHeight, int scaledWidth)
timeInPortal
- scaledHeight
- scaledWidth
- public net.minecraft.client.renderer.texture.TextureAtlasSprite getPortalTexture()
TextureAtlasSprite
public net.minecraft.client.audio.ISound getTriggerSound()
ISound
public net.minecraft.client.audio.ISound getTravelSound()
ISound
public static boolean fillPortal(net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos, GelPortalBlock portal, java.util.List<net.minecraft.block.Block> allowedBlocks)
world
- pos
- portal
- allowedBlocks
- A list of blocks that are allowed to exist within the
portal frame when trying to light it. IE: A nether portal should
allow fire and an Aether portal should allow water.Boolean
public final GelTeleporter getTeleporter(net.minecraft.world.server.ServerWorld world)
world
- GelTeleporter
public java.util.function.Supplier<net.minecraft.block.BlockState> getFrameBlock()
Supplier
public int getMaxTimeInside(net.minecraft.entity.Entity entityIn)
entityIn
- Integer
public void randomTick(net.minecraft.block.BlockState state, net.minecraft.world.server.ServerWorld worldIn, net.minecraft.util.math.BlockPos pos, java.util.Random random)
randomTick
in class net.minecraft.block.NetherPortalBlock
public net.minecraft.block.BlockState updatePostPlacement(net.minecraft.block.BlockState stateIn, net.minecraft.util.Direction facing, net.minecraft.block.BlockState facingState, net.minecraft.world.IWorld worldIn, net.minecraft.util.math.BlockPos currentPos, net.minecraft.util.math.BlockPos facingPos)
updatePostPlacement
in class net.minecraft.block.NetherPortalBlock
public void onEntityCollision(net.minecraft.block.BlockState state, net.minecraft.world.World worldIn, net.minecraft.util.math.BlockPos pos, net.minecraft.entity.Entity entityIn)
onEntityCollision
in class net.minecraft.block.NetherPortalBlock