You appear to have a number of problems including
- Using incompatible Forge and OptiFine versions
- Using versions of mods written for a different minecraft version
The direct cause of this error appears to be a mod passing a null entity in a packet
Forge provides the MissingMappingsEvent, I think it also fires for tile entities.
Don’t construct a ResourceLocation like that (domain+”:”+path), construct it with the overload that takes seperate parameters (domain, path)
You have an arbitrary number of slots, you were assigning:
slot 0 to single slot
slot 0 to container slot 0
slot 1 to container slot 1
slot 2 to container slot 2
...
slot 8 to container slot 8
now you are assigning
slot 9 to single slot
slot 0 to container slot 0
slot 1 to container slot 1
slot 2 to container slot 2
...
slot 8 to container slot 8
Previously you were assigning to slots to the same slot ID index, hence the duplicate slots
You want a custom baked model implementation.
TheGreyGhost has one in MineraftByExample at https://github.com/TheGreyGhost/MinecraftByExample, however the code is a bit outdated. You should read
and
That was the point, their using a boolean array called unused that is initialised to true, I would use a boolean array called used that is automatically initialised to false
That code...
take a look at https://github.com/Cadiboo/Example-Mod/blob/4ed728a75815285c6382420832a1b671142e60c4/src/main/java/io/github/cadiboo/examplemod/EventSubscriber.java#L101-L122 for how to use the EntityEntryBuilder (which you need to use) and https://github.com/Cadiboo/Example-Mod/blob/4ed728a75815285c6382420832a1b671142e60c4/src/main/java/io/github/cadiboo/examplemod/client/ClientEventSubscriber.java#L68 for how to register an entity renderer. If you are familiar with the double colon method reference notation you can use it here (Entity____Renderer::new)