mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-19 03:49:14 +00:00
More model/rendering fixes:
- Breaking change: Change ClientRegistry.bindTileEntityRenderer to a factory, so mods don't have to manually specify the dispatcher. - Breaking change: Delete obsolete SimpleModelState (the class was duplicated by mistake, see SimpleModelTransform) and ICustomModelState (part of the old loader API). - Breaking change: Rename getTextureDependencies to getTextures, for consistency. - Reinstate the getRenderLayer method, fixed appropriately to return the new RenderType value. - Fix OBJ loader applying the model transform in the wrong reference frame. - Fix vanilla bug in TransformationMatrix#func_227986_a_ - Fix QuadTransformer logic. - Added new method to IModelConfiguration to retrieve the owner IUnbakedModel, needed in order to construct ItemOverrideLists when baking custom models. - Reintroduce multi-layer model through the new model loader system.
This commit is contained in:
1 parent
e8ce61d4cd
commit
fc189c9aaf
29 files changed
+325
-344
No files matched your search
@@ -32,6 +32,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.function.Function;
|
||||
|
||||
public class ClientRegistry
|
||||
{
|
||||
@@ -42,9 +43,9 @@ public class ClientRegistry
|
||||
* Call this during {@link net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent}.
|
||||
* This method is safe to call during parallel mod loading.
|
||||
*/
|
||||
public static synchronized <T extends TileEntity> void bindTileEntityRenderer(TileEntityType<T> tileEntityType, TileEntityRenderer<? super T> specialRenderer)
|
||||
public static synchronized <T extends TileEntity> void bindTileEntityRenderer(TileEntityType<T> tileEntityType, Function<TileEntityRendererDispatcher, TileEntityRenderer<? super T>> rendererFactory)
|
||||
{
|
||||
TileEntityRendererDispatcher.instance.setSpecialRendererInternal(tileEntityType, specialRenderer);
|
||||
TileEntityRendererDispatcher.instance.setSpecialRendererInternal(tileEntityType, rendererFactory.apply(TileEntityRendererDispatcher.instance));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user