Public Access
This commit is contained in:
1 parent
62693c2229
commit
8b418ce01c
8 files changed
+27
-3
No files matched your search
@@ -2,6 +2,10 @@ package net.dnorberg.rivencraft.client;
|
||||
|
||||
import net.dnorberg.rivencraft.Rivencraft;
|
||||
import net.dnorberg.rivencraft.registry.ModBlockEntities;
|
||||
import net.dnorberg.rivencraft.registry.ModDataComponents;
|
||||
import net.dnorberg.rivencraft.registry.ModItems;
|
||||
import net.minecraft.client.renderer.item.ItemProperties;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.neoforged.api.distmarker.Dist;
|
||||
import net.neoforged.bus.api.SubscribeEvent;
|
||||
import net.neoforged.fml.common.EventBusSubscriber;
|
||||
@@ -21,6 +25,11 @@ public final class ClientEvents {
|
||||
|
||||
@SubscribeEvent
|
||||
public static void clientSetup(FMLClientSetupEvent event) {
|
||||
event.enqueueWork(() -> ItemProperties.register(
|
||||
ModItems.LINKING_BOOK.get(),
|
||||
ResourceLocation.fromNamespaceAndPath(Rivencraft.MOD_ID, "bound"),
|
||||
(stack, level, entity, seed) -> stack.has(ModDataComponents.LINK_TARGET.get()) ? 1.0F : 0.0F
|
||||
));
|
||||
NeoForge.EVENT_BUS.addListener(ClientBookInteractionHandler::onRightClickItem);
|
||||
NeoForge.EVENT_BUS.addListener(ClientBookInteractionHandler::onRightClickBlock);
|
||||
NeoForge.EVENT_BUS.addListener(ClientBookExploreOverlay::onClientTickPre);
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "rivencraft:item/linking_book"
|
||||
}
|
||||
"layer0": "rivencraft:item/linking_book_unwritten"
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"predicate": {
|
||||
"rivencraft:bound": 1.0
|
||||
},
|
||||
"model": "rivencraft:item/linking_book_bound"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "rivencraft:item/linking_book"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 546 B After Width: | Height: | Size: 441 B |
Binary file not shown.
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 489 B |
Binary file not shown.
|
After Width: | Height: | Size: 405 B |
Reference in new issue
Block a user