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.

Featured Replies

Posted

I was looking for a low overhead way to "mark" a bunch of placed vanilla blocks and I started looking for public variable I could change so I don't have the added space of a bunch of titleEntities. 

 

I ended up finding every block I checked had blockParticleGravity set to 1.0.  Changing it to .9 allows me to keep track of which blocks I marked and so far has not caused any problems.

 

But, I want to make sure I don't break anything by modifying this variable.  When is this variable used, and will setting it to .9 break anything?

  • Author

Oh wait you are referring to a hash or list type thing.  Sorry, coming from C/C++ so don't instantly recognize the terms here :).

 

The reason I am trying to modify variables of the block instead of just saving them in an array is because I want this to be persistent with map saves etc. 

 

Basically I want the players to be able to use a wand to mark an indefinite amount of blocks that will change how things spawn on them while using as little overhead as possible.

  • Author

Currently I'm tying it to the block that is on the ground.  This is all in an effort to make it so I can use light switches in my house without coming home to a room full of zombies.

 

So I came up with the idea of being able to use a wand or something to mark all blocks you don't want zombies to spawn then cancelling the spawn on those blocks.  Since this could potentially be a lot of blocks tying it to the player might result in a rather large array, so that's when I started looking for alternatives like looking for existing variables on blocks I can change to use as a reference.

  • Author

Oh bummer.  Well, that's disappointing :(.

 

I suppose maybe I could make some sort of object you place that has a range and within that range you mark your blocks and the marked blocks are stored in the object.  Lot more work than I was hoping, but could work...

 

Thanks for the help!

  • Author

I guess I wouldn't know how to save the set with the map though.  Seems like I'd have to use a tileEntity somewhere to keep track of this information right?

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

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.