[1.8] Mod Development Help Thread/Updating to 1.8 Thread

Chaka

FTB Team
Mod Developer
Retired Staff
Dec 24, 2013
928
323
103
New Jersey
So I decided to make this thread because there were a lot of changes in 1.8.

So this thread is for modders to talk about the new things that have changed and to help them out with problems they are having with their code.

Here are some of the things that have changed.

They removed setBlockTexturename() setTextureName() as well as registerBlockIcons() And anything that accepts coordinates such as onBlockActivated() and onEntityCollidedWithBlock() Anything with coordinates has been replaced with BlockPos Change the coordinates with BlockPos. And the side argument (int) in most methods has been changed to EnumFacing

To get Blocks/Items to render in your inventory you need to register the models with this

Code:
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(YourItem, metadata, new ModelResourceLocation("modid:items_registered_name", "inventory"));

You can replace ("modid:items_registered_name", "inventory")); with this.
(Reference.MOD_ID + ":ItemNameHere", "inventory"));

That is, If you use a Reference class.

For rendering Items you should replace the old method of TileEntitySpecialRenderers here is an example
Code:
Tessellator tess = Tessellator.instance;
tess.startDrawingQuads();
tess.addVertexWithUV ...
...
tess.draw();

Replaced With

Code:
Tessellator tess = Tessellator.getInstance();
WorldRenderer worldrenderer = tess.getWorldRenderer();
worldrenderer.addVertexWithUV ...
...
tess.draw();

World generation is basically the same except for the new BlockPos method.


If you would like to see some of this code working here is my git for The BackWoods mod 1.8
https://github.com/BackWoodsMod/TheBackWoods-1.8


Thanks. Hope this helps everyone.
 

Chaka

FTB Team
Mod Developer
Retired Staff
Dec 24, 2013
928
323
103
New Jersey
  • Like
Reactions: DarkIron987

Chaka

FTB Team
Mod Developer
Retired Staff
Dec 24, 2013
928
323
103
New Jersey
Why are we updating to 1.8? (Yes, I bring this up every version)
I mostly am updating because i want to rewrite my mod. And there are cool new features. When i write my mod i am going to do it properly this time.
 

Chaka

FTB Team
Mod Developer
Retired Staff
Dec 24, 2013
928
323
103
New Jersey
The BackWoods go to my website in my signature and you can find links there

Sent from my flux armor using the tappatalk app from the flux store
 

keybounce

New Member
Jul 29, 2019
1,925
0
0
What are the biggest features of 1.8?

1. World border.

... Aaannnd ... aaannnd ... Gany's mods?
 

VikeStep

New Member
Jul 29, 2019
1,117
0
0
I updated my mod to 1.8 (I'll get it up on a github branch a bit later). I didn't have any items/blocks. The only issues I ran into when updating were:
- x, y, z changed to BlockPos
- Entity.getCommandSenderName() changed to Entity.getName()

After those changes it worked fine
 

DarkIron987

New Member
Jul 29, 2019
293
0
1
I updated my mod to 1.8 (I'll get it up on a github branch a bit later). I didn't have any items/blocks. The only issues I ran into when updating were:
- x, y, z changed to BlockPos
- Entity.getCommandSenderName() changed to Entity.getName()

After those changes it worked fine
The BlockPos was a very easy fix though. Also, the 1TB (@Strikingwolf ) of .JSON is new.
 

DarkIron987

New Member
Jul 29, 2019
293
0
1
Sure. Something is going to happen eventually. I hope we do get a real solution baked into Forge though. Otherwise it could turn into a pissing contest between core mods.
To be 100% honest the only difference is renders and registering blocks/items. So far working with my mod 90% of functions are the same. I would say Buildcraft may be updated to 1.8 by January 2015.
 
  • Like
Reactions: Chaka