Prevent TntBlock from creating TntEntity
This commit is contained in:
parent
7fb945136d
commit
21aedbf935
@ -12,6 +12,7 @@ dependencies {
|
||||
modCompile "net.fabricmc:fabric-loader:${project.loader_version}"
|
||||
modCompile "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||
modCompile "org.json:json:20190722"
|
||||
modImplementation "com.google.code.findbugs:jsr305:3.0.2"
|
||||
include "org.json:json:20190722"
|
||||
}
|
||||
|
||||
|
25
src/main/java/party/_2a03/mc/mixin/MixinTntBlock.java
Normal file
25
src/main/java/party/_2a03/mc/mixin/MixinTntBlock.java
Normal file
@ -0,0 +1,25 @@
|
||||
package party._2a03.mc.mixin;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.TntBlock;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Overwrite;
|
||||
|
||||
@Mixin(TntBlock.class)
|
||||
public class MixinTntBlock extends Block {
|
||||
public MixinTntBlock(Block.Settings settings) {
|
||||
super(settings);
|
||||
}
|
||||
|
||||
/**
|
||||
* @reason Disable TNT block explosions.
|
||||
* @author flewkey
|
||||
*/
|
||||
@Overwrite
|
||||
private static void primeTnt(World world, BlockPos pos, @Nullable LivingEntity igniter) {
|
||||
}
|
||||
}
|
@ -4,6 +4,7 @@
|
||||
"compatibilityLevel": "JAVA_8",
|
||||
"server": [
|
||||
"MixinGameModeCommand",
|
||||
"MixinTntBlock",
|
||||
"MixinTntEntity"
|
||||
],
|
||||
"injectors": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user