Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Commit 56953c0

Browse files
authored
Dispatch from ForgeHooksClient to RenderEvents (#132)
1 parent a2c372e commit 56953c0

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

patchwork-god-classes/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ dependencies {
55
compile project(path: ':patchwork-fml', configuration: 'dev')
66
compile project(path: ':patchwork-capabilities', configuration: 'dev')
77
compile project(path: ':patchwork-events-lifecycle', configuration: 'dev')
8+
compile project(path: ':patchwork-events-rendering', configuration: 'dev')
89
}

patchwork-god-classes/src/main/java/net/minecraftforge/client/ForgeHooksClient.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,33 @@
1919

2020
package net.minecraftforge.client;
2121

22+
import java.util.Set;
23+
24+
import net.minecraft.client.color.block.BlockColors;
25+
import net.minecraft.client.color.item.ItemColors;
26+
import net.minecraft.client.texture.SpriteAtlasTexture;
27+
import net.minecraft.util.Identifier;
28+
29+
import net.patchworkmc.impl.event.render.RenderEvents;
30+
2231
/*
2332
* Note: this class is intended for mod use only, to dispatch to the implementations kept in their own modules.
2433
* Do not keep implementation details here, methods should be thin wrappers around methods in other modules.
2534
*/
2635
public class ForgeHooksClient {
36+
public static void onBlockColorsInit(BlockColors blockColors) {
37+
RenderEvents.onBlockColorsInit(blockColors);
38+
}
39+
40+
public static void onItemColorsInit(ItemColors itemColors, BlockColors blockColors) {
41+
RenderEvents.onItemColorsInit(itemColors, blockColors);
42+
}
43+
44+
public static void onTextureStitchedPre(SpriteAtlasTexture map, Set<Identifier> resourceLocations) {
45+
RenderEvents.onTextureStitchPre(map, resourceLocations);
46+
}
47+
48+
public static void onTextureStitchedPost(SpriteAtlasTexture map) {
49+
RenderEvents.onTextureStitchPost(map);
50+
}
2751
}

patchwork-god-classes/src/main/resources/fabric.mod.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"fabricloader": ">=0.8.4",
1919
"patchwork-fml": "*",
2020
"patchwork-capabilities": "*",
21-
"patchwork-events-lifecycle": "*"
21+
"patchwork-events-lifecycle": "*",
22+
"patchwork-events-rendering": "*"
2223
},
2324
"custom": {
2425
"modmenu:api": true,

0 commit comments

Comments
 (0)