Jump to content

Having trouble backporting neighborChanged method of window blinds to 1.10.2.


Recommended Posts

Posted

Hey :D. As some of you may know, 1.11 recently had an addition to the neighborChanged method in forge. The mod now tells you the position of the neighbor which changed. The issue is however, 1.10.2 doesn't have that. My current code relies on using that position to update the blinds around the blind you open or close: http://puu.sh/sSXmQ/2a5d92a89b.png.

 

I've tinkered around for a few hours trying to do so without using that position, but it doesn't seem to work properly no matter what I try. It either just updates the ones around the blind you open or close (up, down, left, right, and none of the ones connecting to those), or just does nothing (doesn't even allow the one you open or close to open up).

 

Here's my neighborChanged code from 1.11: http://pastebin.com/peRGQi7n

 

If you guys have any clue how I can possibly adapt this code to 1.10.2 I'd be very grateful. I'm sure I'm probably just not thinking through this properly.

Posted

 

Screenshot is a screenshot of you writing your post, not code.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Hey :D. As some of you may know, 1.11 recently had an addition to the neighborChanged method in forge. The mod now tells you the position of the neighbor which changed. The issue is however, 1.10.2 doesn't have that. My current code relies on using that position to update the blinds around the blind you open or close: http://puu.sh/sSXmQ/2a5d92a89b.png.

 

I've tinkered around for a few hours trying to do so without using that position, but it doesn't seem to work properly no matter what I try. It either just updates the ones around the blind you open or close (up, down, left, right, and none of the ones connecting to those), or just does nothing (doesn't even allow the one you open or close to open up).

 

Here's my neighborChanged code from 1.11: http://pastebin.com/peRGQi7n

 

If you guys have any clue how I can possibly adapt this code to 1.10.2 I'd be very grateful. I'm sure I'm probably just not thinking through this properly.

Create a custom method that does give you this, and call it from the vanilla neighborChanged method.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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