aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-vineflower-stripped/net/minecraft/world/inventory/ContainerLevelAccess.java.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-vineflower-stripped/net/minecraft/world/inventory/ContainerLevelAccess.java.patch')
-rw-r--r--patch-remap/mache-vineflower-stripped/net/minecraft/world/inventory/ContainerLevelAccess.java.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower-stripped/net/minecraft/world/inventory/ContainerLevelAccess.java.patch b/patch-remap/mache-vineflower-stripped/net/minecraft/world/inventory/ContainerLevelAccess.java.patch
new file mode 100644
index 0000000000..dce50df107
--- /dev/null
+++ b/patch-remap/mache-vineflower-stripped/net/minecraft/world/inventory/ContainerLevelAccess.java.patch
@@ -0,0 +1,44 @@
+--- a/net/minecraft/world/inventory/ContainerLevelAccess.java
++++ b/net/minecraft/world/inventory/ContainerLevelAccess.java
+@@ -7,6 +7,21 @@
+ import net.minecraft.world.level.Level;
+
+ public interface ContainerLevelAccess {
++
++ // CraftBukkit start
++ default Level getWorld() {
++ throw new UnsupportedOperationException("Not supported yet.");
++ }
++
++ default BlockPos getPosition() {
++ throw new UnsupportedOperationException("Not supported yet.");
++ }
++
++ default org.bukkit.Location getLocation() {
++ return new org.bukkit.Location(getWorld().getWorld(), getPosition().getX(), getPosition().getY(), getPosition().getZ());
++ }
++ // CraftBukkit end
++
+ ContainerLevelAccess NULL = new ContainerLevelAccess() {
+ @Override
+ public <T> Optional<T> evaluate(BiFunction<Level, BlockPos, T> levelPosConsumer) {
+@@ -16,7 +31,19 @@
+
+ static ContainerLevelAccess create(final Level level, final BlockPos pos) {
+ return new ContainerLevelAccess() {
++ // CraftBukkit start
+ @Override
++ public Level getWorld() {
++ return level;
++ }
++
++ @Override
++ public BlockPos getPosition() {
++ return pos;
++ }
++ // CraftBukkit end
++
++ @Override
+ public <T> Optional<T> evaluate(BiFunction<Level, BlockPos, T> levelPosConsumer) {
+ return Optional.of(levelPosConsumer.apply(level, pos));
+ }