提供: Minecraft Modding Wiki
この編集を取り消せます。
下記の差分を確認して、本当に取り消していいか検証してください。よろしければ変更を保存して取り消しを完了してください。
最新版 | 編集中の文章 | ||
1行目: | 1行目: | ||
Block.javaのメソッド一覧(1.2.5) | Block.javaのメソッド一覧(1.2.5) | ||
− | == | + | ==setRequiresSelfNotify== |
;宣言 | ;宣言 | ||
− | :<source lang="java">protected | + | :<source lang="java">protected Block setRequiresSelfNotify()</source> |
;解説 | ;解説 | ||
− | : | + | : |
− | |||
− | == | + | ==initializeBlock== |
;宣言 | ;宣言 | ||
− | :<source lang="java">protected | + | :<source lang="java">protected void initializeBlock()</source> |
;解説 | ;解説 | ||
− | : | + | :全てのブロックが読み込まれた後に呼び出される |
− | |||
==setStepSound== | ==setStepSound== | ||
20行目: | 18行目: | ||
;解説 | ;解説 | ||
:ブロックの上を歩いた時の音を設定する | :ブロックの上を歩いた時の音を設定する | ||
− | |||
;StepSound | ;StepSound | ||
設定値 //既存の音 | 設定値 //既存の音 | ||
30行目: | 27行目: | ||
soundClothFootstep //羊毛 | soundClothFootstep //羊毛 | ||
soundMetalFootstep //鉄ブロック、レール(石と同じで少し高い) | soundMetalFootstep //鉄ブロック、レール(石と同じで少し高い) | ||
− | soundGlassFootstep // | + | soundGlassFootstep //ガラス(石と同じ) |
− | soundPowderFootstep // | + | soundPowderFootstep //レッドストーンパウダー(石と同じ) |
+ | |||
+ | ==setLightOpacity== | ||
+ | ;宣言 | ||
+ | :<source lang="java">protected Block setLightOpacity(int par1)</source> | ||
+ | ;解説 | ||
+ | :ブロックが光を減衰する量を設定する。ブロックを透過した光は、設定したレベル分、減少する。 | ||
+ | :例えば葉っぱブロックは1、水は3に設定されている | ||
==setLightValue== | ==setLightValue== | ||
39行目: | 43行目: | ||
:ブロックの明るさを、0~1で設定する。設定値は(光レベル+1)x0.0625。 | :ブロックの明るさを、0~1で設定する。設定値は(光レベル+1)x0.0625。 | ||
:光度15なら1、14なら0.9375、7なら0.5、1なら0.125。 | :光度15なら1、14なら0.9375、7なら0.5、1なら0.125。 | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==setHardness== | ==setHardness== | ||
55行目: | 50行目: | ||
:ブロックの硬さ(素手で破壊に必要な時間)を設定する。また爆破耐性がpar1x5未満の時は、par1x5に設定する。 | :ブロックの硬さ(素手で破壊に必要な時間)を設定する。また爆破耐性がpar1x5未満の時は、par1x5に設定する。 | ||
:松明は0.0、ネザーラックが0.4、土は0.5、砂岩は0.8、石は1.5、木材は2.0、鉱石は3.0、ダイヤは5.0、黒曜石が50.0、水は100.0 | :松明は0.0、ネザーラックが0.4、土は0.5、砂岩は0.8、石は1.5、木材は2.0、鉱石は3.0、ダイヤは5.0、黒曜石が50.0、水は100.0 | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==setResistance== | ==setResistance== | ||
69行目: | 56行目: | ||
;解説 | ;解説 | ||
:ブロックの爆破耐性を設定する。実際の爆破耐性はpar1x3になる。 | :ブロックの爆破耐性を設定する。実際の爆破耐性はpar1x3になる。 | ||
− | :土は2.5(setHardness(0. | + | :土は2.5(setHardness(0.5F))、木材は15(5F)、石は30(10F)、黒曜石は6000(2000F) |
+ | :岩盤は1800万(6000000F) | ||
:※(カッコ)内は設定値 | :※(カッコ)内は設定値 | ||
:setHardness の後に宣言すれば、硬いが爆破には弱い設定も可能。 | :setHardness の後に宣言すれば、硬いが爆破には弱い設定も可能。 | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==isNormalCube== | ==isNormalCube== | ||
91行目: | 71行目: | ||
:<source lang="java">public boolean renderAsNormalBlock()</source> | :<source lang="java">public boolean renderAsNormalBlock()</source> | ||
;解説 | ;解説 | ||
− | + | :レンダリングが通常のブロックかどうかを返す。 | |
− | + | :ボタン、看板、半ブロックなどはfalseを返す。 | |
− | : | ||
− | : | ||
==getBlocksMovement== | ==getBlocksMovement== | ||
100行目: | 78行目: | ||
:<source lang="java">public boolean getBlocksMovement(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)</source> | :<source lang="java">public boolean getBlocksMovement(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)</source> | ||
;解説 | ;解説 | ||
− | + | :ブロックが移動可能かどうかを返す?(ピストン?) | |
− | : | ||
− | |||
==getRenderType== | ==getRenderType== | ||
108行目: | 84行目: | ||
:<source lang="java">public int getRenderType()</source> | :<source lang="java">public int getRenderType()</source> | ||
;解説 | ;解説 | ||
− | : | + | :レンダリングタイプを返す(#型、X型など) |
− | + | :0:通常ブロック 1:花 2:松明 3:炎 4:液体 5:レッドストーンパウダー 6:小麦 7:ドア | |
− | |||
− | :0:通常ブロック 1:花 2:松明 3:炎 4: | ||
:8:はしご 9:レール 10:階段 11:フェンス 12:レバー 13:サボテン 14:ベッド 15:リピーター | :8:はしご 9:レール 10:階段 11:フェンス 12:レバー 13:サボテン 14:ベッド 15:リピーター | ||
:16:ピストン元 17:ピストン先 18:窓ガラス 19:スイカの苗 20:ツタ 21:フェンスゲート 22:チェスト | :16:ピストン元 17:ピストン先 18:窓ガラス 19:スイカの苗 20:ツタ 21:フェンスゲート 22:チェスト | ||
:23:ハス 24:大釜 25:ポーション台 26:エンドポータルフレーム 27:ドラゴンエッグ | :23:ハス 24:大釜 25:ポーション台 26:エンドポータルフレーム 27:ドラゴンエッグ | ||
+ | |||
+ | ==setBlockUnbreakable== | ||
+ | ;宣言 | ||
+ | :<source lang="java">protected Block setBlockUnbreakable()</source> | ||
+ | ;解説 | ||
+ | :ブロックを破壊不可能に設定する | ||
==getHardness== | ==getHardness== | ||
126行目: | 106行目: | ||
:<source lang="java">protected Block setTickRandomly(boolean par1)</source> | :<source lang="java">protected Block setTickRandomly(boolean par1)</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
− | |||
==getTickRandomly== | ==getTickRandomly== | ||
133行目: | 112行目: | ||
:<source lang="java">public boolean getTickRandomly()</source> | :<source lang="java">public boolean getTickRandomly()</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
==hasTileEntity== | ==hasTileEntity== | ||
139行目: | 118行目: | ||
:<source lang="java">public boolean hasTileEntity()</source> | :<source lang="java">public boolean hasTileEntity()</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
==setBlockBounds== | ==setBlockBounds== | ||
151行目: | 130行目: | ||
:<source lang="java">public float getBlockBrightness(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)</source> | :<source lang="java">public float getBlockBrightness(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
− | |||
==getMixedBrightnessForBlock== | ==getMixedBrightnessForBlock== | ||
158行目: | 136行目: | ||
:<source lang="java">public int getMixedBrightnessForBlock(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)</source> | :<source lang="java">public int getMixedBrightnessForBlock(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
==shouldSideBeRendered== | ==shouldSideBeRendered== | ||
;宣言 | ;宣言 | ||
− | :<source lang="java">public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int | + | :<source lang="java">public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)</source> |
;解説 | ;解説 | ||
− | : | + | : |
==isBlockSolid== | ==isBlockSolid== | ||
170行目: | 148行目: | ||
:<source lang="java">public boolean isBlockSolid(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)</source> | :<source lang="java">public boolean isBlockSolid(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
==getBlockTexture== | ==getBlockTexture== | ||
176行目: | 154行目: | ||
:<source lang="java">public int getBlockTexture(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)</source> | :<source lang="java">public int getBlockTexture(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
==getBlockTextureFromSideAndMetadata== | ==getBlockTextureFromSideAndMetadata== | ||
182行目: | 160行目: | ||
:<source lang="java">public int getBlockTextureFromSideAndMetadata(int par1, int par2)</source> | :<source lang="java">public int getBlockTextureFromSideAndMetadata(int par1, int par2)</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
==getBlockTextureFromSide== | ==getBlockTextureFromSide== | ||
188行目: | 166行目: | ||
:<source lang="java">public int getBlockTextureFromSide(int par1)</source> | :<source lang="java">public int getBlockTextureFromSide(int par1)</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
==getSelectedBoundingBoxFromPool== | ==getSelectedBoundingBoxFromPool== | ||
194行目: | 172行目: | ||
:<source lang="java">public AxisAlignedBB getSelectedBoundingBoxFromPool(World par1World, int par2, int par3, int par4)</source> | :<source lang="java">public AxisAlignedBB getSelectedBoundingBoxFromPool(World par1World, int par2, int par3, int par4)</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
− | == | + | ==getCollidingBoundingBoxes== |
;宣言 | ;宣言 | ||
− | :<source lang="java">public | + | :<source lang="java">public void getCollidingBoundingBoxes(World par1World, int par2, int par3, int par4, AxisAlignedBB par5AxisAlignedBB, ArrayList par6ArrayList)</source> |
;解説 | ;解説 | ||
− | : | + | : |
− | == | + | ==getCollisionBoundingBoxFromPool== |
;宣言 | ;宣言 | ||
− | :<source lang="java">public | + | :<source lang="java">public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4)</source> |
;解説 | ;解説 | ||
: | : | ||
212行目: | 190行目: | ||
:<source lang="java">public boolean isOpaqueCube()</source> | :<source lang="java">public boolean isOpaqueCube()</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
==canCollideCheck== | ==canCollideCheck== | ||
230行目: | 208行目: | ||
:<source lang="java">public void updateTick(World world, int i, int j, int k, Random random)</source> | :<source lang="java">public void updateTick(World world, int i, int j, int k, Random random)</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
==randomDisplayTick== | ==randomDisplayTick== | ||
236行目: | 214行目: | ||
:<source lang="java">public void randomDisplayTick(World world, int i, int j, int k, Random random)</source> | :<source lang="java">public void randomDisplayTick(World world, int i, int j, int k, Random random)</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
==onBlockDestroyedByPlayer== | ==onBlockDestroyedByPlayer== | ||
242行目: | 220行目: | ||
:<source lang="java">public void onBlockDestroyedByPlayer(World world, int i, int j, int k, int l)</source> | :<source lang="java">public void onBlockDestroyedByPlayer(World world, int i, int j, int k, int l)</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
==onNeighborBlockChange== | ==onNeighborBlockChange== | ||
248行目: | 226行目: | ||
:<source lang="java">public void onNeighborBlockChange(World world, int i, int j, int k, int l)</source> | :<source lang="java">public void onNeighborBlockChange(World world, int i, int j, int k, int l)</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
==tickRate== | ==tickRate== | ||
254行目: | 232行目: | ||
:<source lang="java">public int tickRate()</source> | :<source lang="java">public int tickRate()</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
==onBlockAdded== | ==onBlockAdded== | ||
266行目: | 244行目: | ||
:<source lang="java">public void onBlockRemoval(World world, int i, int j, int k)</source> | :<source lang="java">public void onBlockRemoval(World world, int i, int j, int k)</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
− | == | + | ==quantityDropped== |
;宣言 | ;宣言 | ||
− | :<source lang="java">public int | + | :<source lang="java">public int quantityDropped(Random par1Random)</source> |
;解説 | ;解説 | ||
− | : | + | : |
− | == | + | ==idDropped== |
;宣言 | ;宣言 | ||
− | :<source lang="java"> | + | :<source lang="java">public int idDropped(int par1, Random par2Random, int par3)</source> |
;解説 | ;解説 | ||
− | : | + | : |
− | == | + | ==blockStrength== |
;宣言 | ;宣言 | ||
− | :<source lang="java">public | + | :<source lang="java">public float blockStrength(EntityPlayer par1EntityPlayer)</source> |
;解説 | ;解説 | ||
− | : | + | : |
− | == | + | ==dropBlockAsItem== |
;宣言 | ;宣言 | ||
− | :<source lang="java">public | + | :<source lang="java">public final void dropBlockAsItem(World par1World, int par2, int par3, int par4, int par5, int par6)</source> |
;解説 | ;解説 | ||
− | : | + | : |
− | |||
− | |||
− | |||
==dropBlockAsItemWithChance== | ==dropBlockAsItemWithChance== | ||
299行目: | 274行目: | ||
:<source lang="java">public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7)</source> | :<source lang="java">public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7)</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
==dropBlockAsItem_do== | ==dropBlockAsItem_do== | ||
305行目: | 280行目: | ||
:<source lang="java">protected void dropBlockAsItem_do(World par1World, int par2, int par3, int par4, ItemStack par5ItemStack)</source> | :<source lang="java">protected void dropBlockAsItem_do(World par1World, int par2, int par3, int par4, ItemStack par5ItemStack)</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
+ | |||
+ | ==damageDropped== | ||
+ | ;宣言 | ||
+ | :<source lang="java">protected int damageDropped(int par1)</source> | ||
+ | ;解説 | ||
+ | : | ||
==getExplosionResistance== | ==getExplosionResistance== | ||
311行目: | 292行目: | ||
:<source lang="java">public float getExplosionResistance(Entity par1Entity)</source> | :<source lang="java">public float getExplosionResistance(Entity par1Entity)</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
==collisionRayTrace== | ==collisionRayTrace== | ||
323行目: | 304行目: | ||
:<source lang="java">public void onBlockDestroyedByExplosion(World world, int i, int j, int k)</source> | :<source lang="java">public void onBlockDestroyedByExplosion(World world, int i, int j, int k)</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
==getRenderBlockPass== | ==getRenderBlockPass== | ||
329行目: | 310行目: | ||
:<source lang="java">public int getRenderBlockPass()</source> | :<source lang="java">public int getRenderBlockPass()</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
==canPlaceBlockOnSide== | ==canPlaceBlockOnSide== | ||
335行目: | 316行目: | ||
:<source lang="java">public boolean canPlaceBlockOnSide(World par1World, int par2, int par3, int par4, int par5)</source> | :<source lang="java">public boolean canPlaceBlockOnSide(World par1World, int par2, int par3, int par4, int par5)</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
==canPlaceBlockAt== | ==canPlaceBlockAt== | ||
341行目: | 322行目: | ||
:<source lang="java">public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4)</source> | :<source lang="java">public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4)</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==blockActivated== | ==blockActivated== | ||
353行目: | 328行目: | ||
:<source lang="java">public boolean blockActivated(World par1World, int par2, int par3, int i, EntityPlayer entityplayer)</source> | :<source lang="java">public boolean blockActivated(World par1World, int par2, int par3, int i, EntityPlayer entityplayer)</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
==onEntityWalking== | ==onEntityWalking== | ||
359行目: | 334行目: | ||
:<source lang="java">public void onEntityWalking(World world, int i, int j, int k, Entity entity)</source> | :<source lang="java">public void onEntityWalking(World world, int i, int j, int k, Entity entity)</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
==onBlockPlaced== | ==onBlockPlaced== | ||
365行目: | 340行目: | ||
:<source lang="java">public void onBlockPlaced(World world, int i, int j, int k, int l)</source> | :<source lang="java">public void onBlockPlaced(World world, int i, int j, int k, int l)</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
+ | |||
+ | ==onBlockClicked== | ||
+ | ;宣言 | ||
+ | :<source lang="java">public void onBlockClicked(World world, int i, int j, int k, EntityPlayer entityplayer)</source> | ||
+ | ;解説 | ||
+ | : | ||
==velocityToAddToEntity== | ==velocityToAddToEntity== | ||
383行目: | 364行目: | ||
:<source lang="java">public int getBlockColor()</source> | :<source lang="java">public int getBlockColor()</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
==getRenderColor== | ==getRenderColor== | ||
389行目: | 370行目: | ||
:<source lang="java">public int getRenderColor(int par1)</source> | :<source lang="java">public int getRenderColor(int par1)</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
==colorMultiplier== | ==colorMultiplier== | ||
395行目: | 376行目: | ||
:<source lang="java">public int colorMultiplier(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)</source> | :<source lang="java">public int colorMultiplier(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
==isPoweringTo== | ==isPoweringTo== | ||
407行目: | 388行目: | ||
:<source lang="java">public boolean canProvidePower()</source> | :<source lang="java">public boolean canProvidePower()</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
==onEntityCollidedWithBlock== | ==onEntityCollidedWithBlock== | ||
413行目: | 394行目: | ||
:<source lang="java">public void onEntityCollidedWithBlock(World world, int i, int j, int k, Entity entity)</source> | :<source lang="java">public void onEntityCollidedWithBlock(World world, int i, int j, int k, Entity entity)</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
==isIndirectlyPoweringTo== | ==isIndirectlyPoweringTo== | ||
431行目: | 412行目: | ||
:<source lang="java">public void harvestBlock(World par1World, EntityPlayer par2EntityPlayer, int par3, int par4, int par5, int par6)</source> | :<source lang="java">public void harvestBlock(World par1World, EntityPlayer par2EntityPlayer, int par3, int par4, int par5, int par6)</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
− | == | + | ==func_50074_q== |
;宣言 | ;宣言 | ||
:<source lang="java">protected boolean func_50074_q()</source> | :<source lang="java">protected boolean func_50074_q()</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
− | |||
==createStackedBlock== | ==createStackedBlock== | ||
444行目: | 424行目: | ||
:<source lang="java">protected ItemStack createStackedBlock(int par1)</source> | :<source lang="java">protected ItemStack createStackedBlock(int par1)</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
==quantityDroppedWithBonus== | ==quantityDroppedWithBonus== | ||
450行目: | 430行目: | ||
:<source lang="java">public int quantityDroppedWithBonus(int par1, Random par2Random)</source> | :<source lang="java">public int quantityDroppedWithBonus(int par1, Random par2Random)</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
− | |||
− | |||
==canBlockStay== | ==canBlockStay== | ||
466行目: | 444行目: | ||
: | : | ||
− | == | + | ==setBlockName== |
;宣言 | ;宣言 | ||
− | :<source lang="java">public String | + | :<source lang="java">public Block setBlockName(String par1Str)</source> |
;解説 | ;解説 | ||
− | : | + | : |
==translateBlockName== | ==translateBlockName== | ||
476行目: | 454行目: | ||
:<source lang="java">public String translateBlockName()</source> | :<source lang="java">public String translateBlockName()</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
+ | |||
+ | ==getBlockName== | ||
+ | ;宣言 | ||
+ | :<source lang="java">public String getBlockName()</source> | ||
+ | ;解説 | ||
+ | : | ||
==powerBlock== | ==powerBlock== | ||
500行目: | 484行目: | ||
:<source lang="java">public int getMobilityFlag()</source> | :<source lang="java">public int getMobilityFlag()</source> | ||
;解説 | ;解説 | ||
− | : | + | : |
==getAmbientOcclusionLightValue== | ==getAmbientOcclusionLightValue== | ||
512行目: | 496行目: | ||
:<source lang="java">public void onFallenUpon(World world, int i, int j, int k, Entity entity, float f)</source> | :<source lang="java">public void onFallenUpon(World world, int i, int j, int k, Entity entity, float f)</source> | ||
;解説 | ;解説 | ||
− | : | + | : |