-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
46c5d47
commit 2439d56
Showing
7 changed files
with
94 additions
and
2 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
neoforge/src/main/java/com/unlikepaladin/pfm/client/neoforge/BlockColorsExtension.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,11 @@ | ||
package com.unlikepaladin.pfm.client.neoforge; | ||
|
||
import net.minecraft.block.Block; | ||
import net.minecraft.client.color.block.BlockColorProvider; | ||
import net.minecraft.registry.entry.RegistryEntry; | ||
|
||
import java.util.Map; | ||
|
||
public interface BlockColorsExtension { | ||
Map<Block, BlockColorProvider> getColorMap(); | ||
} |
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
11 changes: 11 additions & 0 deletions
11
neoforge/src/main/java/com/unlikepaladin/pfm/client/neoforge/ItemColorsExtension.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,11 @@ | ||
package com.unlikepaladin.pfm.client.neoforge; | ||
|
||
import net.minecraft.client.color.item.ItemColorProvider; | ||
import net.minecraft.item.Item; | ||
import net.minecraft.registry.entry.RegistryEntry; | ||
|
||
import java.util.Map; | ||
|
||
public interface ItemColorsExtension { | ||
Map<Item, ItemColorProvider> getColorMap(); | ||
} |
24 changes: 24 additions & 0 deletions
24
neoforge/src/main/java/com/unlikepaladin/pfm/mixin/neoforge/BlockColorsAccessor.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,24 @@ | ||
package com.unlikepaladin.pfm.mixin.neoforge; | ||
|
||
import com.unlikepaladin.pfm.client.neoforge.BlockColorsExtension; | ||
import net.minecraft.block.Block; | ||
import net.minecraft.client.color.block.BlockColorProvider; | ||
import net.minecraft.client.color.block.BlockColors; | ||
import net.minecraft.registry.entry.RegistryEntry; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
@Mixin(BlockColors.class) | ||
public class BlockColorsAccessor implements BlockColorsExtension { | ||
|
||
@Shadow | ||
private final Map<Block, BlockColorProvider> providers = new HashMap<>(); | ||
|
||
@Override | ||
public Map<Block, BlockColorProvider> getColorMap() { | ||
return providers; | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
neoforge/src/main/java/com/unlikepaladin/pfm/mixin/neoforge/ItemColorsAccessor.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,24 @@ | ||
package com.unlikepaladin.pfm.mixin.neoforge; | ||
|
||
import com.unlikepaladin.pfm.client.neoforge.ItemColorsExtension; | ||
import net.minecraft.client.color.item.ItemColorProvider; | ||
import net.minecraft.client.color.item.ItemColors; | ||
import net.minecraft.item.Item; | ||
import net.minecraft.registry.entry.RegistryEntry; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
@Mixin(ItemColors.class) | ||
public class ItemColorsAccessor implements ItemColorsExtension { | ||
|
||
@Shadow | ||
private final Map<Item, ItemColorProvider> providers = new HashMap<>(); | ||
|
||
@Override | ||
public Map<Item, ItemColorProvider> getColorMap() { | ||
return providers; | ||
} | ||
} |
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