Restore/Create Sand Generators

Discussion in 'Archived: Plugin Requests' started by TinCow, Nov 20, 2012.

  1. Offline


    Sand Generators still work on Vanilla SMP 1.4.4/5, but they do not work on Bukkit 1.4.4/5. I actively want them to work on my server, for various reasons. If it is possible to create a plugin that would make Bukkit work the same as Vanilla in this regard, I would be grateful.
    seifpic likes this.
  2. Offline


    A member of my community brought up the root cause for sand generators, and I brought the idea to Amaranth and he added it.

    There is no way to restore it by plugin unless you write code that just spawns sand item drops...

    I am glad to hear this fix did really break it!

    If you want users to be able to dupe sand, why not just create a sign that when you click it, gives you 64 sand? Why bother with redstone machines.
    AndyMcB1 likes this.
  3. Offline


    Because players actually work to be able to duplicate sand.
  4. Offline


    Been playing minecraft for almost 2 years, didn't know you can make sand. -.- How exactly?
  5. Offline


    Just search it up on YouTube. The version I'm aware of involves pistons and a minecart, along with quite a few redstone components.
  6. Offline


    So you guys actually want bukkit to put a sand dupplication bug back? That's like asking your teacher to fail you when you get an A. Lol.
    1mpre55, joshwenke and gomeow like this.
  7. Offline


    I don't really want it back, I was just explaining.
  8. Offline


    To the OP then. :)
  9. Offline


    Thanks for the clarification on the cause. If it cannot be restored to its original state, I'd like to change my request to ask for some kind of plugin that generates sand if a machine of some kind is created. Maybe something where cobblestone can be crushed into gravel by a piston, and gravel can be crushed into sand by a piston. The idea being that sand could be obtained from a machine of some kind.

    Because a machine is still a complex mechanism that players have to build. It takes space, resources, and effort, and is as worthy of construction as any other redstone device. While I understand your point, using a sign like that has no cost at all. While the cost of the machine is tiny in comparison to the return from the sand generated, there's still a cost.

    I don't really want to turn this into a debate on the sand bug, but if you're curious here are my reasons for wanting it in the game (for the record, I run a survival server). First, without the sand generator, sand is gained from mining deserts. Unfortunately, the nature of sand physics and the design of deserts are such that all sand harvesting results in strip-mining of desert biomes. That is horrendously ugly in a way that does not occur for any other material. It makes the stripped biomes undesirable places for actual construction and projects, which means that sand harvesting slowly removes terrain from the game.

    Second, the game already has ways to manufacture other base blocks, including smooth stone, cobblestone, and obsidian. While obsidian requires the consumption of lava or redstone, the other two can be created from nothing. I see no difference between creating those blocks and creating sand. If I can build a mechanism to create infinite smooth stone and cobblestone, why can't I build a mechanism to create infinite sand? If there was another, Mojang-approved method of obtaining sand, I wouldn't care about the generator. However, there isn't.

    Third, sandstone and it's variants is one of the most interesting and visually pleasing materials to build structures out of. With sand only available from strip-mining deserts, the amount of sandstone used in structures is dramatically reduced. That is a shame, and it reduces the visual appeal of some creations.
  10. Offline


    Maybe it could be added as a plugin to re-enable them, or maybe as a variable in the file.
    Lying_Cake likes this.
  11. Offline

    Codex Arcanum

    Then I believe you should come up with some sort of design for a sand machine you would like. For example, to put it on-par with cobblestone generators, you could ask for a plugin that would make sand result when lava and water mix under certain circumstances. Or some, better, more logical idea. That would be far easier to code than recreating a complex bug in minecraft logic.
  12. Offline


    The Bukkit .jar has code to remove the bug. A plugin can remove or stop that function from being called on. That will work because sand generators work in vanilla minecraft servers. Pretty simple I guess.
  13. Offline

    Codex Arcanum

    Even if that is possible (if it is, I haven't the foggiest idea how to do it), my point stands. It would be much easier to create an alternate method of sand generation.
    1mpre55 likes this.
  14. Offline


    I, would like a plugin to remove the event that fixes sand duplication. As I run a full Vanilla Gameplay server.
  15. Offline


    In one of the mods for Feed The Beast (not well versed but buildcraft or something similar) there are machines that take a fertilized soil, sorta drains the nutrients, and sand is a by-product. So could we have a plugin that produces sand from dirt? Or something utterly useless like Netherrack even. It may make less sense but I would love for netherrack to have a purpose.
  16. Offline


    Another reason why sand generators are actually more good than bad: There exist a lot of high level redstone/piston designs that can actively use the ability to be able to create a gravity affected block. For example, 12x12 panels of TNT that get moved into a single stream by using sand/gravel and pistons.
    And you cannot replace this behaviour by giving out free sand, and giving/allowing command blocks to all survival players is obviously a bad idea.

    In my oppinion, this is one of those many "bugfixes" that just make the game less interesting by removing complex and emergent content just because "it was never intended to be possible". Same goes for a couple of other "abuses" that got "fixed" in the past. Actually, emergence is (almost) never fully expected at first. As a god of the real world, would you remove quantum physics (and therefore modern computers) if you find it to be a nonintended effect of your programing which aimed for newtonian style physics? (There actually exists some serious papers discussing whether it is an unintended side effect of it being a simulation)
    I somewhat have the impression that Mojang and, by extension, the Bukkit team do not want this to be a complex game, but one where you only mine and place blocks. Which might be enough for some people, but there are a bunch of others that love the game for other things. Why not giving server operators the choice instead of enforcing such things? I fully agree that general block duplication should be avoided or require manual labor on survival servers, simple because otherwise there is almost no difference to creative mode. And I understand that others do not like the possibility of sand duplication. But the difference is that in the first case, we have the option which game mode to use on our servers, but in the latter, we do not (assuming that it is essentially impossible to recreate the old behaviour by plugin, as was claimed in this thread).

    tl;dr: Please make such "bug fixes" optional or revertible by plugin.
    Lying_Cake, cgar and seifpic like this.
  17. Offline


    That's fine with me. An alternative I would like would be a plugin that allows us to create gravel from cobblestone, and sand from gravel. The system I think would work would be to have a 'crushing' setup using a piston on one side and an obsidian block on the other, in this arrangement (P=Piston, O=Obsidian, X=Block to be crushed):

    PXO or OXP

    Vertical would also work, as such:




    When the piston activates in this arrangement with X as cobblestone, X turns into gravel. With X as gravel, X turns into sand. With X as any other block, nothing happens. An advantage of this system is that it makes naturally harvested gravel useful in some minor way, which is a nice improvement over vanilla anyway.

    Is that possible?
  18. Offline


    That might ruin some T Flip Flops, I really think that it would be better if sand generators return to what they were.
  19. Offline

    Codex Arcanum

    Sure. I can even make that for you :), I'm a developer. Be warned though, it will have to be at the bottom of a list of things I am committed to finish first.

    Edit: Not a redstone expert, but why would a T flip flop require obsidian? And, frankly, you are unlikely to find someone willing to put in the time and effort to return sand generation to its original state.
  20. Offline


    I've never seen a T Flip Flop that had a regular (non-stricky) piston one block apart from obsidian. The point is that the piston is pushing a block that cannot move, so I don't see how that kind of setup could be integrated into... well... almost any useful device. Maybe in some kind of buds device, but that would be super rare and there are tons of different buds devices that could be used as an alternative.

    If this kind of changes has unexpected consequences, I'll come back and request a tweak to it in some way. However, I think that's unlikely. My users will be extremely pleased to get their sand generators back, even in a new format. I doubt they'll care if the rare buds device needs some tweaking, particularly as few of them even know what a buds device is, let alone use one.

    Many thanks. I can guarantee you there will be a (small) server full of people who will be very pleased.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 30, 2016
  21. Offline


    Whoops, sorry I mis-read your post, I thought you meant two pistons pushing one block towards eachother. However many people use obsidian to stop cobble generators from generating at a certain spot. I guess it will work though.
  22. Offline


    has anyone actually figured out how exactly they fixed this? Looked through the git repo and couldn't figure it out
  23. Offline


    How about, instead of finding how the bug was fixed, recreating the actual bug. Maybe using something like:

    Pseudo Code:

    int x = amount of ticks set in properties file
        if(getBlockId(pistonHead.location.y + 1) == 12) {
            if(pistonRetractIn(< x) {
                createNewBlock(sand, pistonBody.location.x, pistonBody.location.y + 1, pistonBody.location.z);
    This could also be configured for gravel and dragon eggs in a properties file.
  24. Offline


    I personally liked sand generators. For all the above reasons too. Desert stripping is annoying and unsightly, and on a server with MCMMO people tend to tear up the land for excavation skill. I also don't see the harm with having an infinite supply of sand, and I don't believe in just /give-ing it away. What I would like to suggest is a mod for how the old school piston mod worked. In the original piston mod, when two pistons placed with a space of 2 between them facing each other; if they activated at the same time or within a second of each other, any block between them would crush and drop as its item. This was a nice way to make a cobblestone generator, however since we want sand, it would be nice if someone could recode this to work again. Make a crusher with 2 pistons to generate:

    Smooth Stone > Cobblestone
    Cobblestone > Sand
    Gravel > Flint
    Dirt > Clay (maybe)
    Stone Bricks > Cracked Stone Bricks

    This way we can use this crusher to make some difficult to find blocks like clay or cracked stone brick, and if used in conjunction with a smooth/cobble generator, we can have a machine run to create cobblestone or sand.

    This wouldn't even lag like oldschool sand generators. The other blocks require the player to load the machine to crush and get the required block, while smoothstone and cobblestone require at least a second for the lava to make the desired block.
  25. Offline


    I have found a way to re-enable it and I will post details when I am finished with the solution.

    Edit: Done. It was as simple as removing one line of code from the
    Ok in order to re-enable sand generators, download the following zip: [removed]
    Un-zip it and copy the "net" file into the craftbukkit .jar (just like installing a Minecraft mod but don't remove the "Meta-inf" file). That's it. It works just like in vanilla 1.4.5
    NOTE: This was only tested in craftbukkit 1.4.5 R0.2.
    Hope you find this useful!
  26. Offline


    [quote uid=93100 name="seifpic" post=1432688]I have found a way to re-enable it and I will post details when I am finished with the solution.

    Edit: Done. It was as simple as removing one line of code from the
    Ok in order to re-enable sand generators, download the following zip: <Edit by Moderator: Redacted mediafire url>
    Un-zip it and copy the "net" file into the craftbukkit .jar (just like installing a Minecraft mod but don't remove the "Meta-inf" file). That's it. It works just like in vanilla 1.4.5

    NOTE: This was only tested in craftbukkit 1.4.5 R0.2.

    Hope you find this useful![/quote]

    What did you use to edit the line? I tried opening it in eclipse but it wouldn't open correctly. Also which line did you remove? So I can do this in future updates.

    Last edited by a moderator: Nov 8, 2016
  27. Offline


    don't u know someone made a sand generator before on youtube?
    wait why its u again lax...

    i don't think restore a sand generator with a plugin is a good idea,but Aikar is right
    sand generator may make your server lag

    another idea is get a command block by TooManyItems or /give command and use /give command for the command block

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 30, 2016
  28. Offline


    BTW I didn't re-enable sand generators by plugin, instead I removed the code that made duplicating sand and falling objects impossible. Also I am going to make a new thread with explanations about how I fixed it. I might turn it into a plugin if I could find out how. I edited the files by downloading the source code, editing the code, compiling the craftbukkit .jar, then extracting the files I edited.

    Edit: here's the post
  29. Offline


    Thanks, seifpic.

    At the same time, I would like to request that the block-crushing plugin still be developed, for a few reasons. First, the above fix will have to be manually applied every time the server is updated, which is a pain. It's a good temporary fix, but it does not seem like an ideal permanent solution. Second, the proposed plugin seems more 'balanced' to me for a survival server (or, at least, my survival server), due to the inherently slower speed of sand generation. It also gives a use for gravel, which is nice.
  30. Offline

    Codex Arcanum

    I'm still planning on coding the plugin, still on hold though. If someone else wants to ninja in and do it before me, feel free.

Share This Page