-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port and update to MC 1.12 and the new Forge registry changes #214
Conversation
{ | ||
public static final Item RING = (new ItemRing()).setUnlocalizedName("Ring").setRegistryName("ring"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Items and blocks should be created in the corresponding registry events. If we need access to this item instance, we should use the @ObjectHolder
annotation in order to support item substitution properly. Otherwise if a mod overrides this ring, weired bugs or even crashes might occur (since this instance is no longer the one that is registered to the item registry)
ModelLoader.setCustomModelResourceLocation(Config.itemRing, 0, new ModelResourceLocation("baubles:Ring", "inventory")); | ||
|
||
@SubscribeEvent | ||
public static void registerItemModels(ModelRegistryEvent event) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my opinion, events shouldnt be part of the proxy. Might want to move this either to the mod class or even its own class.
@SideOnly(Side.CLIENT) | ||
@Override | ||
public void getSubItems(Item par1, CreativeTabs par2CreativeTab, NonNullList<ItemStack> par3NonNullList) { | ||
par3NonNullList.add(new ItemStack(this,1,0)); | ||
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> list) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as of Forge 14.21.0.2360 this method is no longer client only!
See http://files.minecraftforge.net/maven/net/minecraftforge/forge/1.12-14.21.0.2360/forge-1.12-14.21.0.2360-changelog.txt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went ahead and removed all @SideOnly(Side.CLIENT)
annotations, as they seemed to all be unnecessary. And as was just discussed on #minecraftforge
, modders should not be using it, unless absolutely necessary. I will push that tomorrow, after I have the chance to actually test that this doesn't break on a server after all though...
If this is not going to be released for a while, can devs get an API or maven or something to develop to it? currently i just have my @optional baubles tags commented out and id just do another build when this is ready. |
@Override | ||
public void initialize(Minecraft minecraftInstance) { } | ||
public BaublesGuiFactory() { | ||
super(Baubles.MODID, getTitle()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can just put getAbridgedConfigPath here, and then call the field "title" in createConfigGui. Same thing with modid really.
Example: https://github.com/squeek502/WailaHarvestability/blob/1.12.x/java/squeek/wailaharvestability/gui/config/GuiFactory.java
@PrinceOfAmber You can use Charset's Ivy dependency mirror for the time being, if you need to. @maruohon Found a bug - tooltips on items do not render in the Baubles menu. |
@asiekierka thanks! not sure exactly what you mean, do you have your dependences do a fallback to custom jars here? https://github.com/CharsetMC/Charset/blob/1.12/build.gradle#L55 |
@maruohon I was testing out using baubles from this branch, and i think theres an item dup glitch. So i put a stack of 64 sticks and 3-4 coal in the 2x2 crafting thats inside of the baubles inventory. Shift click to make torches, then shift click sticks out of the crafting. The sticks are duplicated. |
@PrinceOfAmber I couldn't reproduce exactly what you described, but the Container code definitely wasn't properly updated, and in my case it actually used twice the ingredient items than what it should have, when crafting. It should now be updated to what vanilla has in 1.12. |
any update on this? botania is close to complete and is waiting on this. |
@williewillus i havent heard anything. I want to release a modpack soon with this in 1.12 but i was waiting for it to be on curse; I dont know if i can distribute a custom built jar;doesnt feel right. Does anyone else have access to the curse page? I respect @Azanor 's decision to retire; so at what point should someone consider making a fork with a new curse page? |
Pretty sure Azanor stated that he would still be updating Baubles. |
Sorry, I have been away for a while. I will make work of updating baubles and cleaning out some PR's this week. |
Awesome thanks Az! Much love! |
Some things to note: