mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-17 02:34:30 +01:00
fix various menus with empty level accesses
This commit is contained in:
parent
b2c22e9470
commit
37fa505050
1 changed files with 10 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
--- a/net/minecraft/world/inventory/ContainerLevelAccess.java
|
||||
+++ b/net/minecraft/world/inventory/ContainerLevelAccess.java
|
||||
@@ -8,6 +8,20 @@
|
||||
@@ -8,16 +8,48 @@
|
||||
|
||||
public interface ContainerLevelAccess {
|
||||
|
||||
|
@ -21,7 +21,15 @@
|
|||
ContainerLevelAccess NULL = new ContainerLevelAccess() {
|
||||
@Override
|
||||
public <T> Optional<T> evaluate(BiFunction<Level, BlockPos, T> getter) {
|
||||
@@ -17,7 +31,19 @@
|
||||
return Optional.empty();
|
||||
}
|
||||
+ // Paper start - fix menus with empty level accesses
|
||||
+ @Override
|
||||
+ public org.bukkit.Location getLocation() {
|
||||
+ return null;
|
||||
+ }
|
||||
+ // Paper end - fix menus with empty level accesses
|
||||
};
|
||||
|
||||
static ContainerLevelAccess create(final Level world, final BlockPos pos) {
|
||||
return new ContainerLevelAccess() {
|
||||
|
|
Loading…
Add table
Reference in a new issue