-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Infinite Items #5
Comments
Trying to figure out which part of |
taken = held.splitPile(1)
|
I am trying to add the eventemitter to voxel-gamemode but cannot figure out how to do so. I want it to be able to emit, I gave it inherits(Gamemode, EventEmitter) but that won't work... I managed to get this working on voxel-console but not this |
Here's what I am trying to do. |
The @on parts never seem to run, but there are no errors |
ok.. super noob mistake... dont ask what lol. |
This is almost done and will be commited soon |
For the class inheritance, since this is CoffeeScript you should be able to just do As for this issue, I half-agree with the premise. I think infinite item piles could still be useful in some situations, even survival. For example, for comparison in Minecraft, there may be adventure maps or mini-games with items from infinite dispensers or chests full of items you can use infinitely many times, to some end (I think these are implemented in MC with an item count of 0 or -1, not sure exactly, but in voxel.js itempile as its JavaScript I allow the actual On the other hand, I could see how it could be useful to, by default, pickup a finite-sized pile from the creative inventory. Haven't tested #6 yet but ideally both would be possible. Not sure of the best way to handle this user interaction, but the way I see it, from the inventory window it should be possible to pickup: infinite piles, maximum pile size (usually 64), one item. Another consideration is that in creative mode, your item blocks still deplete when placed in the world. In MC, you can have a stack of 1 dirt, place it, and you still have it; not so in voxel.js / voxel-use, where it is consumed, same in creative or survival mode. The way I got around this was having infinite-sized piles, but this does introduce the behavior you've noticed where they behave infinite in both modes. Unsure of the best solution here, but I think it requires further design to take into account these considerations. |
Hmm. Right I am thinking of having a canKeep variable which can be set to true, so inventory items are not infinite but also do not deplete. |
Thanks I managed to get events working.
Why not just make the item number not deplete? That is much easier to maintain because we can have a simple setting to keep items which can be controlled.
I don' think having an
What would be the use of having an infinity item? I just see this as hard to maintain. Do we currently have a way to pickup only one item? If not I can work on that. |
Items in the creative inventory should not be infinite, instead they should be stacks because when you change modes back to survival, you still have an infinite block
The text was updated successfully, but these errors were encountered: