[1.10.2] [Enhancement?] Adding custom structures
addrever opened this issue ยท 11 comments
Hello,
A few of my friends and I have been playing with this mod and really enjoy it. We were wondering if there was a way to add custom structures?
What about using this mods as a way to hook that idea up? https://minecraft.curseforge.com/projects/placemod?gameCategorySlug=mc-mods&projectID=234990
or you could use world edit. Basically since schematics is a big thing. I am not super sure but sounds good. You could also use something like CraftTweaker and Minetweakerrecipemaker to have admins make the schematic recipes.
There is not a way currently but it is something I could look into after we get the modular house done. I will say that structures created with blocks from other mods may not work properly without some patching. I am not saying they won't, just that there is higher risk ๐.
@Brian-Wuest nice :)
Looks like that one is all about structure generation during world generation. This mod is about the user creating the pre-fabricated buildings as they choose to. I have some ideas of how to implement this but again it will be after the basics of the modular house are done which might be a while. I am starting to come out of a development lull. ๐บ
i play on single player - so no servers for me. what about a config line that activates it on servers? would that avoid the game breaking portion?
Since this thread is kind of old and there has been conversations in multiple places let me lay out the development concerns about a feature like this.
Issues
- Game-breaking duplication of blocks
- This is about a player taking a "structure" of diamond blocks as blueprint and generating multiple "structures" of diamond blocks.
- This is the foremost concern on servers since it destroys balance and the players might as well be on creative. While my example used a vanilla block of diamonds, there also isn't a good way to calculate a cost of a non-vanilla late-game block and put a system around all of that without breaking something.
- Current structure scanning and generation doesn't support entities.
- What this means is that if this feature were to be implemented and they made a structure with item frames and armor stands, they would not be in the final structure since those are entities and not blocks.
- Any storage containers also would not be able to contain anything either since I don't gather the data from the chests/furnaces/etc.
- The player only gets items from the starter house now because I wrote a process to put it in there after the house is done generating.
- Supporting the different block states of all of the mod-blocks a structure could be created out of would mean I would be adding support for months or longer.
- What I am getting at here is that vanilla blocks have different states for which direction they are facing. Unfortunately, Minecraft isn't consistent with the property names for these different states and I have had to adjust processing multiple times to get everything lining up right when Kaojinn and I create a structure.
Possible ways to address
Duplication of Blocks
What I could do on this one is make an item called a "Structure Scanner" the player would use this item to scan the structure that they want to create a blueprint out of.
They would take the scanner and place it into a "Blueprint Drafter" block and it would read all of the blocks used in the scanned object and supply way to get the items from nearby chests to create the blueprint.
This would remove the "duplication" issue as the player needs the same number of blocks to create the copy structure as they did to create the original structure.
Entities in Structures
This one can be harder to do since there are many mod-created entities out there and I could have bugs creating them in the first place. I could be spending a lot of time just adding support for different entities.
For containers at least I could not get any of their contents when scanning the structure so it would never be in the new generated structure to begin with. This way I cannot fill a warehouse with diamonds and emeralds in chests and create a new one (again filled with diamonds and emeralds) if I happen to have enough stone and other materials.
Mod-Specific Blockstates
I have no idea how to address this one right now. Block states are a huge thing in Minecraft, especially block facings. It's how a furnace is "facing" the correct direction for the player, or if a vine will connect to another vine, or a torch will stick to the wall instead of just falling to the ground, or if a log is on it's side (and which way it is facing) or if it's vertical.
These are just some examples of the facing blocks which have caused me issues. When we get into technology mods where facing and power values matter it can be pretty overwhelming.
Conclusion (as of this writing)
While I could address the first 2 issues I have presented here, I feel that the last issue would cause a lot of headaches and an explosion in the number of versions I have to put out in order to support all of the different possible block states.
If anyone has any good suggestions of how to address this last issue, I would be open to it. ๐
Alrighty folks, this issue has been in the back of my head for a while, and its come back into rotation from a slightly different angle. The idea would be something along the lines of this:
This function would essentially be a creative mode only option that would be like a limited function level editor. you would have to manually destroy blocks yourself, but you could clone and place, or overwrite sections that you designate. So lets map out the thought process.
Creative Mode Only. Player would be able to select a starting point (say, the coordinate position of where the player is currently standing), and extend the selection out from there. GUI option may include something like 2 sets of cardinal direction buttons (one for move selection, one for extend in that direction) to either move the bounding box of the selection area, or to increase its size. If we can use the preview function like with the bridge, we could visualize this area easily for the user so they can see in real time just what they're selecting. Once the selection area is finalized with a button press, it would allow you to save the selected area to recall later, or put it into a kind of clipboard state.
Once you have these little 3D snippets available, and we may include some for use with this, you should be able to select which one you want to use, and again displaying a preview like the bridge, see the ghost layout of the structure in realtime and place it right where you need it. Some filters should be made available for ignore/include (like say a simple check box as to whether or not the capture logic will commit the blocks to the pattern.) 1) Air, 2) Fluid. Air would allow you to include blank space selected within the pattern, so if you placed it, say, underground, it would clear blocks that were in the way of the captured pattern. Fluid would allow you to include any fluid blocks captured within the pattern, if you were say trying to create a river, one section at a time, or trying to create a moat of lava.
Another option for Liquid, might be to convert liquid to air. An instance where this might be helpful were if you wanted to capture the pattern of an underwater temple, but place it out of water, and not spend 45 minutes trying to clean up the water.
I was looking at some vanilla blocks and noticed the "Structure" block. After playing around with it, this block basically allows for what we have been talking about. The only problem with it is that it doesn't show up in the creative tabs so the server admin has to "know" that it exists or are using JEI/NEI and happens to come across it.
I can make sure that the Structure Block is available in the creative menu so players can use the block easier.
Please let us know if there is something missing from the vanilla Structure Block that you would like to see us add to a custom one from us.
With the following released versions we have made the structure block available in the creative menu. The structure block is really cool and very configurable and we don't have a desire to duplicate the code. Closing this issue.
Versions 1.1.1.15 for MC 1.10.2 and 1.2.0.10 for MC 1.11.2.