Migrate Carpet Mixin names to mojang mappings
This commit is contained in:
1 parent
2c3871b90e
commit
a547677597
154 files changed
+422
-501
No files matched your search
@@ -0,0 +1,21 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.CarpetSettings;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.TntBlock;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
@Mixin(TntBlock.class)
|
||||
public abstract class TntBlock_noUpdateMixin
|
||||
{
|
||||
// Add carpet rule check for tntDoNotUpdate to an if statement.
|
||||
@Redirect(method = "onPlace", at = @At(value = "INVOKE",
|
||||
target = "Lnet/minecraft/world/level/Level;hasNeighborSignal(Lnet/minecraft/core/BlockPos;)Z"))
|
||||
private boolean isTNTDoNotUpdate(Level world, BlockPos blockPos)
|
||||
{
|
||||
return !CarpetSettings.tntDoNotUpdate && world.hasNeighborSignal(blockPos);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user