This commit is contained in:
gnembon committed 2022-01-19 20:31:30 +01:00
1 parent 5abbae5b62
commit ec1993efb1
4 files changed
+7 -7

No files matched your search

+3 -3
View File
@@ -4,10 +4,10 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties # Fabric Properties
# check these on https://fabricmc.net/use # check these on https://fabricmc.net/use
# or better: https://modmuss50.me/fabric.html # or better: https://modmuss50.me/fabric.html
minecraft_version=1.18 minecraft_version=1.18.1
yarn_mappings=1.18+build.1 yarn_mappings=1.18.1+build.22
loader_version=0.12.12 loader_version=0.12.12
fabric_version=0.43.1+1.18 fabric_version=0.46.1+1.18
# Mod Properties # Mod Properties
mod_version = 1.4.56 mod_version = 1.4.56
@@ -28,7 +28,7 @@ public class BlockItem_creativeNoClipMixin
{ {
// copy from canPlace // copy from canPlace
VoxelShape voxelShape = state.getCollisionShape(world, pos, context); VoxelShape voxelShape = state.getCollisionShape(world, pos, context);
return voxelShape.isEmpty() || world.intersectsEntities(player, voxelShape.offset(pos.getX(), pos.getY(), pos.getZ())); return voxelShape.isEmpty() || world.doesNotIntersectEntities(player, voxelShape.offset(pos.getX(), pos.getY(), pos.getZ()));
} }
return world.canPlace(state, pos, context); return world.canPlace(state, pos, context);
@@ -30,7 +30,7 @@ public class WallStandingBlockItem_creativeNoClipMixin
{ {
// copy from canPlace // copy from canPlace
VoxelShape voxelShape = state.getCollisionShape(worldView, pos, context); VoxelShape voxelShape = state.getCollisionShape(worldView, pos, context);
return voxelShape.isEmpty() || worldView.intersectsEntities(player, voxelShape.offset(pos.getX(), pos.getY(), pos.getZ())); return voxelShape.isEmpty() || worldView.doesNotIntersectEntities(player, voxelShape.offset(pos.getX(), pos.getY(), pos.getZ()));
} }
return worldView.canPlace(state, pos, context); return worldView.canPlace(state, pos, context);
@@ -26,10 +26,10 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.AbstractNbtList; import net.minecraft.nbt.AbstractNbtList;
import net.minecraft.nbt.AbstractNbtNumber; import net.minecraft.nbt.AbstractNbtNumber;
import net.minecraft.nbt.NbtCompound; import net.minecraft.nbt.NbtCompound;
import net.minecraft.nbt.NbtEnd;
import net.minecraft.nbt.NbtInt; import net.minecraft.nbt.NbtInt;
import net.minecraft.nbt.NbtList; import net.minecraft.nbt.NbtList;
import net.minecraft.nbt.NbtLong; import net.minecraft.nbt.NbtLong;
import net.minecraft.nbt.NbtNull;
import net.minecraft.nbt.StringNbtReader; import net.minecraft.nbt.StringNbtReader;
import net.minecraft.nbt.NbtString; import net.minecraft.nbt.NbtString;
import net.minecraft.nbt.NbtElement; import net.minecraft.nbt.NbtElement;
@@ -342,7 +342,7 @@ public class NBTSerializableValue extends Value implements ContainerValueInterfa
} }
if (t instanceof NbtString) if (t instanceof NbtString)
return StringValue.of(t.asString()); return StringValue.of(t.asString());
if (t instanceof NbtNull) if (t instanceof NbtEnd)
return Value.NULL; return Value.NULL;
throw new InternalExpressionException("How did we get here: Unknown nbt element class: "+t.getNbtType().getCrashReportName()); throw new InternalExpressionException("How did we get here: Unknown nbt element class: "+t.getNbtType().getCrashReportName());