mirror of
https://github.com/architectury/architectury-api.git
synced 2026-03-30 13:05:25 -05:00
PlayerHooks#closeContainer
This commit is contained in:
@@ -33,8 +33,14 @@ public final class PlayerHooks {
|
||||
return IMPL.isFake(player);
|
||||
}
|
||||
|
||||
public static void closeContainer(Player player) {
|
||||
IMPL.closeContainer(player);
|
||||
}
|
||||
|
||||
public interface Impl {
|
||||
boolean isFake(Player player);
|
||||
|
||||
void closeContainer(Player player);
|
||||
}
|
||||
|
||||
static {
|
||||
|
||||
@@ -24,4 +24,9 @@ public class PlayerHooksImpl implements PlayerHooks.Impl {
|
||||
public boolean isFake(Player player) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeContainer(Player player) {
|
||||
player.closeContainer();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,4 +50,5 @@ mutable field net/minecraft/world/level/block/state/BlockBehaviour$Properties dy
|
||||
accessible method net/minecraft/world/entity/Entity getEncodeId ()Ljava/lang/String;
|
||||
accessible field net/minecraft/server/packs/repository/PackRepository sources Ljava/util/Set;
|
||||
mutable field net/minecraft/server/packs/repository/PackRepository sources Ljava/util/Set;
|
||||
accessible field net/minecraft/world/item/DyeColor textureDiffuseColor I
|
||||
accessible field net/minecraft/world/item/DyeColor textureDiffuseColor I
|
||||
accessible method net/minecraft/world/entity/player/Player closeContainer ()V
|
||||
@@ -25,4 +25,9 @@ public class PlayerHooksImpl implements PlayerHooks.Impl {
|
||||
public boolean isFake(PlayerEntity playerEntity) {
|
||||
return playerEntity instanceof FakePlayer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeContainer(PlayerEntity playerEntity) {
|
||||
playerEntity.closeContainer();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user