Hello! This is my new mod. Basically, it allows for you (the modder) to load a schematic file directly into your world. This saves space, and is great for small structures such as houses, villages, or ore gen. This is not meant for vast areas, such as biomes or other large block formations. Schematics should have void around them (not be on a ground, otherwise it will render the ground).
Usage (Modders)
Simply either download the source code, or decompile with MCP. (Not recommended, as it is forge. Just go ahead and directly add the source). Adding schematics to the loading list is easy enough, just requires two lines. (A test mod is included in the download). Simply add these two lines, one is a declaration of the schematic, the other is localizing the schematic.
In your initialization/main file :
public static Schematic localSchemName;
localSchemName= new Schematic("/ModPackage/schemFileName.schematic");
generatedSchematics = new SchematicForGeneration[]{ new SchematicForGeneration(localSchemName);
Source code on Github (with comments)
Notice:
I have now added support for chests with NBT. Basically, you need to call the chests your file where you are calling SchematicForGeneration. You just use default chest methods to do so.
------
Schematic can call two different arguements, either a string (file path), or pre-created Schematic.
Distribution
You are allowed to include this mod in your mod download, as long as you provide a link to this mod.
You can not post this mod alone on another site without my permission. You may not make money with just this mod, another forge mod must be attached for adf.ly links to be allowed. You may distribute this mod privately among a few people, but no mass-distribution.
Installation
Drag into the 'mods' folder. Requires Minecraft 1.6.2 and Forge Universal.
So lets say I have a schematic with all vanilla blocks which I made in vanilla mc, then I use this schematic in my mod, is there any way to change the blocks in that schematic?
Yep! Look at the method Schematic.convertBlocks, it takes 3 arguements. The id, the vanilla block, and the new replacement block. (id, Block, Block)
By ID you mean the id of the vanilla block ? Also, if there was nbt in the schematic can you edit that? Such as items in chest
the method is (pseudeo)
if (id == block) {
Block.replaceblock = newBlock;
}
So, yes, the ID of the vanilla block. And no, you cannot currently edit NBT (Although loading is supported). I'll work on that
Last question(I think) can you get the coordinates of specific blocks? As thats how I spawn my mobs, I get the coords of the block then use world.spawnEntityInWorld...
So, if you spawn in a house with wood in the center, you want the mob to spawn on the coords of that wood?
Sadly, no, but I'll be sure to add that soon.
Planned:
NBT Editing
Coord location
Getting blocks relative to specific areas (what is 3 blocks above the ground, below, etc.)
PMC Post: http://www.planetmin...into-your-mods/
Source: https://github.com/G...maticReaderTest
Download (obfuscated): http://www.creeperre...1.1.2_1.6.2.zip
Hello! This is my new mod. Basically, it allows for you (the modder) to load a schematic file directly into your world. This saves space, and is great for small structures such as houses, villages, or ore gen. This is not meant for vast areas, such as biomes or other large block formations. Schematics should have void around them (not be on a ground, otherwise it will render the ground).
Usage (Modders)
Simply either download the source code, or decompile with MCP. (Not recommended, as it is forge. Just go ahead and directly add the source). Adding schematics to the loading list is easy enough, just requires two lines. (A test mod is included in the download). Simply add these two lines, one is a declaration of the schematic, the other is localizing the schematic.
In your initialization/main file :
public static Schematic localSchemName;
localSchemName= new Schematic("/ModPackage/schemFileName.schematic");
generatedSchematics = new SchematicForGeneration[]{
new SchematicForGeneration(localSchemName);
Source code on Github (with comments)
Notice:
I have now added support for chests with NBT. Basically, you need to call the chests your file where you are calling SchematicForGeneration. You just use default chest methods to do so.
------
Schematic can call two different arguements, either a string (file path), or pre-created Schematic.
Distribution
You are allowed to include this mod in your mod download, as long as you provide a link to this mod.
You can not post this mod alone on another site without my permission. You may not make money with just this mod, another forge mod must be attached for adf.ly links to be allowed. You may distribute this mod privately among a few people, but no mass-distribution.
Installation
Drag into the 'mods' folder. Requires Minecraft 1.6.2 and Forge Universal.
Mods using this mod:
AvatarMod
[represent]
:3 thanks!
Yep! Look at the method Schematic.convertBlocks, it takes 3 arguements. The id, the vanilla block, and the new replacement block. (id, Block, Block)
the method is (pseudeo)
if (id == block) {
Block.replaceblock = newBlock;
}
So, yes, the ID of the vanilla block. And no, you cannot currently edit NBT (Although loading is supported). I'll work on that
Will do Not exactly sure how to go about doing it, but I'm sure there is a way.
So, if you spawn in a house with wood in the center, you want the mob to spawn on the coords of that wood?
Sadly, no, but I'll be sure to add that soon.
Planned:
NBT Editing
Coord location
Getting blocks relative to specific areas (what is 3 blocks above the ground, below, etc.)
http://www.creeperrepo.net/downloads/avatarmod/SchematicReader_1.1.2_1.6.2.zip
Added -
Fetching origins with NBT (getOriginFromNBT)
Fetching origins (getOrigin)
Seeding (setSeeding, getSeedingCoords, setSeedingInfo)
Deleted? What do you mean?
thanks, hope it helps
https://github.com/Giraffestock/SchematicReaderTest