Jump to content

[1.10.2][SOLVED] Inexplicable problem with basic item rendering...


Recommended Posts

Posted

So, a couple days ago I decided to switch from using Forge 1.8 to 1.10.2. Setup went fine, and while putting together a basic item I only noticed a few minor changes. However, upon testing it out, I ran into a strange problem with the position/scale of the item in 3d space.

 

The item .json file is just a tweaked copy of a basic vanilla item model with just the texture switched out. It is clearly loading the model though, as indicated by the texture showing up. I just don't know if I'm missing something major that was changed since 1.8. :-\

 

Here are some pictures of the issue, followed by my code:

 


 

FtUEOVr.pngHdzUEGt.pngINPKh2z.png

 


 

Excerpt from "src/main/java/joshuastone/testmod/TestMod.java":

 

@SidedProxy(serverSide="joshuastone.testmod.proxy.CommonProxy", clientSide="joshuastone.testmod.proxy.ClientProxy")
public static CommonProxy proxy;

@EventHandler
public void preinit(FMLPreInitializationEvent event) {
proxy.preinit(event);
}

@EventHandler
public void init(FMLInitializationEvent event) {
proxy.init(event);
}

 

 

Excerpt from "src/main/java/joshuastone/testmod/proxy/CommonProxy.java":

 

public void preinit(FMLPreInitializationEvent event) {
TestItems.register();
}

public void init(FMLInitializationEvent event) {}

 

 

Excerpt from "src/main/java/joshuastone/testmod/proxy/ClientProxy.java":

 

public void preinit(FMLPreInitializationEvent event) {
super.preinit(event);
}

public void init(FMLInitializationEvent event) {
super.init(event);
TestItems.registerItemModels();
}

 

 

Excerpt from "src/main/java/joshuastone/testmod/items/TestItems.java":

 

public static Item testItem = new Item().setUnlocalizedName("test_item").setCreativeTab(CreativeTabs.MISC);

public static void register() {
registerItem(testItem);
}

private static void registerItem(Item item) {
GameRegistry.register(item.setRegistryName(item.getUnlocalizedName().substring(5)));
}

@SideOnly(Side.CLIENT)
public static void registerItemModels() {
registerItemModel(testItem);
}

@SideOnly(Side.CLIENT)
private static void registerItemModel(Item item) {
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory"));
}

 

 

Contents of "src/main/resources/assets/testmod/models/item/test_item.json":

 

{
"parent": "builtin/generated",
"textures": {
	"layer0": "testmod:items/test_item"
},
"display": {
	"thirdperson": {
		"rotation": [ -90, 0, 0 ],
		"translation": [ 0, 1, -3 ],
		"scale": [ 0.55, 0.55, 0.55 ]
	},
	"firstperson": {
		"rotation": [ 0, -135, 25 ],
		"translation": [ 0, 4, 2 ],
		"scale": [ 1.7, 1.7, 1.7 ]
	}
}
} 

 

 


 

Thank you for your time. Just let me know if you need any more information in order to understand my problem.  :P

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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