Jump to content

Need help updaitng mod from 1.8.9 to 1.11.2


NovaViper

Recommended Posts

I'm trying to revive this mod (Doggy Talents) that the author created about a year ago since everyone (including myself) has enjoyed it. The mod only got to 1.8.4 but stopped at that version, the author hasn't been on since. Since 1.8, many, many things in Minecraft as far as coding has changed (in addition to the fact that I haven't modded in nearly 3 years now), it's becoming a pain in the butt. So far I have gotten a good bit of the changes converted over becaused I compared the code with my previous works (Zero Quest, TetraCraft, and Cryogenic Library) however, there are still many problems I am encountering because of the major changes. I've complied up a list of current issues I'm having with updating the code, which is the following:

 

  1. Can't find an alternative method for StatCollector, which Doggy Talents utilizes for collecting and translating string components to text
  2. Adding Tile Entities to Blocks and the methods inside Tile Entities
  3. Adding custom block boundaries
  4. Getting the entity (i.e player) that is riding on another (i.e. horse) or entity (i.e. horse) that is being ridden on

 

There might be more I'm missing, but I spot more I'll add onto this list. Also, here is the source code to the forked repository

  • Like 1

Main Developer and Owner of Zero Quest

Visit the Wiki for more information

If I helped anyone, please give me a applaud and a thank you!

Link to comment
Share on other sites

14 minutes ago, NovaViper said:

Can't find an alternative method for StatCollector, which Doggy Talents utilizes for collecting and translating string components to text

 

It was renamed to net.minecraft.util.text.translation.I18n and deprecated, because the server shouldn't be translating things (the dedicated server can only translate to en_US). Use net.minecraft.client.resources.I18n from the client instead (or send a TextComponentTranslation, which will translate to the client's locale).

 

 

14 minutes ago, NovaViper said:

Adding Tile Entities to Blocks and the methods inside Tile Entities

 

This hasn't changed. Override Block#hasTileEntity(IBlockState) to return true for any state that has a TileEntity and override Block#createTileEntity to create an return an instance of the TileEntity for the provided state.

 

Which methods do you want to know about? Try looking at the TileEntity class or vanilla extensions of it. MCPBot can tell you the SRG name of a field/method in a specific version and also tell you the current MCP name of an SRG name. This issue tracker documents most renamed field/methods.

 

 

14 minutes ago, NovaViper said:

Adding custom block boundaries

 

Again, look at vanilla examples like BlockCactus or BlockBasePressurePlate.

 

Store the block's bounding boxes as AABB fields. Override Block#getBoundingBox to return your Block's main bounding box, Block#getCollisionBoundingBox to return your Block's collision bounding box (if it's different to the main bounding box) and Block#getSelectedBoundingBox to return your Block's selection bounding box offset by the BlockPos (if it's different to the main bounding box).

 

If your Block has multiple collision bounding boxes, override Block#addCollisionBoxToList (the instance method) to call Block.addCollisionBoxToList (the static method) for each bounding box.

 

 

14 minutes ago, NovaViper said:

Getting the entity (i.e player) that is riding on another (i.e. horse) or entity (i.e. horse) that is being ridden on

 

Entity#getRidingEntity returns the entity being ridden by thisEntity#getPassengers returns the entities riding this.

  • Like 1

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

  • 4 weeks later...

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.