Class TntBlock

java.lang.Object
net.minecraft.block.Block
net.minecraft.block.TntBlock

public class TntBlock
extends Block
Mappings:
Namespace Name
official ake
intermediary net/minecraft/class_326
named net/minecraft/block/TntBlock
  • Field Details

    • EXPLODE

      public static final BooleanProperty EXPLODE
      Mappings:
      Namespace Name Mixin selector
      official a Lake;a:Lamk;
      intermediary field_1275 Lnet/minecraft/class_326;field_1275:Lnet/minecraft/class_388;
      named EXPLODE Lnet/minecraft/block/TntBlock;EXPLODE:Lnet/minecraft/state/property/BooleanProperty;
  • Constructor Details

    • TntBlock

      public TntBlock()
  • Method Details

    • onCreation

      public void onCreation​(World world, BlockPos pos, BlockState state)
      Runs when the block is placed (by a player or enderman).
      Overrides:
      onCreation in class Block
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      state - The block's BlockState
      Mappings:
      Namespace Name Mixin selector
      official c Lafh;c(Ladm;Lcj;Lalz;)V
      intermediary method_703 Lnet/minecraft/class_160;method_703(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)V
      named onCreation Lnet/minecraft/block/Block;onCreation(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
    • neighborUpdate

      public void neighborUpdate​(World world, BlockPos pos, BlockState state, Block block)
      Runs when its adjacent blocks are updated. It will also run when the block is placed or removed as Air is being updated.
      Overrides:
      neighborUpdate in class Block
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      state - The block's BlockState
      block - The adjacent Block that updated the current block
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;Lalz;Lafh;)V
      intermediary method_648 Lnet/minecraft/class_160;method_648(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_160;)V
      named neighborUpdate Lnet/minecraft/block/Block;neighborUpdate(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/Block;)V
    • onDestroyedByExplosion

      public void onDestroyedByExplosion​(World world, BlockPos pos, Explosion explosion)
      Overrides:
      onDestroyedByExplosion in class Block
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;Ladi;)V
      intermediary method_644 Lnet/minecraft/class_160;method_644(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_93;)V
      named onDestroyedByExplosion Lnet/minecraft/block/Block;onDestroyedByExplosion(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/world/explosion/Explosion;)V
    • onBreakByPlayer

      public void onBreakByPlayer​(World world, BlockPos pos, BlockState state)
      Runs when the block is broken by the player
      Overrides:
      onBreakByPlayer in class Block
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      state - The block's BlockState
      Mappings:
      Namespace Name Mixin selector
      official d Lafh;d(Ladm;Lcj;Lalz;)V
      intermediary method_712 Lnet/minecraft/class_160;method_712(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;)V
      named onBreakByPlayer Lnet/minecraft/block/Block;onBreakByPlayer(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
    • method_1034

      public void method_1034​(World world, BlockPos blockPos, BlockState blockState, LivingEntity livingEntity)
      Mappings:
      Namespace Name Mixin selector
      official a Lake;a(Ladm;Lcj;Lalz;Lpr;)V
      intermediary method_1034 Lnet/minecraft/class_326;method_1034(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_1752;)V
      named method_1034 Lnet/minecraft/block/TntBlock;method_1034(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/LivingEntity;)V
    • onUse

      public boolean onUse​(World world, BlockPos pos, BlockState state, PlayerEntity player, Direction direction, float float2, float float3, float float4)
      Runs when the block is used, i.e. right clicked in most cases. It is similar to the same method in Item, but this method is called only when the player uses it when the block is placed, not when the player is holding the BlockItem.
      Overrides:
      onUse in class Block
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      state - The block's BlockState
      player - The player who used the block
      direction - The direction that the block is facing
      Returns:
      Whether the action is succesful
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;Lalz;Lwn;Lcq;FFF)Z
      intermediary method_654 Lnet/minecraft/class_160;method_654(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_1963;Lnet/minecraft/class_1383;FFF)Z
      named onUse Lnet/minecraft/block/Block;onUse(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/math/Direction;FFF)Z
    • onEntityCollision

      public void onEntityCollision​(World world, BlockPos pos, BlockState state, Entity entity)
      Runs every time an entity collides with the block
      Overrides:
      onEntityCollision in class Block
      Parameters:
      world - The world that the block is placed in
      pos - The block's position
      state - The block's BlockState
      entity - The entity that collided with the block
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladm;Lcj;Lalz;Lpk;)V
      intermediary method_651 Lnet/minecraft/class_160;method_651(Lnet/minecraft/class_99;Lnet/minecraft/class_1372;Lnet/minecraft/class_376;Lnet/minecraft/class_1745;)V
      named onEntityCollision Lnet/minecraft/block/Block;onEntityCollision(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/Entity;)V
    • shouldDropItemsOnExplosion

      public boolean shouldDropItemsOnExplosion​(Explosion explosion)
      Returns whether the block should drop as an Item during an explosion.
      Overrides:
      shouldDropItemsOnExplosion in class Block
      Parameters:
      explosion - The explosion that caused the block to break
      Returns:
      Whether the block should drop as an item during an explosion
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Ladi;)Z
      intermediary method_641 Lnet/minecraft/class_160;method_641(Lnet/minecraft/class_93;)Z
      named shouldDropItemsOnExplosion Lnet/minecraft/block/Block;shouldDropItemsOnExplosion(Lnet/minecraft/world/explosion/Explosion;)Z
    • stateFromData

      public BlockState stateFromData​(int data)
      Returns a blockstate of the current block from it's id
      Overrides:
      stateFromData in class Block
      Parameters:
      data - The Blockstate's associated data value
      Returns:
      The Default state
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(I)Lalz;
      intermediary method_637 Lnet/minecraft/class_160;method_637(I)Lnet/minecraft/class_376;
      named stateFromData Lnet/minecraft/block/Block;stateFromData(I)Lnet/minecraft/block/BlockState;
    • getData

      public int getData​(BlockState state)
      Returns the data value for a blockstate Throws an IllegalArmumentException as this method does not work
      Overrides:
      getData in class Block
      Parameters:
      state - The Blockstate
      Returns:
      Zero
      Mappings:
      Namespace Name Mixin selector
      official c Lafh;c(Lalz;)I
      intermediary method_706 Lnet/minecraft/class_160;method_706(Lnet/minecraft/class_376;)I
      named getData Lnet/minecraft/block/Block;getData(Lnet/minecraft/block/BlockState;)I
    • appendProperties

      protected StateManager appendProperties()
      Returns a new state manager with a property array.
      Overrides:
      appendProperties in class Block
      Returns:
      New state manager
      Mappings:
      Namespace Name Mixin selector
      official e Lafh;e()Lama;
      intermediary method_714 Lnet/minecraft/class_160;method_714()Lnet/minecraft/class_378;
      named appendProperties Lnet/minecraft/block/Block;appendProperties()Lnet/minecraft/state/StateManager;