Package net.minecraft.block
Class BlockDispenser
- java.lang.Object
-
- net.zxmushroom63.plugins.BaseData
-
- net.zxmushroom63.plugins.PluginData
-
- net.minecraft.block.Block
-
- net.minecraft.block.BlockContainer
-
- net.minecraft.block.BlockDispenser
-
- All Implemented Interfaces:
ITileEntityProvider
,org.teavm.jso.JSObject
- Direct Known Subclasses:
BlockDropper
public class BlockDispenser extends BlockContainer
+ This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code. Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!" Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team EaglercraftX 1.8 patch files are (c) 2022-2023 LAX1DUDE. All Rights Reserved. WITH THE EXCEPTION OF PATCH FILES, MINIFIED JAVASCRIPT, AND ALL FILES NORMALLY FOUND IN AN UNMODIFIED MINECRAFT RESOURCE PACK, YOU ARE NOT ALLOWED TO SHARE, DISTRIBUTE, OR REPURPOSE ANY FILE USED BY OR PRODUCED BY THE SOFTWARE IN THIS REPOSITORY WITHOUT PRIOR PERMISSION FROM THE PROJECT AUTHOR. NOT FOR COMMERCIAL OR MALICIOUS USE (please read the 'LICENSE' file this repo's root directory for more info)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.EnumOffsetType, Block.SoundType
-
Nested classes/interfaces inherited from class net.zxmushroom63.plugins.BaseData
BaseData.BooleanCallback, BaseData.BooleanCallbackArr, BaseData.DataBooleanCallback, BaseData.DataBooleanCallbackArr, BaseData.DataDoubleCallback, BaseData.DataDoubleCallbackArr, BaseData.DataFloatCallback, BaseData.DataFloatCallbackArr, BaseData.DataIntCallback, BaseData.DataIntCallbackArr, BaseData.DataObjectCallback, BaseData.DataObjectCallbackArr, BaseData.DataStringCallback, BaseData.DataStringCallbackArr, BaseData.DataVoidCallback, BaseData.DoubleCallback, BaseData.DoubleCallbackArr, BaseData.FloatCallback, BaseData.FloatCallbackArr, BaseData.IntCallback, BaseData.IntCallbackArr, BaseData.ObjectCallback, BaseData.ObjectCallbackArr, BaseData.StringCallback, BaseData.StringCallbackArr, BaseData.VoidCallback
-
-
Field Summary
Fields Modifier and Type Field Description static RegistryDefaulted<Item,IBehaviorDispenseItem>
dispenseBehaviorRegistry
static PropertyDirection
FACING
protected EaglercraftRandom
rand
static PropertyBool
TRIGGERED
-
Fields inherited from class net.minecraft.block.Block
BLOCK_STATE_IDS, blockHardness, blockMaterial, blockParticleGravity, blockRegistry, blockResistance, blockState, enableStats, field_181083_K, forceRender, fullBlock, isBlockContainer, lightOpacity, lightValue, maxX, maxY, maxZ, minX, minY, minZ, needsRandomTick, noRender, SLIME_SOUND, slipperiness, soundTypeAnvil, soundTypeCloth, soundTypeGlass, soundTypeGrass, soundTypeGravel, soundTypeLadder, soundTypeMetal, soundTypePiston, soundTypeSand, soundTypeSnow, soundTypeStone, soundTypeWood, stepSound, translucent, useNeighborBrightness
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BlockDispenser()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
breakBlock(World world, BlockPos blockpos, IBlockState iblockstate)
protected BlockState
createBlockState()
TileEntity
createNewTileEntity(World var1, int var2)
+ Returns a new instance of a block's tile entity class.protected void
dispense(World worldIn, BlockPos pos)
protected IBehaviorDispenseItem
getBehavior(ItemStack stack)
int
getComparatorInputOverride(World world, BlockPos blockpos)
static IPosition
getDispensePosition(IBlockSource coords)
+ Get the position where the dispenser at the given Coordinates should dispense to.static EnumFacing
getFacing(int meta)
+ Get the facing of a dispenser with the given metadataint
getMetaFromState(IBlockState iblockstate)
+ Convert the BlockState into the correct metadata valueint
getRenderType()
+ The type of render function called.IBlockState
getStateForEntityRender(IBlockState var1)
+ Possibly modify the given BlockState before rendering it on an Entity (Minecarts, Endermen, ...)IBlockState
getStateFromMeta(int i)
+ Convert the given metadata into a BlockState for this Blockboolean
hasComparatorInputOverride()
boolean
onBlockActivated(World world, BlockPos blockpos, IBlockState var3, EntityPlayer entityplayer, EnumFacing var5, float var6, float var7, float var8)
IBlockState
onBlockPlaced(World world, BlockPos blockpos, EnumFacing var3, float var4, float var5, float var6, int var7, EntityLivingBase entitylivingbase)
+ Called by ItemBlocks just before a block is actually set in the world, to allow for adjustments to the IBlockstatevoid
onBlockPlacedBy(World world, BlockPos blockpos, IBlockState iblockstate, EntityLivingBase entitylivingbase, ItemStack itemstack)
+ Called by ItemBlocks after a block is set in the world, to allow post-place logicvoid
onNeighborBlockChange(World world, BlockPos blockpos, IBlockState iblockstate, Block var4)
+ Called when a neighboring block changes.int
tickRate(World var1)
+ How many world ticks before ticking-
Methods inherited from class net.minecraft.block.BlockContainer
func_181086_a, func_181087_e, onBlockEventReceived
-
Methods inherited from class net.minecraft.block.Block
addCollisionBoxesToList, bootstrapStates, canCollideCheck, canDropFromExplosion, canPlaceBlockAt, canPlaceBlockOnSide, canProvidePower, canReplace, canSilkHarvest, collisionRayTrace, colorMultiplier, colorMultiplier, createStackedBlock, damageDropped, disableStats, dropBlockAsItem, dropBlockAsItemWithChance, dropXpOnBlockBreak, fillWithRain, func_181623_g, getActualState, getAmbientOcclusionLightValue, getBlockBoundsMaxX, getBlockBoundsMaxY, getBlockBoundsMaxZ, getBlockBoundsMinX, getBlockBoundsMinY, getBlockBoundsMinZ, getBlockById, getBlockColor, getBlockFromItem, getBlockFromName, getBlockHardness, getBlockLayer, getBlockState, getCollisionBoundingBox, getCreativeTabToDisplayOn, getDamageValue, getDefaultState, getEnableStats, getExplosionResistance, getIdFromBlock, getItem, getItemDropped, getLightOpacity, getLightValue, getLocalizedName, getMapColor, getMaterial, getMixedBrightnessForBlock, getMobilityFlag, getOffsetType, getPlayerRelativeBlockHardness, getRenderColor, getSelectedBoundingBox, getStateById, getStateId, getStrongPower, getSubBlocks, getTickRandomly, getUnlocalizedName, getUseNeighborBrightness, getWeakPower, harvestBlock, hasTileEntity, isAssociatedBlock, isBlockNormalCube, isBlockSolid, isCollidable, isEqualTo, isFlowerPot, isFullBlock, isFullCube, isNormalCube, isOpaqueCube, isPassable, isReplaceable, isTranslucent, isVisuallyOpaque, loadPluginData, makePluginData, modifyAcceleration, onBlockAdded, onBlockClicked, onBlockDestroyedByExplosion, onBlockDestroyedByPlayer, onBlockHarvested, onEntityCollidedWithBlock, onEntityCollidedWithBlock, onFallenUpon, onLanded, quantityDropped, quantityDroppedWithBonus, randomDisplayTick, randomTick, registerBlocks, requiresUpdates, setBlockBounds, setBlockBoundsBasedOnState, setBlockBoundsForItemRender, setBlockUnbreakable, setCreativeTab, setDefaultState, setHardness, setLightLevel, setLightOpacity, setResistance, setStepSound, setTickRandomly, setUnlocalizedName, shouldSideBeRendered, spawnAsEntity, toString, updateTick
-
Methods inherited from class net.zxmushroom63.plugins.BaseData
execFuncBaseData, execFuncObject, execFuncString, getBaseData, getBaseDataArr, getBoolean, getBooleanArr, getByte, getByteArr, getChar, getCharArr, getDouble, getDoubleArr, getFloat, getFloatArr, getInt, getIntArr, getObject, getObjectArr, getShort, getShortArr, getString, getStringArr, has, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, setCallbackBoolean, setCallbackBooleanArr, setCallbackBooleanArrWithDataArg, setCallbackBooleanWithDataArg, setCallbackDouble, setCallbackDoubleArr, setCallbackDoubleArrWithDataArg, setCallbackDoubleWithDataArg, setCallbackFloat, setCallbackFloatArr, setCallbackFloatArrWithDataArg, setCallbackFloatWithDataArg, setCallbackInt, setCallbackIntArr, setCallbackIntArrWithDataArg, setCallbackIntWithDataArg, setCallbackObject, setCallbackObjectArr, setCallbackObjectArrWithDataArg, setCallbackObjectWithDataArg, setCallbackString, setCallbackStringArr, setCallbackStringArrWithDataArg, setCallbackStringWithDataArg, setCallbackVoid, setCallbackVoidWithDataArg, setNull
-
-
-
-
Field Detail
-
FACING
public static final PropertyDirection FACING
-
TRIGGERED
public static final PropertyBool TRIGGERED
-
dispenseBehaviorRegistry
public static final RegistryDefaulted<Item,IBehaviorDispenseItem> dispenseBehaviorRegistry
-
rand
protected EaglercraftRandom rand
-
-
Method Detail
-
tickRate
public int tickRate(World var1)
+ How many world ticks before ticking
-
onBlockActivated
public boolean onBlockActivated(World world, BlockPos blockpos, IBlockState var3, EntityPlayer entityplayer, EnumFacing var5, float var6, float var7, float var8)
- Overrides:
onBlockActivated
in classBlock
-
getBehavior
protected IBehaviorDispenseItem getBehavior(ItemStack stack)
-
onNeighborBlockChange
public void onNeighborBlockChange(World world, BlockPos blockpos, IBlockState iblockstate, Block var4)
+ Called when a neighboring block changes.- Overrides:
onNeighborBlockChange
in classBlock
-
createNewTileEntity
public TileEntity createNewTileEntity(World var1, int var2)
+ Returns a new instance of a block's tile entity class. Called on placing the block.
-
onBlockPlaced
public IBlockState onBlockPlaced(World world, BlockPos blockpos, EnumFacing var3, float var4, float var5, float var6, int var7, EntityLivingBase entitylivingbase)
+ Called by ItemBlocks just before a block is actually set in the world, to allow for adjustments to the IBlockstate- Overrides:
onBlockPlaced
in classBlock
-
onBlockPlacedBy
public void onBlockPlacedBy(World world, BlockPos blockpos, IBlockState iblockstate, EntityLivingBase entitylivingbase, ItemStack itemstack)
+ Called by ItemBlocks after a block is set in the world, to allow post-place logic- Overrides:
onBlockPlacedBy
in classBlock
-
breakBlock
public void breakBlock(World world, BlockPos blockpos, IBlockState iblockstate)
- Overrides:
breakBlock
in classBlockContainer
-
getDispensePosition
public static IPosition getDispensePosition(IBlockSource coords)
+ Get the position where the dispenser at the given Coordinates should dispense to.
-
getFacing
public static EnumFacing getFacing(int meta)
+ Get the facing of a dispenser with the given metadata
-
hasComparatorInputOverride
public boolean hasComparatorInputOverride()
- Overrides:
hasComparatorInputOverride
in classBlock
-
getComparatorInputOverride
public int getComparatorInputOverride(World world, BlockPos blockpos)
- Overrides:
getComparatorInputOverride
in classBlock
-
getRenderType
public int getRenderType()
+ The type of render function called. 3 for standard block models, 2 for TESR's, 1 for liquids, -1 is no render- Overrides:
getRenderType
in classBlockContainer
-
getStateForEntityRender
public IBlockState getStateForEntityRender(IBlockState var1)
+ Possibly modify the given BlockState before rendering it on an Entity (Minecarts, Endermen, ...)- Overrides:
getStateForEntityRender
in classBlock
-
getStateFromMeta
public IBlockState getStateFromMeta(int i)
+ Convert the given metadata into a BlockState for this Block- Overrides:
getStateFromMeta
in classBlock
-
getMetaFromState
public int getMetaFromState(IBlockState iblockstate)
+ Convert the BlockState into the correct metadata value- Overrides:
getMetaFromState
in classBlock
-
createBlockState
protected BlockState createBlockState()
- Overrides:
createBlockState
in classBlock
-
-