refactored nonscarpet references yeet

This commit is contained in:
gnembon committed 2023-02-11 01:33:23 +01:00
1 parent e4c090c355
commit 2ff1f4fb71
22 files changed
+409 -401

No files matched your search

@@ -29,9 +29,9 @@ public class BlockItem_scarpetEventMixin
}
@Inject(method = "placeBlock", at = @At("HEAD"), cancellable = true)
private void beforePlacement(BlockPlaceContext blockPlaceContext, BlockState blockState, CallbackInfoReturnable<Boolean> cir) {
if (blockPlaceContext.getPlayer() instanceof ServerPlayer && PLAYER_PLACING_BLOCK.isNeeded()) {
if (PLAYER_PLACING_BLOCK.onBlockPlaced((ServerPlayer) blockPlaceContext.getPlayer(), blockPlaceContext.getClickedPos(), blockPlaceContext.getHand(), blockPlaceContext.getItemInHand())) {
private void beforePlacement(BlockPlaceContext context, BlockState placementState, CallbackInfoReturnable<Boolean> cir) {
if (context.getPlayer() instanceof ServerPlayer && PLAYER_PLACING_BLOCK.isNeeded()) {
if (PLAYER_PLACING_BLOCK.onBlockPlaced((ServerPlayer) context.getPlayer(), context.getClickedPos(), context.getHand(), context.getItemInHand())) {
cir.setReturnValue(false);
cir.cancel();
}