SPIGOT-8062: Fix trial spawner item block entity state

This commit is contained in:
md_5 2025-06-18 07:51:24 +10:00
parent cd62a5cfd9
commit 5acfff4404
No known key found for this signature in database
GPG key ID: E8E901AC7C617C11
2 changed files with 3 additions and 3 deletions

View file

@ -50,7 +50,7 @@ public class CraftBlockEntityState<T extends TileEntity> extends CraftBlockState
this.load(tileEntity);
}
private IRegistryCustom getRegistryAccess() {
protected IRegistryCustom getRegistryAccess() {
GeneratorAccess worldHandle = getWorldHandle();
return (worldHandle != null) ? worldHandle.registryAccess() : MinecraftServer.getDefaultRegistryAccess();
}

View file

@ -23,8 +23,8 @@ public class CraftTrialSpawner extends CraftBlockEntityState<TrialSpawnerBlockEn
public CraftTrialSpawner(World world, TrialSpawnerBlockEntity tileEntity) {
super(world, tileEntity);
this.normalConfig = new CraftTrialSpawnerConfiguration(tileEntity.getTrialSpawner().normalConfig(), getSnapshot(), getWorldHandle().registryAccess());
this.ominousConfig = new CraftTrialSpawnerConfiguration(tileEntity.getTrialSpawner().ominousConfig(), getSnapshot(), getWorldHandle().registryAccess());
this.normalConfig = new CraftTrialSpawnerConfiguration(tileEntity.getTrialSpawner().normalConfig(), getSnapshot(), getRegistryAccess());
this.ominousConfig = new CraftTrialSpawnerConfiguration(tileEntity.getTrialSpawner().ominousConfig(), getSnapshot(), getRegistryAccess());
}
protected CraftTrialSpawner(CraftTrialSpawner state, Location location) {