Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.19] Custom Minecart


ucrafter
 Share

Recommended Posts

I have created a custom Minecart in 1.18 and now I want to transfer this to 1.19. I derived from the class "AbstractMinecartContainer" here, in 1.18 this worked. In 1.19 I now get the error message :

This class must implement the inherited abstract method AbstractMinecart.getDropItem(), but cannot override it since it is not visible from GoldenHopperMinecartEntity. Either make the 
 type abstract or make the inherited method visible.

However, I can't see that anything has changed in the base classes (or I just don't see it). Can anyone help me here?

Link to comment
Share on other sites

AbstractMinecart#getDropItem is for some reason package private
you need to use a AT to make it protected (Note you can not make it public this will crash the vanilla implementations)

Edit: this is the AT

protected net.minecraft.world.entity.vehicle.AbstractMinecart m_213728_()Lnet/minecraft/world/item/Item; # getDropItem
Edited by Luis_ST
Link to comment
Share on other sites

 Didn't exist in 1.18.2 it was hardcoded.

See the 1.19 release notes for the change: https://feedback.minecraft.net/hc/en-us/articles/6731464524941-Minecraft-Java-Edition-1-19

Quote

When broken each Minecart variant drops itself as item, instead of splitting into two items (such as Chest and Minecart)

 

Link to comment
Share on other sites

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

 Share



×
×
  • Create New...

Important Information

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