Skip to content
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

Merged
merged 19 commits into from
Aug 1, 2017

Conversation

maruohon
Copy link
Contributor

Some things to note:

  • I have also made white space clean-up in various places for my own sanity... not sure if you want those pulled
  • I have updated some deprecated method calls and done some other clean-up to get rid of all errors or warnings (at least in my IDE)
  • There is one commit where I changed the build.gradle file in relation to how it builds the API file, since I needed to build that myself to get it working for another mod of mine (gradle didn't seem to recognize *.zip files so I changed it into a jar, and the official API jar also doesn't include the built classes, so I was unable to just drop the API file into the libs/ dir while setting up a dev environment). So again, not sure if you want to pull that commit.

{
public static final Item RING = (new ItemRing()).setUnlocalizedName("Ring").setRegistryName("ring");
Copy link
Contributor

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) {
Copy link
Contributor

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) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

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...

@Lothrazar
Copy link

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());
Copy link
Contributor

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

@asiekierka
Copy link

asiekierka commented Jun 30, 2017

@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.

@Lothrazar
Copy link

@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

@Lothrazar
Copy link

@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.

@maruohon
Copy link
Contributor Author

@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.

@williewillus
Copy link

any update on this? botania is close to complete and is waiting on this.

@Lothrazar
Copy link

@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?

@GirafiStudios
Copy link
Contributor

Pretty sure Azanor stated that he would still be updating Baubles.

@Azanor
Copy link
Owner

Azanor commented Jul 31, 2017

Sorry, I have been away for a while. I will make work of updating baubles and cleaning out some PR's this week.

@Lothrazar
Copy link

Awesome thanks Az! Much love!

@Azanor Azanor merged commit 9f35fd1 into Azanor:master Aug 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants