aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-spigotflower-stripped/net/minecraft/world/inventory/ContainerLevelAccess.java.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-spigotflower-stripped/net/minecraft/world/inventory/ContainerLevelAccess.java.patch')
-rw-r--r--patch-remap/mache-spigotflower-stripped/net/minecraft/world/inventory/ContainerLevelAccess.java.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower-stripped/net/minecraft/world/inventory/ContainerLevelAccess.java.patch b/patch-remap/mache-spigotflower-stripped/net/minecraft/world/inventory/ContainerLevelAccess.java.patch
new file mode 100644
index 0000000000..9842d48860
--- /dev/null
+++ b/patch-remap/mache-spigotflower-stripped/net/minecraft/world/inventory/ContainerLevelAccess.java.patch
@@ -0,0 +1,42 @@
+--- a/net/minecraft/world/inventory/ContainerLevelAccess.java
++++ b/net/minecraft/world/inventory/ContainerLevelAccess.java
+@@ -8,6 +8,20 @@
+
+ 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
+ @Override
+@@ -18,11 +31,18 @@
+
+ static ContainerLevelAccess create(final Level level, final BlockPos blockpos) {
+ return new ContainerLevelAccess() {
++ // CraftBukkit start
+ @Override
+ @Override
+ public <T> Optional<T> evaluate(BiFunction<Level, BlockPos, T> bifunction) {
+ return Optional.of(bifunction.apply(level, blockpos));
+ }
++ // CraftBukkit end
++
++ @Override
++ public <T> Optional<T> evaluate(BiFunction<Level, BlockPos, T> levelPosConsumer) {
++ return Optional.of(levelPosConsumer.apply(level, pos));
++ }
+ };
+ }
+