Initialize TNT mixin classes so they function
This commit is contained in:
parent
966caf9f1c
commit
73f76ecc6f
@ -2,17 +2,25 @@ package party._2a03.mc.mixin;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.TntBlock;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.state.property.BooleanProperty;
|
||||
import net.minecraft.state.property.Properties;
|
||||
import net.minecraft.world.World;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Overwrite;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
|
||||
@Mixin(TntBlock.class)
|
||||
public class MixinTntBlock extends Block {
|
||||
@Shadow
|
||||
public static final BooleanProperty UNSTABLE = Properties.UNSTABLE;
|
||||
|
||||
public MixinTntBlock(Block.Settings settings) {
|
||||
super(settings);
|
||||
this.setDefaultState(this.getDefaultState().with(UNSTABLE, false));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -6,11 +6,17 @@ import net.minecraft.entity.TntEntity;
|
||||
import net.minecraft.world.World;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Overwrite;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
|
||||
@Mixin(TntEntity.class)
|
||||
public abstract class MixinTntEntity extends Entity {
|
||||
@Shadow
|
||||
private int fuseTimer;
|
||||
|
||||
public MixinTntEntity(EntityType<? extends TntEntity> entityType, World world) {
|
||||
super(entityType, world);
|
||||
this.fuseTimer = 80;
|
||||
this.inanimate = true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user