mirror of
https://github.com/FabricMC/fabric.git
synced 2025-04-08 21:14:41 -04:00
Fix BER registration accessing dispatcher instance through uninitialized
field
This commit is contained in:
parent
a1ff8ff878
commit
7fe423d1a5
3 changed files with 3 additions and 6 deletions
build.gradle
fabric-renderer-registries-v1
build.gradle
src/main/java/net/fabricmc/fabric/mixin/client/renderer/registry
|
@ -12,7 +12,7 @@ plugins {
|
|||
def ENV = System.getenv()
|
||||
|
||||
class Globals {
|
||||
static def baseVersion = "0.4.14"
|
||||
static def baseVersion = "0.4.15"
|
||||
static def mcVersion = "1.15-pre2"
|
||||
static def yarnVersion = "+build.1"
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
archivesBaseName = "fabric-renderer-registries-v1"
|
||||
version = getSubprojectVersion(project, "2.0.0")
|
||||
version = getSubprojectVersion(project, "2.0.1")
|
||||
|
||||
dependencies {
|
||||
compile project(path: ':fabric-api-base', configuration: 'dev')
|
||||
|
|
|
@ -33,15 +33,12 @@ import net.fabricmc.fabric.impl.client.rendereregistry.v1.BlockEntityRendererReg
|
|||
|
||||
@Mixin(BlockEntityRenderDispatcher.class)
|
||||
public abstract class MixinBlockEntityRenderDispatcher {
|
||||
@Shadow
|
||||
@Final
|
||||
public static BlockEntityRenderDispatcher INSTANCE;
|
||||
@Shadow
|
||||
@Final
|
||||
private Map<BlockEntityType<?>, BlockEntityRenderer<?>> renderers;
|
||||
|
||||
@Inject(at = @At("RETURN"), method = "<init>")
|
||||
private void init(CallbackInfo ci) {
|
||||
BlockEntityRendererRegistryImpl.setup(((t, function) -> renderers.put(t, function.apply(INSTANCE))));
|
||||
BlockEntityRendererRegistryImpl.setup(((t, function) -> renderers.put(t, function.apply((BlockEntityRenderDispatcher) (Object) this))));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue