1
0

Initialize TNT mixin classes so they function

This commit is contained in:
Ryan Fox (flewkey) 2020-01-17 02:31:52 +00:00 committed by Ryan Fox
parent 966caf9f1c
commit 73f76ecc6f
Signed by: flewkey
GPG Key ID: 94F56ADFD848851E
2 changed files with 14 additions and 0 deletions

View File

@ -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));
}
/**

View File

@ -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;
}
/**