-
Notifications
You must be signed in to change notification settings - Fork 288
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unify a few of the client registration classes (hmm). Generally try t…
…o avoid subscribing in constructors too
- Loading branch information
Showing
14 changed files
with
112 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/main/java/vazkii/zetaimplforge/client/ForgeClientRegistryExtension.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package vazkii.zetaimplforge.client; | ||
|
||
import net.minecraft.client.renderer.ItemBlockRenderTypes; | ||
import net.minecraft.world.level.block.Block; | ||
import vazkii.zeta.Zeta; | ||
import vazkii.zeta.client.ClientRegistryExtension; | ||
import vazkii.zeta.registry.RenderLayerRegistry; | ||
|
||
public class ForgeClientRegistryExtension extends ClientRegistryExtension { | ||
public ForgeClientRegistryExtension(Zeta z) { | ||
super(z); | ||
} | ||
|
||
//Forge has some weirdo extension, they want you to use json or something. | ||
//Doing it from java is easier and more akin to how it happens on Fabric. | ||
@Override | ||
@SuppressWarnings("removal") | ||
protected void doSetRenderLayer(Block block, RenderLayerRegistry.Layer layer) { | ||
ItemBlockRenderTypes.setRenderLayer(block, resolvedTypes.get(layer)); | ||
} | ||
} |
Oops, something went wrong.