• Recently Browsing

    No registered users viewing this page.

  • Posts

    • Some crops have no seed in the name
    • Hello, I'm trying to get a custom OBJ model for a block to rotate according to the block's orientation (got via DirectionProperty). I tought I could just put the parameters in the blockstate json, but it doesn't work. Here's the repo of the project. The concerned block is called Scanner and is part of a multiblock (the master actually) and its model get switched when the structure is complete. Its corresponding json is scanner_base.json. I hope you'll be able to help me with that, Thanks anyway, Elsopéen
    • I think yes i mean probably use a boolean with instanceof BlockNamedItem it should work altough i'm not sure if the BlockNamedItem class is only used for plantables but it should work!
    • Simply delete the Example mod package in your src/main/java/com it should fix it i mean the Example mod folder isn't even used for anything it's only there as an example (of course XD) so just delete it and it should be fine you wouldn't use the Example mod folder anyway.
    • Hi so i made a custom armor model the code itself is fine, the model and the texture also there is no crash or anything my only issue is that it's rendering in an incorrect position and i really dont know why i might be just very dumb and doesn't see the problem (very likely) so if anyone can help me i would be really thankful! Here is my ArmorItem code: package com.github.Crazzy4999.BetterBiomesMod.item; import com.github.Crazzy4999.BetterBiomesMod.client.models.armor.TropenhelmModel; import net.minecraft.client.renderer.entity.model.BipedModel; import net.minecraft.entity.Entity; import net.minecraft.entity.LivingEntity; import net.minecraft.inventory.EquipmentSlotType; import net.minecraft.item.ArmorItem; import net.minecraft.item.IArmorMaterial; import net.minecraft.item.ItemStack; public class MBBArmorItem extends ArmorItem { public MBBArmorItem(IArmorMaterial materialIn, EquipmentSlotType slot, Properties builder) { super(materialIn, slot, builder); } @Override public <A extends BipedModel<?>> A getArmorModel(LivingEntity entityLiving, ItemStack itemStack, EquipmentSlotType armorSlot, A returnValue) { TropenhelmModel model = new TropenhelmModel(); model.bipedHeadwear.showModel = armorSlot == EquipmentSlotType.HEAD; model.isChild = returnValue.isChild; model.isSneak = returnValue.isSneak; model.isSitting = returnValue.isSitting; model.rightArmPose = returnValue.rightArmPose; model.leftArmPose = returnValue.leftArmPose; return (A)model; } @Override public String getArmorTexture(ItemStack stack, Entity entity, EquipmentSlotType slot, String type) { return "betterbiomesmodbycrazzy:textures/models/armor/tropenhelm.png"; } }   This is my model for the tropenhelm (note if i make bipedHeadWear equal to hat_base it's only rendering the model correctly but in wrong position i have 2 screenshots so it will maybe easier to understand what i'm saying (i don't speak Londonish very well)) package com.github.Crazzy4999.BetterBiomesMod.client.models.armor; import net.minecraft.client.renderer.entity.model.BipedModel; import net.minecraft.client.renderer.entity.model.RendererModel; import net.minecraft.entity.LivingEntity; /** * TropenhelmModel - Crazzy4999 * Created using Tabula 7.1.0 */ public class TropenhelmModel<T extends LivingEntity> extends BipedModel<T> { public RendererModel hat_base; public RendererModel flange; public TropenhelmModel() { super(); this.textureWidth = 64; this.textureHeight = 32; this.hat_base = new RendererModel(this, 0, 0); this.hat_base.setRotationPoint(0.0F, 0.0F, 0.0F); this.hat_base.addBox(0.0F, 0.0F, 0.0F, 8, 3, 8, 0.0F); this.flange = new RendererModel(this, 18, 0); this.flange.setRotationPoint(-3.0F, 3.0F, -3.0F); this.flange.addBox(0.0F, 0.0F, 0.0F, 14, 0, 14, 0.0F); this.hat_base.addChild(this.flange); this.bipedHeadwear = this.hat_base; } @Override public void render(T entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); } /** * This is a helper function from Tabula to set the rotation of model parts */ public void setRotateAngle(RendererModel rendererModel, float x, float y, float z) { rendererModel.rotateAngleX = x; rendererModel.rotateAngleY = y; rendererModel.rotateAngleZ = z; } }   Item registration: BetterBiomeItems.tropenhelm = new MBBArmorItem(MBBArmorMaterial.COTTON, EquipmentSlotType.HEAD, (new Item.Properties().group(MBB))).setRegistryName(location("tropenhelm")),   So as i said if bipedHeadWear is equal to hat_base this is what i get in-game:   But if bipedHeadWear isn't equal to hat_base this is what i get:
  • Topics

  • Who's Online (See full list)