Jump to content

Recommended Posts

Posted

Hi all.

 

My custom fire block, when substituting the vanilla block, does not spread the fire or burn anything. It does, however, have correct animations, and does work when registered as its own block.

 

I'm attemtping to replace the vanilla block "minecraft:fire" with the addSubstitutionAlias with my own custom BlockFire class.

 

Please note, I did try my BlockFire class while registered on its own (Using GameRegistry), and it works perfectly. The issue appears to only happen when substituting the original.

 

Here is some snippets of my code:

 

Here is my registry lines of code:

http://pastebin.com/UHdLfb70

 

Here is my custom BlockFire class (fireTweak):

http://pastebin.com/ZEhjt61n

 

-- NOTES

 

I have put some breakpoints in the onUpdate method, so I do know it is being called correctly. It doesn't, however, get past "scheduleBlockUpdate" (Line 159 on pastebin) - The fireTweak also has working animations ETC.

 

I've been stuck on this for about a week, and is the last thing my mod is missing. Every bit of help will be much appreciated.

Posted

My custom fire block, when substituting the vanilla block, does not spread the fire or burn anything. It does, however, have correct animations, and does work when registered as its own block.

Posted

Maybe someone like diesieben07 can shed more light on how the substitution alias actually works. Like does the substitution mean that every check for == as well as instanceof will return true? Because the vanilla code mixes the two methods of checking for class in some code.

 

You might want to test it yourself. After the substitution does Blocks.fire instanceof BlockFire return true (where BlockFire is your custom class and not vanilla class)?

 

One thing I wonder about is the class naming. is your block called BlockFire? (I can't check your pastebin because my work blocks access to that site and I'm at work.) Maybe you should change it to have a name that doesn't overlap the vanilla name, as it may cause some mixup in imports.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

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.