Jump to content

Bright_Steel

Members
  • Posts

    10
  • Joined

  • Last visited

Everything posted by Bright_Steel

  1. What else could go in there besides null? My model is based off of modelbase, but using return new RenderOompah(manager, ModelBase.class, 0); returns "The constructor RenderOompah(RenderManager, Class<ModelBase>, int) is undefined"
  2. I tried this by adding these to my client proxy preInit, but no spawn egg or entity is registered. Did I do anything wrong, there aren't any errors in the code. EntityRegistry.registerModEntity(EntityOompah.class, "oompah", 0, Main.instance, 80, 3, false, 6750105, 7859797); RenderingRegistry.registerEntityRenderingHandler(EntityOompah.class, new IRenderFactory<Entity>() { @Override public Render<? super Entity> createRenderFor(RenderManager manager) { return new RenderOompah(manager, null, 0); } });
  3. I'm trying to create a custom entity, known as an Oompah Loompah. I've created three classes: RenderOompah (points to the texture, etc) EntityOompah (creates the entity, ai, etc) ModelOompah(creates the entity's model using a java model) How do I register and initialize the entity? It has changed since 1.8, and I can't get it to work.
  4. I'm trying to cause my item to place down my bush block on top of the block being clicked. Right now, it replaces the block being clicked with the bush, but I need it to place the block on top. How may I do this? My current code: @Override public EnumActionResult onItemUse(ItemStack stack, EntityPlayer player, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ){ worldIn.setBlockState(pos, BerryBushRed.instance.getDefaultState(), 3); return EnumActionResult.SUCCESS; }
  5. I've created a block which renders using a .obj model that I've exported from blender. It references a .mtl file, also exported from blender, to texture the model. In-game, the texture isn't loaded, and although the model loads fine, it's just white. Forge gives me this error when starting the client: [22:14:17] [Client thread/INFO] [FML]: OBJLoader.MaterialLibrary: key 'Ns' (model: 'main:models/block/tardis.mtl') is not currently supported, skipping [22:14:17] [Client thread/INFO] [FML]: OBJModel: A color has already been defined for material 'Material.001' in 'main:models/block/tardis.mtl'. The color defined by key 'Ks' will not be applied! [22:14:17] [Client thread/INFO] [FML]: OBJLoader.MaterialLibrary: key 'Ke' (model: 'main:models/block/tardis.mtl') is not currently supported, skipping [22:14:17] [Client thread/INFO] [FML]: OBJLoader.MaterialLibrary: key 'Ni' (model: 'main:models/block/tardis.mtl') is not currently supported, skipping [22:14:17] [Client thread/INFO] [FML]: OBJLoader.MaterialLibrary: key 'illum' (model: 'main:models/block/tardis.mtl') is not currently supported, skipping Anyone know how to fix this? Here's my .mtl file:
  6. My guess is you're not passing in the right model path. I would expect the obj file to be in the "models\block" or "models\item" folders. I just tried redoing the block and a bunch of other stuff and pasting the obj in every resource folder but I keep getting errors. I've been trying to figure this out for days and nothing works. Could someone try and get an .obj to work in my project if I sent it to you? I'll pay money.. >.<
  7. That's a basic Java error, the method expects an Item but you're passing it a Block . Do you know why I'm getting this error when I start the client? And the block loads with the purple and black texture.
  8. Okay, I think I sort of follow you. I changed the class to this: public final class BlockRenderRegister { public static void registerBlockRenderer(){ ModelLoader.setCustomModelResourceLocation(TardisBlocks.ninthRoundel, 0, new ModelResourceLocation("doctorwhouniverse:ninth_roundel.obj", "inventory")); } } But now I'm getting this error "The method setCustomModelResourceLocation(Item, int, ModelResourceLocation) in the type ModelLoader is not applicable for the arguments (Block, int, ModelResourceLocation)"
  9. I'm a little confused. So I have a class with this code to locate the .json files for each block: public static void reg(Block block){ Minecraft.getMinecraft().getRenderItem().getItemModelMesher() .register(Item.getItemFromBlock(block), 0, new ModelResourceLocation(modid + ":" + block.getUnlocalizedName().substring(5), "inventory")); } How exactly would I be able to include the .obj extension? (I already have called the ObJLoader add domain to the client proxy).
  10. I'm trying to use a .obj file for my tile entity's model. I've been following a tutorial for 1.8, but I'm using forge for 1.9 and I think some things have changed. So... What is now IModelCustom? And has AdvancedModelLoader changed to something else? Does renderAll(); still exist?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.