Skip to content

Commit

Permalink
Minor optimisations
Browse files Browse the repository at this point in the history
  • Loading branch information
NeRdTheNed committed Jun 6, 2023
1 parent bc04072 commit 43527ae
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import net.minecraft.block.Block;
import net.minecraft.block.BlockTNT;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.init.Blocks;
Expand All @@ -22,8 +23,8 @@
public abstract class TntBlockMixin extends Block {

// Dummy constructor, I'm not sure if this is how it's supposed to be done or if I'm bad at Mixins.
public TntBlockMixin() {
super(null);
public TntBlockMixin(Material mat) {
super(mat);
}

@Inject(method = "<init>()V", at = @At("RETURN"))
Expand All @@ -39,7 +40,6 @@ public Item getItemDropped(IBlockState state, Random rand, int fortune) {
}

// More Mixin hacks: always place TNT blocks with the EXPLODE state set to true
@Deprecated
@Override
public IBlockState getStateForPlacement(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) {
return getStateFromMeta(meta).withProperty(BlockTNT.EXPLODE, true);
Expand Down

0 comments on commit 43527ae

Please sign in to comment.