Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Having trouble backporting neighborChanged method of window blinds to 1.10.2.

Featured Replies

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.

 

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.

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.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.