Walkthrough Part 5 - ProjectZulu/JustAnotherSpawner GitHub Wiki
This section is about Spawntags and how they relate to the three main areas Creature types Living Handlers Spawn List Entries
Welcome to the final chapter. the Spawn tags. You will find more samples, walkthroughs and confusion than you can handle :)
We will work with the sections in order and remember we have another section dedicated to a particular set of mods like Lycancites and MOC. We will be adding FTMP at some point as well. if you can master these, you can handle any mod :)
Lycancite embodies features that must be halted in his config to have JAS have control, and other parts that must be turned off or controlled via lycancite as they are special spawns.
MOC embodies features that require the use of NBT tags as well as having to turn things off in his config for JAS to have control.
Father Toast is just a solid end to the mob cycle that can add infinite options on top of JAS's infinite control of spawning.
Spawntag
its all about stuff like: "Spawn Tag": "!solidside(1,{0,0,0},{0,-1,0})||liquid({0,0,0},{0,0,0})||normal({0,0,0},{0,0,0})||normal({0,0,0},{0,1,0})||!opaque({0,0,0},{0,-1,0})"
lets get busy...
LanariusH:
solidside(1,{0,0,0},{0,-1,0})
Can someone tell me what each individual element of this represents? It's by far the least clearly documented part of the whole thing.. I can't find anything that really explains it properly. (I get the || and && functions, that basic logic I'm following... But what are (1,{0,0,0},{0,-1,0})?
PitchBright:
boolean solidside(Integer side, Integer[3] searchRange, Integer[3] searchOffsets)
So basically… what you're doing is defining which side of the block (I'm assuming side 1 is the Top)… and (as I understand it)… the center point on the entity, and finally the offset of that center point.
So I think if it were in English… it would read: "Here is a solidblock top 1 block below the entity's center"
LanariusH:
Let me see if I got this:
- boolean - result type being looked for
- solidside - look for a solid side of a block
- Integer side, - Which side of the block are we checking to see if it's solid?
- {x,y,z} searchrange - ... What does this do? I definitely DON'T understand this one.
- {x,y,z} searchOffsets - Where to check for conditions relative to spawnpoint.
So searchOffsets{0,-1,0} says to check -1y just below the spawnpoint, yes?
So far all of that is making sense to me... But what about searchrange? What is that actually doing?
Pitchbright:
- {x,y,z} searchrange - … How far on each axis to search (from the spawnpoint)
- {x,y,z} searchOffsets - The offset location of the spawnpoint
So searchOffsets{0,-1,0} says to check -1y just below the spawnpoint, yes?
YES
solidside(1,{0,0,0},{0,-1,0})
search 0,0,0 in each direction from 0,-1,0 from the spawnpoint… which ends up being "that one exact block (nothing more or less) that is 1 block below the spawnpoint
PitchBright View User Profile View Posts Send Message Follow User Ignore User Curse Premium PitchBright's avatar Stuck at Home Join Date: 4/30/2011 Posts: 819 Quote from LunariusH»
Let me see if I got this:
boolean - result type being looked for) solidside - look for a solid side of a block) (Integer side, - Which side of the block are we checking to see if it's solid? {x,y,z} searchrange - ... What does this do? I definitely DON'T understand this one. {x,y,z} searchOffsets - Where to check for conditions relative to spawnpoint.
So searchOffsets{0,-1,0} says to check -1y from spawn, or just below the spawnpoint, yes?
So far all of that is making sense to me... But what about searchrange? What is that actually doing?
I remember now...
{x,y,z} searchrange - … How far on each axis to search (from the spawnpoint) {x,y,z} searchOffsets - The offset location of the spawnpoint
So searchOffsets{0,-1,0} says to check -1y from spawn, or just below the spawnpoint, yes? -Yes solidside(1,{0,0,0},{0,-1,0}) search 0,0,0 in each direction from 0,-1,0 from the spawnpoint… which ends up being "that one exact block (nothing more or less) that is 1 block below the spawnpoint
EDIT
Another example would be:
solidside(1,{2,0,4},{0,-5,0})
That would be… "check for any block that has a solid top… that falls into a radius of 2 along the x-axis, and radius of 4 along the z-axis…. centered at a point exactly 5 blocks below the entity being spawned in.
LanariusH:
Now that makes a remarkable amount of sense.. That's much clearer than the docs on the site.
Except that is now on the site :)