Posted October 10, 20222 yr forgive the clumsines also i dont speak the languague i could'n figure out by miself how to make a item to change the model based on the state im making a custome shield just extending the vainilla shield it works blocks arrows and all now i want the shield to have 2 states two jsons one for when relaxed and the other json model for when shielding those two models individually works as the videos prove know the troubles come here becoze from this point i dont understand a thing first of all the two models are named "basemmod:item/carbon_shield_relaxed" "basemmod:item/carbon_shield_blocking" then im using the itembow as a base soo i let the shield whit same properties as the bow ############ first problem based on answer from previous post i made a custome ModItemModelProperties class but i dont have the lesser idea of how to apply this to the shield item public class ModItemModelProperties { //###### ###### ###### ###### ###### ###### public static void make_shield_shield(Item shield) { ItemProperties.register(shield, new ResourceLocation("pull"), (itemstack, warudo, le, p_174638_) -> { //ItemModelsProperties.register(item, new ResourceLocation("pull"), (itemstack, warudo, le) -> { if (le == null) { return 0.0F; } else { float pull = (float)((( itemstack.getUseDuration() - le.getUseItemRemainingTicks() ) % 5 ) / 5.0F); //System.out.println( " ticks = " + pull ); return (le.getUseItem() != itemstack )? 0.0F : pull; //(itemstack.getUseDuration() - le.getUseItemRemainingTicks()) / 20.0F; } }); ItemProperties.register(shield, new ResourceLocation("pulling"), (itemstack, warudo, le, p_174638_) -> { //ItemModelsProperties.register(item, new ResourceLocation("pulling"), (itemstack, warudo, le) -> { return (le != null && le.getUseItem() == itemstack) ? 1.0F : 0.0F; }); } } where this class must gooo and how i declare it to works whith the shield ???? i made the parent json this way but donts work the shield is invisible i think is coze the missing step from the ModelProperties class before may it has also some errors i dont know yet { "overrides": [ { "predicate": { "pulling": 0 }, "model": "basemmod:item/carbon_shield_relaxed" }, { "predicate": { "pulling": 1, "pull": 0.1 }, "model": "basemmod:item/carbon_shield_blocking" } ] } the shield item is invisible carbon_shield_blocking ########## ########## ########## ########## may the question be wrong formulated soo sorry before hand basically i want this shield to apply one of two json models based on if the item is in use Edited October 11, 20222 yr by perromercenary00 missing info
October 11, 20222 yr You're not understanding how the bow works. But even if so, you only have two models, so the bow doesn't make much sense. You basically need the default model, which I assumed is your relaxed, to have an item override to when a value is one, which can be determine by the item property, you use a different model. Your default model only needs to show the states it can switch to, not every possible state.
October 11, 20222 yr Author ya i found it mi base class was lacking client side @Mod.EventBusSubscriber(modid = MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD) public static class ClientModEvents { @SubscribeEvent public static void onClientSetup(FMLClientSetupEvent event) { ModItemModelProperties.make_shield_shield( ItemInit.CARBON_SHIELD.get() ); } } now i have some issues whit the model position and textures
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.