Closed MattJohns closed 7 years ago
Thank a lot for the contribution. I know it was a lot of effort.
No problem. Feel free to close those other pull requests. I'm going to delete the original repository where I made some branching errors.
Thanks a ton for this. So many countless lost hours with trying to get placesbesides working. Now if only we can get this feature to 1.11.2!
I'm pretty sure the feature does work for 1.11.2. At least it's in the master branch, which is 1.11.2 now.
Yeah sorry noticed that way to late.
On Jun 19, 2017 1:44 AM, "Michael Lawrence" notifications@github.com<mailto:notifications@github.com> wrote:
I'm pretty sure the feature does work for 1.11.2. At least it's in the master branch, which is 1.11.2 now.
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/lawremi/CustomOreGen/pull/197#issuecomment-309343945, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFxMcDp1qA_ctlpO4VrnDw1oABGoZVnnks5sFgqqgaJpZM4N1lD1.
Adds additional functionality to
PlacesBeside
configuration option for ore distributions. A new XML element has been added calledTouches
that has a superset of thePlacesBeside
functionality.PlacesBeside
will still be kept for legacy usage and existing configuration files will not be affected for users.The new configuration option has the following features:
block
attribute sets the block type to check forblock
can be a regular expression like the PlacesBeside command. This is controlled by appending 'Regexp' to the touches command (TouchesRegexp
instead ofTouches
). Alternatively you can also append 'Ore'.minimumTouches
andmaximumTouches
define the number of touching blocks allowed. Defaults to minimum of 0 and maximum of 26 (3x3x3 blocks minus the block being placed).volume
defines the area to check for blocks. Can beany
,planeXY
,planeXZ
,planeYZ
. The planes are 3x3 slabs. Defaults toany
which is all 26 surrounding blocks.contactType
is how the blocks touch the block that is being placed. Can beany
,face
,edge
,vertex
,faceAndEdge
. Defaults toface
because that is what the user expects in most cases.direction
defines which side of the block to check on. Can beany
,north
,east
,south
,west
,up
,down
,northSouth
,eastWest
,northEast
,northWest
,southEast
,southWest
,vertical
,horizontal
.north
refers to the 3x3 wall of blocks to the north of the block being checked.northSouth
means any of the 18 blocks to north or the south. Similarly,vertical
is the top 9 blocks or the bottom 9 blocks (so everything except sideways blocks). Horizontal is all blocks except the block directly above and below, so 24 blocks total.mandatory
means the placement command must pass otherwise the block is not placed, regardless of any otherTouches
commands. Can betrue
orfalse
(default). At least one non-mandatory command must pass otherwise the block is not placed. Even though this seems strange, it doesn't make sense to allow a placement if all non-mandatoryTouches
commands fail. It would mean you just place it every time which is redundant.negate
simply flips the result of the placement restriction check. So if you have a rule like:<Touches block='minecraft:grass' negate='true' />
then blocks will only be placed when they are not touching grass. Defaults to false. Boolean logic can be controlled via a combination ofmandatory
andnegate
which are the equivalent of 'and', 'or' and 'not'.All attributes are optional except for
block
.minimumTouches
must not be greater thanmaximumTouches
. Commands are executed in the order they are found in the XML configuration. The attributesvolume
,contactType
anddirection
are combined together using 'and' logic rather than 'or'. So a direction ofnorth
specifies the 3x3 slab to the north but if the command also has a volume ofplaneXZ
it will only be the 3 of those 9 blocks that sit on the same y level as the block being checked.There are issues at chunk boundaries which will cause missing blocks due to placement checks being made when some chunks are not yet loaded at all. If you are having issues with placement restrictions check whether they are occurring at a chunk boundary. This only affects placements that refer to other ore distributions, it doesn't affect those that reference natural terrain.
Examples:
PlacesBeside
is used:<VeinsPreset name='test'>
<OreBlock block='minecraft:grass' />
<Touches block='minecraft:stone' direction='south' />
</VeinsPreset>
<VeinsPreset name='test'>
<OreBlock block='minecraft:grass' />
<Touches block='minecraft:stone' direction='northSouth' minimumTouches='2' mandatory='false' />
<Touches block='minecraft:stone' direction='eastWest' minimumTouches='2' mandatory='false' />
<Touches block='minecraft:stone' direction='any' volume='planeXZ' maximumTouches='2' mandatory='true' />
</VeinsPreset>