mirror of
https://github.com/GTNewHorizons/StructureLib.git
synced 2026-11-22 04:52:09 +00:00
2820 lines
226 KiB
HTML
2820 lines
226 KiB
HTML
<!DOCTYPE HTML>
|
|
<!-- NewPage -->
|
|
<html lang="en">
|
|
<head>
|
|
<!-- Generated by javadoc -->
|
|
<title>StructureUtility (StructureLib 1.4.27 API)</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
|
|
<link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.min.css" title="Style">
|
|
<link rel="stylesheet" type="text/css" href="../../../../jquery-ui.overrides.css" title="Style">
|
|
<script type="text/javascript" src="../../../../script.js"></script>
|
|
<script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script>
|
|
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
|
|
<!--[if IE]>
|
|
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
|
|
<![endif]-->
|
|
<script type="text/javascript" src="../../../../jquery/jquery-3.7.1.min.js"></script>
|
|
<script type="text/javascript" src="../../../../jquery/jquery-ui.min.js"></script>
|
|
</head>
|
|
<body>
|
|
<script type="text/javascript"><!--
|
|
try {
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="StructureUtility (StructureLib 1.4.27 API)";
|
|
}
|
|
}
|
|
catch(err) {
|
|
}
|
|
//-->
|
|
var data = {"i0":9,"i1":9,"i2":9,"i3":41,"i4":41,"i5":9,"i6":9,"i7":41,"i8":41,"i9":41,"i10":41,"i11":41,"i12":41,"i13":41,"i14":41,"i15":9,"i16":9,"i17":9,"i18":9,"i19":9,"i20":9,"i21":9,"i22":9,"i23":9,"i24":9,"i25":9,"i26":9,"i27":9,"i28":9,"i29":9,"i30":9,"i31":9,"i32":9,"i33":9,"i34":9,"i35":9,"i36":9,"i37":9,"i38":9,"i39":9,"i40":9,"i41":9,"i42":9,"i43":9,"i44":9,"i45":9,"i46":9,"i47":9,"i48":9,"i49":9,"i50":9,"i51":9,"i52":9,"i53":9,"i54":9,"i55":9,"i56":9,"i57":9,"i58":9,"i59":9,"i60":9,"i61":9,"i62":9,"i63":9,"i64":9,"i65":9,"i66":9,"i67":9,"i68":9,"i69":9,"i70":9,"i71":9,"i72":9,"i73":9,"i74":9,"i75":9,"i76":9};
|
|
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]};
|
|
var altColor = "altColor";
|
|
var rowColor = "rowColor";
|
|
var tableTab = "tableTab";
|
|
var activeTableTab = "activeTableTab";
|
|
var pathtoroot = "../../../../";
|
|
var useModuleDirectories = true;
|
|
loadScripts(document, 'script');</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<header role="banner">
|
|
<nav role="navigation">
|
|
<div class="fixedNav">
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<div class="topNav"><a id="navbar.top">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a id="navbar.top.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../../index-all.html">Index</a></li>
|
|
<li><a href="../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../../index.html?com/gtnewhorizon/structurelib/structure/StructureUtility.html" target="_top">Frames</a></li>
|
|
<li><a href="StructureUtility.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_top">
|
|
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<ul class="navListSearch">
|
|
<li><label for="search">SEARCH:</label>
|
|
<input type="text" id="search" value="search" disabled="disabled">
|
|
<input type="reset" id="reset" value="reset" disabled="disabled">
|
|
</li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li>Field | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a id="skip.navbar.top">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
</div>
|
|
<div class="navPadding"> </div>
|
|
<script type="text/javascript"><!--
|
|
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
|
//-->
|
|
</script>
|
|
</nav>
|
|
</header>
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<main role="main">
|
|
<div class="header">
|
|
<div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">com.gtnewhorizon.structurelib.structure</a></div>
|
|
<h2 title="Class StructureUtility" class="title">Class StructureUtility</h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<ul class="inheritance">
|
|
<li>java.lang.Object</li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>com.gtnewhorizon.structurelib.structure.StructureUtility</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<hr>
|
|
<pre>public class <span class="typeNameLabel">StructureUtility</span>
|
|
extends java.lang.Object</pre>
|
|
<div class="block">A brief index of everything contained
|
|
<h2>Control blocks</h2> A lot of these might seem to make more sense as a default function on
|
|
<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure"><code>IStructureElement</code></a>. However, in that case javac generic will often fail to infer the type for you, so we have
|
|
to define them as static methods
|
|
<h2>If block</h2> Provide if block, allowing downstream call only if user specified conditions are meet (i.e.
|
|
predicate returns true)
|
|
<ul>
|
|
<li><a href="#onlyIf(java.util.function.Predicate,com.gtnewhorizon.structurelib.structure.IStructureElement)"><code>onlyIf(Predicate, IStructureElement)</code></a> and its overloads</li>
|
|
</ul>
|
|
<h2>Switch block</h2> Provide switch block, allowing to select a downstream element by using a key or index computed
|
|
from trigger item and/or context object.
|
|
<ul>
|
|
<li><a href="#partitionBy(java.util.function.Function,com.gtnewhorizon.structurelib.structure.IStructureElement...)"><code>partitionBy(Function, IStructureElement[])</code></a> and its overloads</li>
|
|
</ul>
|
|
<h2>Or Chain</h2> Provide a short-circuiting OR chain.
|
|
<ul>
|
|
<li><a href="#ofChain(com.gtnewhorizon.structurelib.structure.IStructureElement...)"><code>ofChain(IStructureElement[])</code></a> and its overloads</li>
|
|
</ul>
|
|
<h3>Side effect</h3> Provide callbacks on various occasion
|
|
<ul>
|
|
<li><a href="#onElementPass(java.util.function.Consumer,B)"><code>onElementPass(Consumer, IStructureElement)</code></a>: Call an callback upon element check success</li>
|
|
<li><a href="#onElementFail(java.util.function.Consumer,B)"><code>onElementFail(Consumer, IStructureElement)</code></a>: Call an callback upon element check failure</li>
|
|
</ul>
|
|
|
|
<h2>Other Primitives</h2>
|
|
<h3>Error statement</h3> Unconditionally return false.
|
|
<ul>
|
|
<li><a href="#error()"><code>error()</code></a></li>
|
|
</ul>
|
|
<h3>Context Object Change</h3> Switch the context object.
|
|
<ul>
|
|
<li><a href="#withContext(com.gtnewhorizon.structurelib.structure.IStructureElement)"><code>withContext(IStructureElement)</code></a>: switch context to the extended context</li>
|
|
</ul>
|
|
<h3>Channel Change</h3> Change the channel. See <a href="../../../../overview-summary.html#channels">Channels section
|
|
on overview</a> for more information.
|
|
<ul>
|
|
<li><a href="#withChannel(java.lang.String,com.gtnewhorizon.structurelib.structure.IStructureElement)"><code>withChannel(String, IStructureElement)</code></a>: switch channel using
|
|
<a href="../alignment/constructable/ChannelDataAccessor.html#withChannel(net.minecraft.item.ItemStack,java.lang.String)"><code>ChannelDataAccessor.withChannel(ItemStack, String)</code></a> when a trigger item is present.</li>
|
|
</ul>
|
|
<h3>Spawn hint particle</h3> Just spawn a hint. Do nothing otherwise. Useful when you want to override the hint
|
|
provided by another structure element, or as a fallback to a structure element that is check only.
|
|
<ul>
|
|
<li><a href="#ofHint(int)"><code>ofHint(int)</code></a>, <a href="#ofHintDeferred(java.util.function.Supplier)"><code>ofHintDeferred(Supplier)</code></a> and its overloads</li>
|
|
</ul>
|
|
|
|
<h2>Actual Element</h2> These elements are elements that can actually do structure check, spawn hint and do auto
|
|
place. Elements listed in above 2 sections are not going to be helpful without elements like these. They also serve
|
|
as a reference implementation for your own custom <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure"><code>IStructureElement</code></a> implementations.
|
|
<h3>Simple Block Element</h3> These accept one or more different block types in one location.
|
|
<ul>
|
|
<li><a href="#ofBlock(net.minecraft.block.Block,int,net.minecraft.block.Block,int)"><code>ofBlock(Block, int, Block, int)</code></a>, <a href="#ofBlocksFlat(java.util.Map,net.minecraft.block.Block,int)"><code>ofBlocksFlat(Map, Block, int)</code></a>,
|
|
<a href="#ofBlocksMap(java.util.Map,net.minecraft.block.Block,int)"><code>ofBlocksMap(Map, Block, int)</code></a> and their overloads: the most basic form</li>
|
|
<li><a href="#ofBlockHint(net.minecraft.block.Block,int,net.minecraft.block.Block,int)"><code>ofBlockHint(Block, int, Block, int)</code></a>, <a href="#ofBlocksFlatHint(java.util.Map,net.minecraft.block.Block,int)"><code>ofBlocksFlatHint(Map, Block, int)</code></a>,
|
|
<a href="#ofBlocksMapHint(java.util.Map,net.minecraft.block.Block,int)"><code>ofBlocksMapHint(Map, Block, int)</code></a>: these are the same as above, but will not do autoplace</li>
|
|
<li><a href="#isAir()"><code>isAir()</code></a>, <a href="#notAir()"><code>notAir()</code></a>: They are supplied by default under the identifier <code>'-'</code> and
|
|
<code>'+'</code> respectively, but are provided here regardless in case you want to use them as a fallback.</li>
|
|
</ul>
|
|
<h3>Complex Block Element</h3> In case your logic on determining which block is accepted is complex, use these.
|
|
<ul>
|
|
<li><a href="#ofBlockAdder(com.gtnewhorizon.structurelib.structure.adders.IBlockAdder,net.minecraft.block.Block,int)"><code>ofBlockAdder(IBlockAdder, Block, int)</code></a>, <a href="#ofBlockAdderHint(com.gtnewhorizon.structurelib.structure.adders.IBlockAdder,net.minecraft.block.Block,int)"><code>ofBlockAdderHint(IBlockAdder, Block, int)</code></a> and their
|
|
overloads: hands off actual adder logic to an <a href="adders/IBlockAdder.html" title="interface in com.gtnewhorizon.structurelib.structure.adders"><code>IBlockAdder</code></a> you supplied. Save you the boilerplate of querying
|
|
block type and block meta from <a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/world/World.html?is-external=true" title="class or interface in net.minecraft.world" class="externalLink"><code>World</code></a></li>
|
|
<li><a href="#ofBlocksTiered(com.gtnewhorizon.structurelib.structure.ITierConverter,TIER,java.util.function.BiConsumer,java.util.function.Function)"><code>ofBlocksTiered(ITierConverter, Object, BiConsumer, Function)</code></a> and its overloads: accept a series of
|
|
blocks that each may have different tier, but only allow one single tier for anywhere this element is used (e.g.
|
|
coils).</li>
|
|
<li><a href="#ofTileAdder(com.gtnewhorizon.structurelib.structure.adders.ITileAdder,net.minecraft.block.Block,int)"><code>ofTileAdder(ITileAdder, Block, int)</code></a>, <a href="#ofSpecificTileAdder(java.util.function.BiPredicate,java.lang.Class,net.minecraft.block.Block,int)"><code>ofSpecificTileAdder(BiPredicate, Class, Block, int)</code></a>:
|
|
Similar to block adder, but for tile entities.</li>
|
|
</ul>
|
|
|
|
<h2>Helper Methods</h2> These don't construct a <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure"><code>IStructureElement</code></a>, but is helpful to the instantiation or
|
|
implementation of these.
|
|
<ul>
|
|
<li><a href="#survivalPlaceBlock(net.minecraft.block.Block,int,net.minecraft.world.World,int,int,int,com.gtnewhorizon.structurelib.structure.IItemSource,net.minecraft.entity.player.EntityPlayer,java.util.function.Consumer)"><code>survivalPlaceBlock(Block, int, World, int, int, int, IItemSource, EntityPlayer, Consumer)</code></a> and its
|
|
overloads: Helper method to cut common boilerplate for implementing
|
|
<a href="IStructureElement.html#survivalPlaceBlock(T,net.minecraft.world.World,int,int,int,net.minecraft.item.ItemStack,com.gtnewhorizon.structurelib.structure.IItemSource,net.minecraft.entity.player.EntityPlayerMP,java.util.function.Consumer)"><code>IStructureElement.survivalPlaceBlock(Object, World, int, int, int, ItemStack, IItemSource, EntityPlayerMP, Consumer)</code></a></li>
|
|
<li><a href="#getPseudoJavaCode(net.minecraft.world.World,com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing,int,int,int,int,int,int,java.util.function.Function,int,int,int,boolean)"><code>getPseudoJavaCode(World, ExtendedFacing, int, int, int, int, int, int, Function, int, int, int, boolean)</code></a>:
|
|
Generate a structure code template from existing structure.</li>
|
|
<li><a href="#iterate(net.minecraft.world.World,com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing,int,int,int,int,int,int,boolean,int,int,int,com.gtnewhorizon.structurelib.structure.IBlockPosConsumer,java.lang.Runnable,java.lang.Runnable)"><code>iterate(World, ExtendedFacing, int, int, int, int, int, int, boolean, int, int, int, IBlockPosConsumer, Runnable, Runnable)</code></a>
|
|
and its overloads: help iterate over a coordinate space.</li>
|
|
</ul></div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
<section>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="method.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Summary</h3>
|
|
<table class="memberSummary">
|
|
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd"> </span></span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colSecond" scope="col">Method</th>
|
|
<th class="colLast" scope="col">Description</th>
|
|
</tr>
|
|
<tr id="i0" class="altColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#defer(java.util.function.BiFunction)">defer</a></span>​(java.util.function.BiFunction<T,​<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a>,​<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> to)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">This will defer the actual instantiation of structure element until the structure code is actually called.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i1" class="rowColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#defer(java.util.function.BiFunction,com.gtnewhorizon.structurelib.structure.IStructureElement...)">defer</a></span>​(java.util.function.BiFunction<T,​<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a>,​java.lang.Integer> keyExtractor,
|
|
<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>... array)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">This is the switch block for structure code.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i2" class="altColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#defer(java.util.function.BiFunction,java.util.List)">defer</a></span>​(java.util.function.BiFunction<T,​<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a>,​java.lang.Integer> keyExtractor,
|
|
java.util.List<<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> array)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">This is the switch block for structure code.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i3" class="rowColor">
|
|
<td class="colFirst"><code>static <T,​K><br><a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#defer(java.util.function.BiFunction,java.util.Map)">defer</a></span>​(java.util.function.BiFunction<T,​<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a>,​K> keyExtractor,
|
|
java.util.Map<K,​<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> map)</code></th>
|
|
<td class="colLast">
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">renamed to partitionBy</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i4" class="altColor">
|
|
<td class="colFirst"><code>static <T,​K><br><a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#defer(java.util.function.BiFunction,java.util.Map,com.gtnewhorizon.structurelib.structure.IStructureElement)">defer</a></span>​(java.util.function.BiFunction<T,​<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a>,​K> keyExtractor,
|
|
java.util.Map<K,​<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> map,
|
|
<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> defaultElem)</code></th>
|
|
<td class="colLast">
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">renamed to partitionBy</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i5" class="rowColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#defer(java.util.function.Function)">defer</a></span>​(java.util.function.Function<T,​<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> to)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">This will defer the actual instantiation of structure element until the structure code is actually called.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i6" class="altColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#defer(java.util.function.Function,java.util.function.BiFunction)">defer</a></span>​(java.util.function.Function<T,​<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> toCheck,
|
|
java.util.function.BiFunction<T,​<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a>,​<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> to)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">This will defer the actual instantiation of structure element until the <b>first time</b> structure code is
|
|
actually called.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i7" class="rowColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#defer(java.util.function.Function,com.gtnewhorizon.structurelib.structure.IStructureElement...)">defer</a></span>​(java.util.function.Function<T,​java.lang.Integer> keyExtractor,
|
|
<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>... array)</code></th>
|
|
<td class="colLast">
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">renamed to partitionBy</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i8" class="altColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#defer(java.util.function.Function,java.util.function.BiFunction,com.gtnewhorizon.structurelib.structure.IStructureElement...)">defer</a></span>​(java.util.function.Function<T,​java.lang.Integer> keyExtractorCheck,
|
|
java.util.function.BiFunction<T,​<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a>,​java.lang.Integer> keyExtractor,
|
|
<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>... array)</code></th>
|
|
<td class="colLast">
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">renamed to partitionBy</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i9" class="rowColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#defer(java.util.function.Function,java.util.function.BiFunction,java.util.List)">defer</a></span>​(java.util.function.Function<T,​java.lang.Integer> keyExtractorCheck,
|
|
java.util.function.BiFunction<T,​<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a>,​java.lang.Integer> keyExtractor,
|
|
java.util.List<<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> array)</code></th>
|
|
<td class="colLast">
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">renamed to partitionBy</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i10" class="altColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#defer(java.util.function.Function,java.util.List)">defer</a></span>​(java.util.function.Function<T,​java.lang.Integer> keyExtractor,
|
|
java.util.List<<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> array)</code></th>
|
|
<td class="colLast">
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">renamed to partitionBy</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i11" class="rowColor">
|
|
<td class="colFirst"><code>static <T,​K><br><a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#defer(java.util.function.Function,java.util.function.BiFunction,java.util.Map)">defer</a></span>​(java.util.function.Function<T,​K> keyExtractorCheck,
|
|
java.util.function.BiFunction<T,​<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a>,​K> keyExtractor,
|
|
java.util.Map<K,​<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> map)</code></th>
|
|
<td class="colLast">
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">renamed to partitionBy</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i12" class="altColor">
|
|
<td class="colFirst"><code>static <T,​K><br><a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#defer(java.util.function.Function,java.util.function.BiFunction,java.util.Map,com.gtnewhorizon.structurelib.structure.IStructureElement)">defer</a></span>​(java.util.function.Function<T,​K> keyExtractorCheck,
|
|
java.util.function.BiFunction<T,​<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a>,​K> keyExtractor,
|
|
java.util.Map<K,​<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> map,
|
|
<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> defaultElem)</code></th>
|
|
<td class="colLast">
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">renamed to partitionBy</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i13" class="rowColor">
|
|
<td class="colFirst"><code>static <T,​K><br><a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#defer(java.util.function.Function,java.util.Map)">defer</a></span>​(java.util.function.Function<T,​K> keyExtractor,
|
|
java.util.Map<K,​<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> map)</code></th>
|
|
<td class="colLast">
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">renamed to partitionBy</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i14" class="altColor">
|
|
<td class="colFirst"><code>static <T,​K><br><a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#defer(java.util.function.Function,java.util.Map,com.gtnewhorizon.structurelib.structure.IStructureElement)">defer</a></span>​(java.util.function.Function<T,​K> keyExtractor,
|
|
java.util.Map<K,​<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> map,
|
|
<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> defaultElem)</code></th>
|
|
<td class="colLast">
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">renamed to partitionBy</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i15" class="rowColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#defer(java.util.function.Supplier)">defer</a></span>​(java.util.function.Supplier<<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> to)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">This will defer the actual instantiation of structure element until the structure code is actually called.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i16" class="altColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#error()">error</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Check returns false.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i17" class="rowColor">
|
|
<td class="colFirst"><code>static java.lang.String</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPseudoJavaCode(net.minecraft.world.World,com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing,int,int,int,int,int,int,java.util.function.Function,int,int,int,boolean)">getPseudoJavaCode</a></span>​(<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/world/World.html?is-external=true" title="class or interface in net.minecraft.world" class="externalLink">World</a> world,
|
|
<a href="../alignment/enumerable/ExtendedFacing.html" title="enum in com.gtnewhorizon.structurelib.alignment.enumerable">ExtendedFacing</a> extendedFacing,
|
|
int basePositionX,
|
|
int basePositionY,
|
|
int basePositionZ,
|
|
int basePositionA,
|
|
int basePositionB,
|
|
int basePositionC,
|
|
java.util.function.Function<? super <a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/tileentity/TileEntity.html?is-external=true" title="class or interface in net.minecraft.tileentity" class="externalLink">TileEntity</a>,​java.lang.String> tileEntityClassifier,
|
|
int sizeA,
|
|
int sizeB,
|
|
int sizeC,
|
|
boolean transpose)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Used only to get pseudo code in structure writer...</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i18" class="altColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isAir()">isAir</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Return a structure element that only allow air (or air equivalents, like Railcraft hidden blocks).</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i19" class="rowColor">
|
|
<td class="colFirst"><code>static void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#iterate(net.minecraft.world.World,com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing,int,int,int,int,int,int,boolean,int,int,int,com.gtnewhorizon.structurelib.structure.IBlockPosConsumer,java.lang.Runnable,java.lang.Runnable)">iterate</a></span>​(<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/world/World.html?is-external=true" title="class or interface in net.minecraft.world" class="externalLink">World</a> world,
|
|
<a href="../alignment/enumerable/ExtendedFacing.html" title="enum in com.gtnewhorizon.structurelib.alignment.enumerable">ExtendedFacing</a> extendedFacing,
|
|
int basePositionX,
|
|
int basePositionY,
|
|
int basePositionZ,
|
|
int basePositionA,
|
|
int basePositionB,
|
|
int basePositionC,
|
|
boolean transpose,
|
|
int sizeA,
|
|
int sizeB,
|
|
int sizeC,
|
|
<a href="IBlockPosConsumer.html" title="interface in com.gtnewhorizon.structurelib.structure">IBlockPosConsumer</a> iBlockPosConsumer,
|
|
java.lang.Runnable nextB,
|
|
java.lang.Runnable nextC)</code></th>
|
|
<td class="colLast"> </td>
|
|
</tr>
|
|
<tr id="i20" class="altColor">
|
|
<td class="colFirst"><code>static void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#iterate(net.minecraft.world.World,com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing,int,int,int,int,int,int,int,int,int,com.gtnewhorizon.structurelib.structure.IBlockPosConsumer)">iterate</a></span>​(<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/world/World.html?is-external=true" title="class or interface in net.minecraft.world" class="externalLink">World</a> world,
|
|
<a href="../alignment/enumerable/ExtendedFacing.html" title="enum in com.gtnewhorizon.structurelib.alignment.enumerable">ExtendedFacing</a> extendedFacing,
|
|
int basePositionX,
|
|
int basePositionY,
|
|
int basePositionZ,
|
|
int basePositionA,
|
|
int basePositionB,
|
|
int basePositionC,
|
|
int sizeA,
|
|
int sizeB,
|
|
int sizeC,
|
|
<a href="IBlockPosConsumer.html" title="interface in com.gtnewhorizon.structurelib.structure">IBlockPosConsumer</a> iBlockPosConsumer)</code></th>
|
|
<td class="colLast"> </td>
|
|
</tr>
|
|
<tr id="i21" class="rowColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#lazy(java.util.function.Function)">lazy</a></span>​(java.util.function.Function<T,​<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> to)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">This will defer the actual instantiation of structure element until the <b>first time</b> structure code is
|
|
actually called.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i22" class="altColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#lazy(java.util.function.Supplier)">lazy</a></span>​(java.util.function.Supplier<<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> to)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Similar to defer, but caches the first returned element returned and won't call it again.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i23" class="rowColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#notAir()">notAir</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Return a structure element that allow anything but air (or air equivalents, like Railcraft hidden blocks).</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i24" class="altColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ofBlock(net.minecraft.block.Block,int)">ofBlock</a></span>​(<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> block,
|
|
int meta)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Accept a single block with a fixed meta.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i25" class="rowColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ofBlock(net.minecraft.block.Block,int,net.minecraft.block.Block,int)">ofBlock</a></span>​(<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> block,
|
|
int meta,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> defaultBlock,
|
|
int defaultMeta)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Accept a block.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i26" class="altColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ofBlockAdder(com.gtnewhorizon.structurelib.structure.adders.IBlockAdder,int)">ofBlockAdder</a></span>​(<a href="adders/IBlockAdder.html" title="interface in com.gtnewhorizon.structurelib.structure.adders">IBlockAdder</a><T> iBlockAdder,
|
|
int dots)</code></th>
|
|
<td class="colLast"> </td>
|
|
</tr>
|
|
<tr id="i27" class="rowColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ofBlockAdder(com.gtnewhorizon.structurelib.structure.adders.IBlockAdder,net.minecraft.block.Block,int)">ofBlockAdder</a></span>​(<a href="adders/IBlockAdder.html" title="interface in com.gtnewhorizon.structurelib.structure.adders">IBlockAdder</a><T> iBlockAdder,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> defaultBlock,
|
|
int defaultMeta)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Add a block using block adder.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i28" class="altColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElementNoPlacement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementNoPlacement</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ofBlockAdderHint(com.gtnewhorizon.structurelib.structure.adders.IBlockAdder,net.minecraft.block.Block,int)">ofBlockAdderHint</a></span>​(<a href="adders/IBlockAdder.html" title="interface in com.gtnewhorizon.structurelib.structure.adders">IBlockAdder</a><T> iBlockAdder,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> hintBlock,
|
|
int hintMeta)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Add a block using block adder.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i29" class="rowColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ofBlockAnyMeta(net.minecraft.block.Block)">ofBlockAnyMeta</a></span>​(<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> block)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Accept a single block, but accept any meta.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i30" class="altColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ofBlockAnyMeta(net.minecraft.block.Block,int)">ofBlockAnyMeta</a></span>​(<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> block,
|
|
int defaultMeta)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Accept a single block, but accept any meta.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i31" class="rowColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ofBlockAnyMeta(net.minecraft.block.Block,net.minecraft.block.Block,int)">ofBlockAnyMeta</a></span>​(<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> block,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> defaultBlock,
|
|
int defaultMeta)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Same as <a href="#ofBlock(net.minecraft.block.Block,int,net.minecraft.block.Block,int)"><code>ofBlock(Block, int, Block, int)</code></a> but ignores target meta id</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i32" class="altColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElementNoPlacement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementNoPlacement</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ofBlockHint(net.minecraft.block.Block,int)">ofBlockHint</a></span>​(<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> block,
|
|
int meta)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Accept one (block, meta).</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i33" class="rowColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElementNoPlacement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementNoPlacement</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ofBlockHint(net.minecraft.block.Block,int,net.minecraft.block.Block,int)">ofBlockHint</a></span>​(<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> block,
|
|
int meta,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> hintBlock,
|
|
int hintMeta)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Accept one (block, meta).</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i34" class="altColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ofBlocksFlat(java.util.Map,net.minecraft.block.Block,int)">ofBlocksFlat</a></span>​(java.util.Map<<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a>,​java.lang.Integer> blocsMap,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> defaultBlock,
|
|
int defaultMeta)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Accept a set of blocks.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i35" class="rowColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElementNoPlacement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementNoPlacement</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ofBlocksFlatHint(java.util.Map,net.minecraft.block.Block,int)">ofBlocksFlatHint</a></span>​(java.util.Map<<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a>,​java.lang.Integer> blocsMap,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> hintBlock,
|
|
int hintMeta)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Accept a set of blocks.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i36" class="altColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ofBlocksMap(java.util.Map,net.minecraft.block.Block,int)">ofBlocksMap</a></span>​(java.util.Map<<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a>,​java.util.Collection<java.lang.Integer>> blocsMap,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> defaultBlock,
|
|
int defaultMeta)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Accept a set of blocks.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i37" class="rowColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElementNoPlacement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementNoPlacement</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ofBlocksMapHint(java.util.Map,net.minecraft.block.Block,int)">ofBlocksMapHint</a></span>​(java.util.Map<<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a>,​java.util.Collection<java.lang.Integer>> blocsMap,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> hintBlock,
|
|
int hintMeta)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Accept a set of blocks.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i38" class="altColor">
|
|
<td class="colFirst"><code>static <T,​TIER><br><a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ofBlocksTiered(com.gtnewhorizon.structurelib.structure.ITierConverter,java.util.List,TIER,java.util.function.BiConsumer,java.util.function.Function)">ofBlocksTiered</a></span>​(<a href="ITierConverter.html" title="interface in com.gtnewhorizon.structurelib.structure">ITierConverter</a><TIER> tierExtractor,
|
|
java.util.List<org.apache.commons.lang3.tuple.Pair<<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a>,​java.lang.Integer>> allKnownTiers,
|
|
TIER notSet,
|
|
java.util.function.BiConsumer<T,​TIER> setter,
|
|
java.util.function.Function<T,​TIER> getter)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Element representing a component with different tiers.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i39" class="rowColor">
|
|
<td class="colFirst"><code>static <T,​TIER><br><a href="IStructureElementCheckOnly.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementCheckOnly</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ofBlocksTiered(com.gtnewhorizon.structurelib.structure.ITierConverter,TIER,java.util.function.BiConsumer,java.util.function.Function)">ofBlocksTiered</a></span>​(<a href="ITierConverter.html" title="interface in com.gtnewhorizon.structurelib.structure">ITierConverter</a><TIER> tierExtractor,
|
|
TIER notSet,
|
|
java.util.function.BiConsumer<T,​TIER> setter,
|
|
java.util.function.Function<T,​TIER> getter)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">A more primitive variant of <a href="#ofBlocksTiered(com.gtnewhorizon.structurelib.structure.ITierConverter,java.util.List,TIER,java.util.function.BiConsumer,java.util.function.Function)"><code>ofBlocksTiered(ITierConverter, List, Object, BiConsumer, Function)</code></a> Main
|
|
difference is this one is check only.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i40" class="altColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ofBlockUnlocalizedName(java.lang.String,java.lang.String,int)">ofBlockUnlocalizedName</a></span>​(java.lang.String modid,
|
|
java.lang.String unlocalizedName,
|
|
int meta)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Denote a block using unlocalized names.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i41" class="rowColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ofBlockUnlocalizedName(java.lang.String,java.lang.String,int,boolean)">ofBlockUnlocalizedName</a></span>​(java.lang.String modid,
|
|
java.lang.String registryName,
|
|
int meta,
|
|
boolean wildcard)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Denote a block using unlocalized names.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i42" class="altColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ofBlockUnlocalizedName(java.lang.String,java.lang.String,int,com.gtnewhorizon.structurelib.structure.IStructureElement)">ofBlockUnlocalizedName</a></span>​(java.lang.String modid,
|
|
java.lang.String unlocalizedName,
|
|
int meta,
|
|
<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> fallback)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Similiar to the other overload, but allows client code to specify a fallback in case said block was not found
|
|
later when the element got called.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i43" class="rowColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElementChain.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementChain</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ofChain(com.gtnewhorizon.structurelib.structure.IStructureElement...)">ofChain</a></span>​(<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>... elementChain)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">This allows you to compose different <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure"><code>IStructureElement</code></a> to form a <b>OR</b> chain.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i44" class="altColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElementChain.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementChain</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ofChain(java.util.List)">ofChain</a></span>​(java.util.List<<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> elementChain)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">This allows you to compose different <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure"><code>IStructureElement</code></a> to form a <b>OR</b> chain.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i45" class="rowColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElementNoPlacement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementNoPlacement</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ofHint(int)">ofHint</a></span>​(int dots)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Spawn a hint with given amount of dots.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i46" class="altColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElementNoPlacement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementNoPlacement</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ofHintDeferred(java.util.function.Supplier)">ofHintDeferred</a></span>​(java.util.function.Supplier<<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/util/IIcon.html?is-external=true" title="class or interface in net.minecraft.util" class="externalLink">IIcon</a>[]> icons)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Spawn a hint with given textures.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i47" class="rowColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElementNoPlacement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementNoPlacement</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ofHintDeferred(java.util.function.Supplier,short%5B%5D)">ofHintDeferred</a></span>​(java.util.function.Supplier<<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/util/IIcon.html?is-external=true" title="class or interface in net.minecraft.util" class="externalLink">IIcon</a>[]> icons,
|
|
short[] RGBa)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Spawn a hint with given amount of textures and tint.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i48" class="altColor">
|
|
<td class="colFirst"><code>static <T,​E><br><a href="IStructureElementNoPlacement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementNoPlacement</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ofSpecificTileAdder(java.util.function.BiPredicate,java.lang.Class,net.minecraft.block.Block,int)">ofSpecificTileAdder</a></span>​(java.util.function.BiPredicate<T,​E> iTileAdder,
|
|
java.lang.Class<E> tileClass,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> hintBlock,
|
|
int hintMeta)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Try to add a structure element with a particular type of tile entity.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i49" class="rowColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElementNoPlacement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementNoPlacement</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ofTileAdder(com.gtnewhorizon.structurelib.structure.adders.ITileAdder,net.minecraft.block.Block,int)">ofTileAdder</a></span>​(<a href="adders/ITileAdder.html" title="interface in com.gtnewhorizon.structurelib.structure.adders">ITileAdder</a><T> iTileAdder,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> hintBlock,
|
|
int hintMeta)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Try to add a structure element with a tile entity.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i50" class="altColor">
|
|
<td class="colFirst"><code>static <B extends <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>,​T><br><a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onElementFail(java.util.function.Consumer,B)">onElementFail</a></span>​(java.util.function.Consumer<T> onFail,
|
|
B element)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Call a callback if downstream element returned false in check.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i51" class="rowColor">
|
|
<td class="colFirst"><code>static <B extends <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>,​T><br><a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onElementPass(java.util.function.Consumer,B)">onElementPass</a></span>​(java.util.function.Consumer<T> onCheckPass,
|
|
B element)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Call a callback if downstream element returned true in check.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i52" class="altColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onlyIf(java.util.function.Predicate,com.gtnewhorizon.structurelib.structure.IStructureElement)">onlyIf</a></span>​(java.util.function.Predicate<? super T> predicate,
|
|
<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><? super T> downstream)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Enable this structure element only if given predicate returns true.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i53" class="rowColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onlyIf(java.util.function.Predicate,com.gtnewhorizon.structurelib.structure.IStructureElement,com.gtnewhorizon.structurelib.structure.IStructureElement.PlaceResult)">onlyIf</a></span>​(java.util.function.Predicate<? super T> predicate,
|
|
<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><? super T> downstream,
|
|
<a href="IStructureElement.PlaceResult.html" title="enum in com.gtnewhorizon.structurelib.structure">IStructureElement.PlaceResult</a> placeResultWhenDisabled)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Enable this structure element only if given predicate returns true.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i54" class="altColor">
|
|
<td class="colFirst"><code>static <T,​K><br><a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#partitionBy(java.util.function.BiFunction,java.util.Map)">partitionBy</a></span>​(java.util.function.BiFunction<T,​<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a>,​K> keyExtractor,
|
|
java.util.Map<K,​<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> map)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">This is the switch block for structure code.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i55" class="rowColor">
|
|
<td class="colFirst"><code>static <T,​K><br><a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#partitionBy(java.util.function.BiFunction,java.util.Map,com.gtnewhorizon.structurelib.structure.IStructureElement)">partitionBy</a></span>​(java.util.function.BiFunction<T,​<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a>,​K> keyExtractor,
|
|
java.util.Map<K,​<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> map,
|
|
<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> defaultElem)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">This is the switch block for structure code, with default case support.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i56" class="altColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#partitionBy(java.util.function.Function,com.gtnewhorizon.structurelib.structure.IStructureElement...)">partitionBy</a></span>​(java.util.function.Function<T,​java.lang.Integer> keyExtractor,
|
|
<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>... array)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">This is the switch block for structure code.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i57" class="rowColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#partitionBy(java.util.function.Function,java.util.function.BiFunction,com.gtnewhorizon.structurelib.structure.IStructureElement...)">partitionBy</a></span>​(java.util.function.Function<T,​java.lang.Integer> keyExtractorCheck,
|
|
java.util.function.BiFunction<T,​<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a>,​java.lang.Integer> keyExtractor,
|
|
<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>... array)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">This is the switch block for structure code, with default case.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i58" class="altColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#partitionBy(java.util.function.Function,java.util.function.BiFunction,java.util.List)">partitionBy</a></span>​(java.util.function.Function<T,​java.lang.Integer> keyExtractorCheck,
|
|
java.util.function.BiFunction<T,​<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a>,​java.lang.Integer> keyExtractor,
|
|
java.util.List<<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> array)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">This is the switch block for structure code, with default case.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i59" class="rowColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#partitionBy(java.util.function.Function,java.util.List)">partitionBy</a></span>​(java.util.function.Function<T,​java.lang.Integer> keyExtractor,
|
|
java.util.List<<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> array)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">This is the switch block for structure code.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i60" class="altColor">
|
|
<td class="colFirst"><code>static <T,​K><br><a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#partitionBy(java.util.function.Function,java.util.function.BiFunction,java.util.Map)">partitionBy</a></span>​(java.util.function.Function<T,​K> keyExtractorCheck,
|
|
java.util.function.BiFunction<T,​<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a>,​K> keyExtractor,
|
|
java.util.Map<K,​<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> map)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">This is the switch block for structure code.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i61" class="rowColor">
|
|
<td class="colFirst"><code>static <T,​K><br><a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#partitionBy(java.util.function.Function,java.util.function.BiFunction,java.util.Map,com.gtnewhorizon.structurelib.structure.IStructureElement)">partitionBy</a></span>​(java.util.function.Function<T,​K> keyExtractorCheck,
|
|
java.util.function.BiFunction<T,​<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a>,​K> keyExtractor,
|
|
java.util.Map<K,​<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> map,
|
|
<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> defaultElem)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">This is the switch block for structure code, with default case.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i62" class="altColor">
|
|
<td class="colFirst"><code>static <T,​K><br><a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#partitionBy(java.util.function.Function,java.util.Map)">partitionBy</a></span>​(java.util.function.Function<T,​K> keyExtractor,
|
|
java.util.Map<K,​<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> map)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">This is the switch block for structure code.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i63" class="rowColor">
|
|
<td class="colFirst"><code>static <T,​K><br><a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#partitionBy(java.util.function.Function,java.util.Map,com.gtnewhorizon.structurelib.structure.IStructureElement)">partitionBy</a></span>​(java.util.function.Function<T,​K> keyExtractor,
|
|
java.util.Map<K,​<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> map,
|
|
<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> defaultElem)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">This is the switch block for structure code, with default case support.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i64" class="altColor">
|
|
<td class="colFirst"><code>static <T> com.gtnewhorizon.structurelib.structure.IStructureNavigate<T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#step(int,int,int)">step</a></span>​(int a,
|
|
int b,
|
|
int c)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Used internally, to generate skips for structure definitions</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i65" class="rowColor">
|
|
<td class="colFirst"><code>static <T> com.gtnewhorizon.structurelib.structure.IStructureNavigate<T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#step(com.gtnewhorizon.structurelib.util.Vec3Impl)">step</a></span>​(<a href="../util/Vec3Impl.html" title="class in com.gtnewhorizon.structurelib.util">Vec3Impl</a> step)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Used internally, to generate skips for structure definitions</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i66" class="altColor">
|
|
<td class="colFirst"><code>static <a href="IStructureElement.PlaceResult.html" title="enum in com.gtnewhorizon.structurelib.structure">IStructureElement.PlaceResult</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#survivalPlaceBlock(net.minecraft.block.Block,int,net.minecraft.world.World,int,int,int,com.gtnewhorizon.structurelib.structure.IItemSource,net.minecraft.entity.player.EntityPlayer)">survivalPlaceBlock</a></span>​(<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> block,
|
|
int meta,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/world/World.html?is-external=true" title="class or interface in net.minecraft.world" class="externalLink">World</a> world,
|
|
int x,
|
|
int y,
|
|
int z,
|
|
<a href="IItemSource.html" title="interface in com.gtnewhorizon.structurelib.structure">IItemSource</a> s,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/entity/player/EntityPlayer.html?is-external=true" title="class or interface in net.minecraft.entity.player" class="externalLink">EntityPlayer</a> actor)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">This is a helper method for implementing
|
|
<a href="IStructureElement.html#survivalPlaceBlock(T,net.minecraft.world.World,int,int,int,net.minecraft.item.ItemStack,com.gtnewhorizon.structurelib.structure.IItemSource,net.minecraft.entity.player.EntityPlayerMP,java.util.function.Consumer)"><code>IStructureElement.survivalPlaceBlock(Object, World, int, int, int, ItemStack, IItemSource, EntityPlayerMP, Consumer)</code></a></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i67" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="IStructureElement.PlaceResult.html" title="enum in com.gtnewhorizon.structurelib.structure">IStructureElement.PlaceResult</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#survivalPlaceBlock(net.minecraft.block.Block,int,net.minecraft.world.World,int,int,int,com.gtnewhorizon.structurelib.structure.IItemSource,net.minecraft.entity.player.EntityPlayerMP)">survivalPlaceBlock</a></span>​(<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> block,
|
|
int meta,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/world/World.html?is-external=true" title="class or interface in net.minecraft.world" class="externalLink">World</a> world,
|
|
int x,
|
|
int y,
|
|
int z,
|
|
<a href="IItemSource.html" title="interface in com.gtnewhorizon.structurelib.structure">IItemSource</a> s,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/entity/player/EntityPlayerMP.html?is-external=true" title="class or interface in net.minecraft.entity.player" class="externalLink">EntityPlayerMP</a> actor)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">This is a helper method for implementing
|
|
<a href="IStructureElement.html#survivalPlaceBlock(T,net.minecraft.world.World,int,int,int,net.minecraft.item.ItemStack,com.gtnewhorizon.structurelib.structure.IItemSource,net.minecraft.entity.player.EntityPlayerMP,java.util.function.Consumer)"><code>IStructureElement.survivalPlaceBlock(Object, World, int, int, int, ItemStack, IItemSource, EntityPlayerMP, Consumer)</code></a></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i68" class="altColor">
|
|
<td class="colFirst"><code>static <a href="IStructureElement.PlaceResult.html" title="enum in com.gtnewhorizon.structurelib.structure">IStructureElement.PlaceResult</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#survivalPlaceBlock(net.minecraft.block.Block,int,net.minecraft.world.World,int,int,int,com.gtnewhorizon.structurelib.structure.IItemSource,net.minecraft.entity.player.EntityPlayerMP,java.util.function.Consumer)">survivalPlaceBlock</a></span>​(<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> block,
|
|
int meta,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/world/World.html?is-external=true" title="class or interface in net.minecraft.world" class="externalLink">World</a> world,
|
|
int x,
|
|
int y,
|
|
int z,
|
|
<a href="IItemSource.html" title="interface in com.gtnewhorizon.structurelib.structure">IItemSource</a> s,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/entity/player/EntityPlayerMP.html?is-external=true" title="class or interface in net.minecraft.entity.player" class="externalLink">EntityPlayerMP</a> actor,
|
|
java.util.function.Consumer<<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/util/IChatComponent.html?is-external=true" title="class or interface in net.minecraft.util" class="externalLink">IChatComponent</a>> chatter)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">This is a helper method for implementing
|
|
<a href="IStructureElement.html#survivalPlaceBlock(T,net.minecraft.world.World,int,int,int,net.minecraft.item.ItemStack,com.gtnewhorizon.structurelib.structure.IItemSource,net.minecraft.entity.player.EntityPlayerMP,java.util.function.Consumer)"><code>IStructureElement.survivalPlaceBlock(Object, World, int, int, int, ItemStack, IItemSource, EntityPlayerMP, Consumer)</code></a></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i69" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="IStructureElement.PlaceResult.html" title="enum in com.gtnewhorizon.structurelib.structure">IStructureElement.PlaceResult</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#survivalPlaceBlock(net.minecraft.block.Block,int,net.minecraft.world.World,int,int,int,com.gtnewhorizon.structurelib.structure.IItemSource,net.minecraft.entity.player.EntityPlayer,java.util.function.Consumer)">survivalPlaceBlock</a></span>​(<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> block,
|
|
int meta,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/world/World.html?is-external=true" title="class or interface in net.minecraft.world" class="externalLink">World</a> world,
|
|
int x,
|
|
int y,
|
|
int z,
|
|
<a href="IItemSource.html" title="interface in com.gtnewhorizon.structurelib.structure">IItemSource</a> s,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/entity/player/EntityPlayer.html?is-external=true" title="class or interface in net.minecraft.entity.player" class="externalLink">EntityPlayer</a> actor,
|
|
java.util.function.Consumer<<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/util/IChatComponent.html?is-external=true" title="class or interface in net.minecraft.util" class="externalLink">IChatComponent</a>> chatter)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">This is a helper method for implementing
|
|
<a href="IStructureElement.html#survivalPlaceBlock(T,net.minecraft.world.World,int,int,int,net.minecraft.item.ItemStack,com.gtnewhorizon.structurelib.structure.IItemSource,net.minecraft.entity.player.EntityPlayerMP,java.util.function.Consumer)"><code>IStructureElement.survivalPlaceBlock(Object, World, int, int, int, ItemStack, IItemSource, EntityPlayerMP, Consumer)</code></a></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i70" class="altColor">
|
|
<td class="colFirst"><code>static <a href="IStructureElement.PlaceResult.html" title="enum in com.gtnewhorizon.structurelib.structure">IStructureElement.PlaceResult</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#survivalPlaceBlock(net.minecraft.item.ItemStack,com.gtnewhorizon.structurelib.util.ItemStackPredicate.NBTMode,net.minecraft.nbt.NBTTagCompound,boolean,net.minecraft.world.World,int,int,int,com.gtnewhorizon.structurelib.structure.IItemSource,net.minecraft.entity.player.EntityPlayer)">survivalPlaceBlock</a></span>​(<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a> stack,
|
|
<a href="../util/ItemStackPredicate.NBTMode.html" title="enum in com.gtnewhorizon.structurelib.util">ItemStackPredicate.NBTMode</a> nbtMode,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/nbt/NBTTagCompound.html?is-external=true" title="class or interface in net.minecraft.nbt" class="externalLink">NBTTagCompound</a> tag,
|
|
boolean assumeStackPresent,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/world/World.html?is-external=true" title="class or interface in net.minecraft.world" class="externalLink">World</a> world,
|
|
int x,
|
|
int y,
|
|
int z,
|
|
<a href="IItemSource.html" title="interface in com.gtnewhorizon.structurelib.structure">IItemSource</a> s,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/entity/player/EntityPlayer.html?is-external=true" title="class or interface in net.minecraft.entity.player" class="externalLink">EntityPlayer</a> actor)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">This is a helper method for implementing
|
|
<a href="IStructureElement.html#survivalPlaceBlock(T,net.minecraft.world.World,int,int,int,net.minecraft.item.ItemStack,com.gtnewhorizon.structurelib.structure.IItemSource,net.minecraft.entity.player.EntityPlayerMP,java.util.function.Consumer)"><code>IStructureElement.survivalPlaceBlock(Object, World, int, int, int, ItemStack, IItemSource, EntityPlayerMP, Consumer)</code></a></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i71" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="IStructureElement.PlaceResult.html" title="enum in com.gtnewhorizon.structurelib.structure">IStructureElement.PlaceResult</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#survivalPlaceBlock(net.minecraft.item.ItemStack,com.gtnewhorizon.structurelib.util.ItemStackPredicate.NBTMode,net.minecraft.nbt.NBTTagCompound,boolean,net.minecraft.world.World,int,int,int,com.gtnewhorizon.structurelib.structure.IItemSource,net.minecraft.entity.player.EntityPlayerMP)">survivalPlaceBlock</a></span>​(<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a> stack,
|
|
<a href="../util/ItemStackPredicate.NBTMode.html" title="enum in com.gtnewhorizon.structurelib.util">ItemStackPredicate.NBTMode</a> nbtMode,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/nbt/NBTTagCompound.html?is-external=true" title="class or interface in net.minecraft.nbt" class="externalLink">NBTTagCompound</a> tag,
|
|
boolean assumeStackPresent,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/world/World.html?is-external=true" title="class or interface in net.minecraft.world" class="externalLink">World</a> world,
|
|
int x,
|
|
int y,
|
|
int z,
|
|
<a href="IItemSource.html" title="interface in com.gtnewhorizon.structurelib.structure">IItemSource</a> s,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/entity/player/EntityPlayerMP.html?is-external=true" title="class or interface in net.minecraft.entity.player" class="externalLink">EntityPlayerMP</a> actor)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">This is a helper method for implementing
|
|
<a href="IStructureElement.html#survivalPlaceBlock(T,net.minecraft.world.World,int,int,int,net.minecraft.item.ItemStack,com.gtnewhorizon.structurelib.structure.IItemSource,net.minecraft.entity.player.EntityPlayerMP,java.util.function.Consumer)"><code>IStructureElement.survivalPlaceBlock(Object, World, int, int, int, ItemStack, IItemSource, EntityPlayerMP, Consumer)</code></a></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i72" class="altColor">
|
|
<td class="colFirst"><code>static <a href="IStructureElement.PlaceResult.html" title="enum in com.gtnewhorizon.structurelib.structure">IStructureElement.PlaceResult</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#survivalPlaceBlock(net.minecraft.item.ItemStack,com.gtnewhorizon.structurelib.util.ItemStackPredicate.NBTMode,net.minecraft.nbt.NBTTagCompound,boolean,net.minecraft.world.World,int,int,int,com.gtnewhorizon.structurelib.structure.IItemSource,net.minecraft.entity.player.EntityPlayerMP,java.util.function.Consumer)">survivalPlaceBlock</a></span>​(<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a> stack,
|
|
<a href="../util/ItemStackPredicate.NBTMode.html" title="enum in com.gtnewhorizon.structurelib.util">ItemStackPredicate.NBTMode</a> nbtMode,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/nbt/NBTTagCompound.html?is-external=true" title="class or interface in net.minecraft.nbt" class="externalLink">NBTTagCompound</a> tag,
|
|
boolean assumeStackPresent,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/world/World.html?is-external=true" title="class or interface in net.minecraft.world" class="externalLink">World</a> world,
|
|
int x,
|
|
int y,
|
|
int z,
|
|
<a href="IItemSource.html" title="interface in com.gtnewhorizon.structurelib.structure">IItemSource</a> s,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/entity/player/EntityPlayerMP.html?is-external=true" title="class or interface in net.minecraft.entity.player" class="externalLink">EntityPlayerMP</a> actor,
|
|
java.util.function.Consumer<<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/util/IChatComponent.html?is-external=true" title="class or interface in net.minecraft.util" class="externalLink">IChatComponent</a>> chatter)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">This is a helper method for implementing
|
|
<a href="IStructureElement.html#survivalPlaceBlock(T,net.minecraft.world.World,int,int,int,net.minecraft.item.ItemStack,com.gtnewhorizon.structurelib.structure.IItemSource,net.minecraft.entity.player.EntityPlayerMP,java.util.function.Consumer)"><code>IStructureElement.survivalPlaceBlock(Object, World, int, int, int, ItemStack, IItemSource, EntityPlayerMP, Consumer)</code></a></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i73" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="IStructureElement.PlaceResult.html" title="enum in com.gtnewhorizon.structurelib.structure">IStructureElement.PlaceResult</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#survivalPlaceBlock(net.minecraft.item.ItemStack,com.gtnewhorizon.structurelib.util.ItemStackPredicate.NBTMode,net.minecraft.nbt.NBTTagCompound,boolean,net.minecraft.world.World,int,int,int,com.gtnewhorizon.structurelib.structure.IItemSource,net.minecraft.entity.player.EntityPlayer,java.util.function.Consumer)">survivalPlaceBlock</a></span>​(<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a> stack,
|
|
<a href="../util/ItemStackPredicate.NBTMode.html" title="enum in com.gtnewhorizon.structurelib.util">ItemStackPredicate.NBTMode</a> nbtMode,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/nbt/NBTTagCompound.html?is-external=true" title="class or interface in net.minecraft.nbt" class="externalLink">NBTTagCompound</a> tag,
|
|
boolean assumeStackPresent,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/world/World.html?is-external=true" title="class or interface in net.minecraft.world" class="externalLink">World</a> world,
|
|
int x,
|
|
int y,
|
|
int z,
|
|
<a href="IItemSource.html" title="interface in com.gtnewhorizon.structurelib.structure">IItemSource</a> s,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/entity/player/EntityPlayer.html?is-external=true" title="class or interface in net.minecraft.entity.player" class="externalLink">EntityPlayer</a> actor,
|
|
java.util.function.Consumer<<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/util/IChatComponent.html?is-external=true" title="class or interface in net.minecraft.util" class="externalLink">IChatComponent</a>> chatter)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">This is a helper method for implementing
|
|
<a href="IStructureElement.html#survivalPlaceBlock(T,net.minecraft.world.World,int,int,int,net.minecraft.item.ItemStack,com.gtnewhorizon.structurelib.structure.IItemSource,net.minecraft.entity.player.EntityPlayerMP,java.util.function.Consumer)"><code>IStructureElement.survivalPlaceBlock(Object, World, int, int, int, ItemStack, IItemSource, EntityPlayerMP, Consumer)</code></a></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i74" class="altColor">
|
|
<td class="colFirst"><code>static java.lang.String[][]</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#transpose(java.lang.String%5B%5D%5B%5D)">transpose</a></span>​(java.lang.String[][] structurePiece)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Transposes shape (swaps B and C axis, can be used to un-transpose transposed shape) WARNING! Do not use on old
|
|
api...</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i75" class="rowColor">
|
|
<td class="colFirst"><code>static <T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#withChannel(java.lang.String,com.gtnewhorizon.structurelib.structure.IStructureElement)">withChannel</a></span>​(java.lang.String channel,
|
|
<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> backing)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">See channels.md in docs folder</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i76" class="altColor">
|
|
<td class="colFirst"><code>static <CTX,​T extends <a href="IWithExtendedContext.html" title="interface in com.gtnewhorizon.structurelib.structure">IWithExtendedContext</a><CTX>><br><a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#withContext(com.gtnewhorizon.structurelib.structure.IStructureElement)">withContext</a></span>​(<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><CTX> elem)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Switch to the extended context object in the downstream element</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class java.lang.Object</h3>
|
|
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="details">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<section>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="method.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a id="survivalPlaceBlock(net.minecraft.block.Block,int,net.minecraft.world.World,int,int,int,com.gtnewhorizon.structurelib.structure.IItemSource,net.minecraft.entity.player.EntityPlayerMP)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>survivalPlaceBlock</h4>
|
|
<pre class="methodSignature">public static <a href="IStructureElement.PlaceResult.html" title="enum in com.gtnewhorizon.structurelib.structure">IStructureElement.PlaceResult</a> survivalPlaceBlock​(<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> block,
|
|
int meta,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/world/World.html?is-external=true" title="class or interface in net.minecraft.world" class="externalLink">World</a> world,
|
|
int x,
|
|
int y,
|
|
int z,
|
|
<a href="IItemSource.html" title="interface in com.gtnewhorizon.structurelib.structure">IItemSource</a> s,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/entity/player/EntityPlayerMP.html?is-external=true" title="class or interface in net.minecraft.entity.player" class="externalLink">EntityPlayerMP</a> actor)</pre>
|
|
<div class="block">This is a helper method for implementing
|
|
<a href="IStructureElement.html#survivalPlaceBlock(T,net.minecraft.world.World,int,int,int,net.minecraft.item.ItemStack,com.gtnewhorizon.structurelib.structure.IItemSource,net.minecraft.entity.player.EntityPlayerMP,java.util.function.Consumer)"><code>IStructureElement.survivalPlaceBlock(Object, World, int, int, int, ItemStack, IItemSource, EntityPlayerMP, Consumer)</code></a>
|
|
<p>
|
|
This method will try to look up an <a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemBlock.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink"><code>ItemBlock</code></a> for given block and meta from <code>s</code> and place it at
|
|
given location. This method assume block at given coord is NOT acceptable, but may or may not be trivially
|
|
replaceable This method might yield error messages to the player only if there is likely a programming error or
|
|
exploit.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>s</code> - drain resources from this place</dd>
|
|
<dd><code>actor</code> - source of action. cannot be null.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="survivalPlaceBlock(net.minecraft.block.Block,int,net.minecraft.world.World,int,int,int,com.gtnewhorizon.structurelib.structure.IItemSource,net.minecraft.entity.player.EntityPlayer)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>survivalPlaceBlock</h4>
|
|
<pre class="methodSignature">public static <a href="IStructureElement.PlaceResult.html" title="enum in com.gtnewhorizon.structurelib.structure">IStructureElement.PlaceResult</a> survivalPlaceBlock​(<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> block,
|
|
int meta,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/world/World.html?is-external=true" title="class or interface in net.minecraft.world" class="externalLink">World</a> world,
|
|
int x,
|
|
int y,
|
|
int z,
|
|
<a href="IItemSource.html" title="interface in com.gtnewhorizon.structurelib.structure">IItemSource</a> s,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/entity/player/EntityPlayer.html?is-external=true" title="class or interface in net.minecraft.entity.player" class="externalLink">EntityPlayer</a> actor)</pre>
|
|
<div class="block">This is a helper method for implementing
|
|
<a href="IStructureElement.html#survivalPlaceBlock(T,net.minecraft.world.World,int,int,int,net.minecraft.item.ItemStack,com.gtnewhorizon.structurelib.structure.IItemSource,net.minecraft.entity.player.EntityPlayerMP,java.util.function.Consumer)"><code>IStructureElement.survivalPlaceBlock(Object, World, int, int, int, ItemStack, IItemSource, EntityPlayerMP, Consumer)</code></a>
|
|
<p>
|
|
This method will try to look up an <a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemBlock.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink"><code>ItemBlock</code></a> for given block and meta from <code>s</code> and place it at
|
|
given location. This method assume block at given coord is NOT acceptable, but may or may not be trivially
|
|
replaceable This method might yield error messages to the player only if there is likely a programming error or
|
|
exploit.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>s</code> - drain resources from this place</dd>
|
|
<dd><code>actor</code> - source of action. cannot be null.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="survivalPlaceBlock(net.minecraft.block.Block,int,net.minecraft.world.World,int,int,int,com.gtnewhorizon.structurelib.structure.IItemSource,net.minecraft.entity.player.EntityPlayerMP,java.util.function.Consumer)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>survivalPlaceBlock</h4>
|
|
<pre class="methodSignature">public static <a href="IStructureElement.PlaceResult.html" title="enum in com.gtnewhorizon.structurelib.structure">IStructureElement.PlaceResult</a> survivalPlaceBlock​(<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> block,
|
|
int meta,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/world/World.html?is-external=true" title="class or interface in net.minecraft.world" class="externalLink">World</a> world,
|
|
int x,
|
|
int y,
|
|
int z,
|
|
<a href="IItemSource.html" title="interface in com.gtnewhorizon.structurelib.structure">IItemSource</a> s,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/entity/player/EntityPlayerMP.html?is-external=true" title="class or interface in net.minecraft.entity.player" class="externalLink">EntityPlayerMP</a> actor,
|
|
java.util.function.Consumer<<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/util/IChatComponent.html?is-external=true" title="class or interface in net.minecraft.util" class="externalLink">IChatComponent</a>> chatter)</pre>
|
|
<div class="block">This is a helper method for implementing
|
|
<a href="IStructureElement.html#survivalPlaceBlock(T,net.minecraft.world.World,int,int,int,net.minecraft.item.ItemStack,com.gtnewhorizon.structurelib.structure.IItemSource,net.minecraft.entity.player.EntityPlayerMP,java.util.function.Consumer)"><code>IStructureElement.survivalPlaceBlock(Object, World, int, int, int, ItemStack, IItemSource, EntityPlayerMP, Consumer)</code></a>
|
|
<p>
|
|
This method will try to look up an <a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemBlock.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink"><code>ItemBlock</code></a> for given block and meta from <code>s</code> and place it at
|
|
given location. This method assume block at given coord is NOT acceptable, but may or may not be trivially
|
|
replaceable This method might yield error messages to the player only if there is likely a programming error or
|
|
exploit. This method might yield error messages to the chatter.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>s</code> - drain resources from this place</dd>
|
|
<dd><code>actor</code> - source of action. cannot be null.</dd>
|
|
<dd><code>chatter</code> - normal error destination. can be null to suppress them.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="survivalPlaceBlock(net.minecraft.block.Block,int,net.minecraft.world.World,int,int,int,com.gtnewhorizon.structurelib.structure.IItemSource,net.minecraft.entity.player.EntityPlayer,java.util.function.Consumer)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>survivalPlaceBlock</h4>
|
|
<pre class="methodSignature">public static <a href="IStructureElement.PlaceResult.html" title="enum in com.gtnewhorizon.structurelib.structure">IStructureElement.PlaceResult</a> survivalPlaceBlock​(<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> block,
|
|
int meta,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/world/World.html?is-external=true" title="class or interface in net.minecraft.world" class="externalLink">World</a> world,
|
|
int x,
|
|
int y,
|
|
int z,
|
|
<a href="IItemSource.html" title="interface in com.gtnewhorizon.structurelib.structure">IItemSource</a> s,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/entity/player/EntityPlayer.html?is-external=true" title="class or interface in net.minecraft.entity.player" class="externalLink">EntityPlayer</a> actor,
|
|
java.util.function.Consumer<<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/util/IChatComponent.html?is-external=true" title="class or interface in net.minecraft.util" class="externalLink">IChatComponent</a>> chatter)</pre>
|
|
<div class="block">This is a helper method for implementing
|
|
<a href="IStructureElement.html#survivalPlaceBlock(T,net.minecraft.world.World,int,int,int,net.minecraft.item.ItemStack,com.gtnewhorizon.structurelib.structure.IItemSource,net.minecraft.entity.player.EntityPlayerMP,java.util.function.Consumer)"><code>IStructureElement.survivalPlaceBlock(Object, World, int, int, int, ItemStack, IItemSource, EntityPlayerMP, Consumer)</code></a>
|
|
<p>
|
|
This method will try to look up an <a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemBlock.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink"><code>ItemBlock</code></a> for given block and meta from <code>s</code> and place it at
|
|
given location. This method assume block at given coord is NOT acceptable, but may or may not be trivially
|
|
replaceable This method might yield error messages to the player only if there is likely a programming error or
|
|
exploit. This method might yield error messages to the chatter.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>s</code> - drain resources from this place</dd>
|
|
<dd><code>actor</code> - source of action. cannot be null.</dd>
|
|
<dd><code>chatter</code> - normal error destination. can be null to suppress them.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="survivalPlaceBlock(net.minecraft.item.ItemStack,com.gtnewhorizon.structurelib.util.ItemStackPredicate.NBTMode,net.minecraft.nbt.NBTTagCompound,boolean,net.minecraft.world.World,int,int,int,com.gtnewhorizon.structurelib.structure.IItemSource,net.minecraft.entity.player.EntityPlayerMP)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>survivalPlaceBlock</h4>
|
|
<pre class="methodSignature">public static <a href="IStructureElement.PlaceResult.html" title="enum in com.gtnewhorizon.structurelib.structure">IStructureElement.PlaceResult</a> survivalPlaceBlock​(<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a> stack,
|
|
<a href="../util/ItemStackPredicate.NBTMode.html" title="enum in com.gtnewhorizon.structurelib.util">ItemStackPredicate.NBTMode</a> nbtMode,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/nbt/NBTTagCompound.html?is-external=true" title="class or interface in net.minecraft.nbt" class="externalLink">NBTTagCompound</a> tag,
|
|
boolean assumeStackPresent,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/world/World.html?is-external=true" title="class or interface in net.minecraft.world" class="externalLink">World</a> world,
|
|
int x,
|
|
int y,
|
|
int z,
|
|
<a href="IItemSource.html" title="interface in com.gtnewhorizon.structurelib.structure">IItemSource</a> s,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/entity/player/EntityPlayerMP.html?is-external=true" title="class or interface in net.minecraft.entity.player" class="externalLink">EntityPlayerMP</a> actor)</pre>
|
|
<div class="block">This is a helper method for implementing
|
|
<a href="IStructureElement.html#survivalPlaceBlock(T,net.minecraft.world.World,int,int,int,net.minecraft.item.ItemStack,com.gtnewhorizon.structurelib.structure.IItemSource,net.minecraft.entity.player.EntityPlayerMP,java.util.function.Consumer)"><code>IStructureElement.survivalPlaceBlock(Object, World, int, int, int, ItemStack, IItemSource, EntityPlayerMP, Consumer)</code></a>
|
|
<p>
|
|
This method will try to look up an <a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemBlock.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink"><code>ItemBlock</code></a> for given block and meta from <code>s</code> and place it at
|
|
given location. This method assume block at given coord is NOT acceptable, but may or may not be trivially
|
|
replaceable This method might yield error messages to the player only if there is likely a programming error or
|
|
exploit.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>stack</code> - a valid stack with stack size of exactly 1. Must be of an ItemBlock!</dd>
|
|
<dd><code>s</code> - drain resources from this place</dd>
|
|
<dd><code>actor</code> - source of action. cannot be null.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="survivalPlaceBlock(net.minecraft.item.ItemStack,com.gtnewhorizon.structurelib.util.ItemStackPredicate.NBTMode,net.minecraft.nbt.NBTTagCompound,boolean,net.minecraft.world.World,int,int,int,com.gtnewhorizon.structurelib.structure.IItemSource,net.minecraft.entity.player.EntityPlayer)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>survivalPlaceBlock</h4>
|
|
<pre class="methodSignature">public static <a href="IStructureElement.PlaceResult.html" title="enum in com.gtnewhorizon.structurelib.structure">IStructureElement.PlaceResult</a> survivalPlaceBlock​(<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a> stack,
|
|
<a href="../util/ItemStackPredicate.NBTMode.html" title="enum in com.gtnewhorizon.structurelib.util">ItemStackPredicate.NBTMode</a> nbtMode,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/nbt/NBTTagCompound.html?is-external=true" title="class or interface in net.minecraft.nbt" class="externalLink">NBTTagCompound</a> tag,
|
|
boolean assumeStackPresent,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/world/World.html?is-external=true" title="class or interface in net.minecraft.world" class="externalLink">World</a> world,
|
|
int x,
|
|
int y,
|
|
int z,
|
|
<a href="IItemSource.html" title="interface in com.gtnewhorizon.structurelib.structure">IItemSource</a> s,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/entity/player/EntityPlayer.html?is-external=true" title="class or interface in net.minecraft.entity.player" class="externalLink">EntityPlayer</a> actor)</pre>
|
|
<div class="block">This is a helper method for implementing
|
|
<a href="IStructureElement.html#survivalPlaceBlock(T,net.minecraft.world.World,int,int,int,net.minecraft.item.ItemStack,com.gtnewhorizon.structurelib.structure.IItemSource,net.minecraft.entity.player.EntityPlayerMP,java.util.function.Consumer)"><code>IStructureElement.survivalPlaceBlock(Object, World, int, int, int, ItemStack, IItemSource, EntityPlayerMP, Consumer)</code></a>
|
|
<p>
|
|
This method will try to look up an <a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemBlock.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink"><code>ItemBlock</code></a> for given block and meta from <code>s</code> and place it at
|
|
given location. This method assume block at given coord is NOT acceptable, but may or may not be trivially
|
|
replaceable This method might yield error messages to the player only if there is likely a programming error or
|
|
exploit.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>stack</code> - a valid stack with stack size of exactly 1. Must be of an ItemBlock!</dd>
|
|
<dd><code>s</code> - drain resources from this place</dd>
|
|
<dd><code>actor</code> - source of action. cannot be null.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="survivalPlaceBlock(net.minecraft.item.ItemStack,com.gtnewhorizon.structurelib.util.ItemStackPredicate.NBTMode,net.minecraft.nbt.NBTTagCompound,boolean,net.minecraft.world.World,int,int,int,com.gtnewhorizon.structurelib.structure.IItemSource,net.minecraft.entity.player.EntityPlayerMP,java.util.function.Consumer)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>survivalPlaceBlock</h4>
|
|
<pre class="methodSignature">public static <a href="IStructureElement.PlaceResult.html" title="enum in com.gtnewhorizon.structurelib.structure">IStructureElement.PlaceResult</a> survivalPlaceBlock​(<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a> stack,
|
|
<a href="../util/ItemStackPredicate.NBTMode.html" title="enum in com.gtnewhorizon.structurelib.util">ItemStackPredicate.NBTMode</a> nbtMode,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/nbt/NBTTagCompound.html?is-external=true" title="class or interface in net.minecraft.nbt" class="externalLink">NBTTagCompound</a> tag,
|
|
boolean assumeStackPresent,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/world/World.html?is-external=true" title="class or interface in net.minecraft.world" class="externalLink">World</a> world,
|
|
int x,
|
|
int y,
|
|
int z,
|
|
<a href="IItemSource.html" title="interface in com.gtnewhorizon.structurelib.structure">IItemSource</a> s,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/entity/player/EntityPlayerMP.html?is-external=true" title="class or interface in net.minecraft.entity.player" class="externalLink">EntityPlayerMP</a> actor,
|
|
@Nullable
|
|
java.util.function.Consumer<<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/util/IChatComponent.html?is-external=true" title="class or interface in net.minecraft.util" class="externalLink">IChatComponent</a>> chatter)</pre>
|
|
<div class="block">This is a helper method for implementing
|
|
<a href="IStructureElement.html#survivalPlaceBlock(T,net.minecraft.world.World,int,int,int,net.minecraft.item.ItemStack,com.gtnewhorizon.structurelib.structure.IItemSource,net.minecraft.entity.player.EntityPlayerMP,java.util.function.Consumer)"><code>IStructureElement.survivalPlaceBlock(Object, World, int, int, int, ItemStack, IItemSource, EntityPlayerMP, Consumer)</code></a>
|
|
<p>
|
|
This method will try to look up an <a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemBlock.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink"><code>ItemBlock</code></a> for given block and meta from <code>s</code> and place it at
|
|
given location. This method assume block at given coord is NOT acceptable, but may or may not be trivially
|
|
replaceable This method might yield error messages to the player only if there is likely a programming error or
|
|
exploit. This method might yield error messages to the chatter.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>stack</code> - a valid stack with stack size of exactly 1. Must be of an ItemBlock!</dd>
|
|
<dd><code>s</code> - drain resources from this place</dd>
|
|
<dd><code>actor</code> - source of action. cannot be null.</dd>
|
|
<dd><code>chatter</code> - normal error destination. can be null to suppress them.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="survivalPlaceBlock(net.minecraft.item.ItemStack,com.gtnewhorizon.structurelib.util.ItemStackPredicate.NBTMode,net.minecraft.nbt.NBTTagCompound,boolean,net.minecraft.world.World,int,int,int,com.gtnewhorizon.structurelib.structure.IItemSource,net.minecraft.entity.player.EntityPlayer,java.util.function.Consumer)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>survivalPlaceBlock</h4>
|
|
<pre class="methodSignature">public static <a href="IStructureElement.PlaceResult.html" title="enum in com.gtnewhorizon.structurelib.structure">IStructureElement.PlaceResult</a> survivalPlaceBlock​(<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a> stack,
|
|
<a href="../util/ItemStackPredicate.NBTMode.html" title="enum in com.gtnewhorizon.structurelib.util">ItemStackPredicate.NBTMode</a> nbtMode,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/nbt/NBTTagCompound.html?is-external=true" title="class or interface in net.minecraft.nbt" class="externalLink">NBTTagCompound</a> tag,
|
|
boolean assumeStackPresent,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/world/World.html?is-external=true" title="class or interface in net.minecraft.world" class="externalLink">World</a> world,
|
|
int x,
|
|
int y,
|
|
int z,
|
|
<a href="IItemSource.html" title="interface in com.gtnewhorizon.structurelib.structure">IItemSource</a> s,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/entity/player/EntityPlayer.html?is-external=true" title="class or interface in net.minecraft.entity.player" class="externalLink">EntityPlayer</a> actor,
|
|
@Nullable
|
|
java.util.function.Consumer<<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/util/IChatComponent.html?is-external=true" title="class or interface in net.minecraft.util" class="externalLink">IChatComponent</a>> chatter)</pre>
|
|
<div class="block">This is a helper method for implementing
|
|
<a href="IStructureElement.html#survivalPlaceBlock(T,net.minecraft.world.World,int,int,int,net.minecraft.item.ItemStack,com.gtnewhorizon.structurelib.structure.IItemSource,net.minecraft.entity.player.EntityPlayerMP,java.util.function.Consumer)"><code>IStructureElement.survivalPlaceBlock(Object, World, int, int, int, ItemStack, IItemSource, EntityPlayerMP, Consumer)</code></a>
|
|
<p>
|
|
This method will try to look up an <a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemBlock.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink"><code>ItemBlock</code></a> for given block and meta from <code>s</code> and place it at
|
|
given location. This method assume block at given coord is NOT acceptable, but may or may not be trivially
|
|
replaceable This method might yield error messages to the player only if there is likely a programming error or
|
|
exploit. This method might yield error messages to the chatter.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>stack</code> - a valid stack with stack size of exactly 1. Must be of an ItemBlock!</dd>
|
|
<dd><code>s</code> - drain resources from this place</dd>
|
|
<dd><code>actor</code> - source of action. cannot be null.</dd>
|
|
<dd><code>chatter</code> - normal error destination. can be null to suppress them.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="isAir()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isAir</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> isAir()</pre>
|
|
<div class="block">Return a structure element that only allow air (or air equivalents, like Railcraft hidden blocks). You usually
|
|
don't need to call this yourselves. Use <code>-</code> in shape to automatically use this. Provided nontheless in case
|
|
you want this as a fallback to something else.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="notAir()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>notAir</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> notAir()</pre>
|
|
<div class="block">Return a structure element that allow anything but air (or air equivalents, like Railcraft hidden blocks). You
|
|
usually don't need to call this yourselves. Use <code>+</code> in shape to automatically use this. Provided nontheless
|
|
in case you want this as a fallback to something else.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="error()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>error</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> error()</pre>
|
|
<div class="block">Check returns false. Placement is always handled by this and does nothing. Makes little to no use it in fallback
|
|
chain.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="ofHint(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ofHint</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElementNoPlacement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementNoPlacement</a><T> ofHint​(int dots)</pre>
|
|
<div class="block">Spawn a hint with given amount of dots. Check always returns: true. Only useful as a fallback, e.g.
|
|
<a href="#ofBlockUnlocalizedName(java.lang.String,java.lang.String,int,com.gtnewhorizon.structurelib.structure.IStructureElement)"><code>ofBlockUnlocalizedName(String, String, int, IStructureElement)</code></a></div>
|
|
</li>
|
|
</ul>
|
|
<a id="ofHintDeferred(java.util.function.Supplier)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ofHintDeferred</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElementNoPlacement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementNoPlacement</a><T> ofHintDeferred​(java.util.function.Supplier<<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/util/IIcon.html?is-external=true" title="class or interface in net.minecraft.util" class="externalLink">IIcon</a>[]> icons)</pre>
|
|
<div class="block">Spawn a hint with given textures. Check always returns: true. Only useful as a fallback, e.g.
|
|
<a href="#ofBlockUnlocalizedName(java.lang.String,java.lang.String,int,com.gtnewhorizon.structurelib.structure.IStructureElement)"><code>ofBlockUnlocalizedName(String, String, int, IStructureElement)</code></a></div>
|
|
</li>
|
|
</ul>
|
|
<a id="ofHintDeferred(java.util.function.Supplier,short[])">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ofHintDeferred</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElementNoPlacement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementNoPlacement</a><T> ofHintDeferred​(java.util.function.Supplier<<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/util/IIcon.html?is-external=true" title="class or interface in net.minecraft.util" class="externalLink">IIcon</a>[]> icons,
|
|
short[] RGBa)</pre>
|
|
<div class="block">Spawn a hint with given amount of textures and tint. Check always returns: true. Only useful as a fallback, e.g.
|
|
<a href="#ofBlockUnlocalizedName(java.lang.String,java.lang.String,int,com.gtnewhorizon.structurelib.structure.IStructureElement)"><code>ofBlockUnlocalizedName(String, String, int, IStructureElement)</code></a></div>
|
|
</li>
|
|
</ul>
|
|
<a id="ofBlocksTiered(com.gtnewhorizon.structurelib.structure.ITierConverter,java.lang.Object,java.util.function.BiConsumer,java.util.function.Function)">
|
|
<!-- -->
|
|
</a><a id="ofBlocksTiered(com.gtnewhorizon.structurelib.structure.ITierConverter,TIER,java.util.function.BiConsumer,java.util.function.Function)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ofBlocksTiered</h4>
|
|
<pre class="methodSignature">public static <T,​TIER> <a href="IStructureElementCheckOnly.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementCheckOnly</a><T> ofBlocksTiered​(<a href="ITierConverter.html" title="interface in com.gtnewhorizon.structurelib.structure">ITierConverter</a><TIER> tierExtractor,
|
|
@Nullable
|
|
TIER notSet,
|
|
java.util.function.BiConsumer<T,​TIER> setter,
|
|
java.util.function.Function<T,​TIER> getter)</pre>
|
|
<div class="block">A more primitive variant of <a href="#ofBlocksTiered(com.gtnewhorizon.structurelib.structure.ITierConverter,java.util.List,TIER,java.util.function.BiConsumer,java.util.function.Function)"><code>ofBlocksTiered(ITierConverter, List, Object, BiConsumer, Function)</code></a> Main
|
|
difference is this one is check only.
|
|
<p>
|
|
Note that if tierExtractor returns a null, this block will be rejected immediately. This makes null a potent
|
|
candidate for notSet.
|
|
<p>
|
|
See documentation on the other overload for more information.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="#ofBlocksTiered(com.gtnewhorizon.structurelib.structure.ITierConverter,TIER,java.util.function.BiConsumer,java.util.function.Function)"><code>ofBlocksTiered(ITierConverter, Object, BiConsumer, Function)</code></a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="ofBlocksTiered(com.gtnewhorizon.structurelib.structure.ITierConverter,java.util.List,java.lang.Object,java.util.function.BiConsumer,java.util.function.Function)">
|
|
<!-- -->
|
|
</a><a id="ofBlocksTiered(com.gtnewhorizon.structurelib.structure.ITierConverter,java.util.List,TIER,java.util.function.BiConsumer,java.util.function.Function)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ofBlocksTiered</h4>
|
|
<pre class="methodSignature">public static <T,​TIER> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> ofBlocksTiered​(<a href="ITierConverter.html" title="interface in com.gtnewhorizon.structurelib.structure">ITierConverter</a><TIER> tierExtractor,
|
|
@Nullable
|
|
java.util.List<org.apache.commons.lang3.tuple.Pair<<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a>,​java.lang.Integer>> allKnownTiers,
|
|
@Nullable
|
|
TIER notSet,
|
|
java.util.function.BiConsumer<T,​TIER> setter,
|
|
java.util.function.Function<T,​TIER> getter)</pre>
|
|
<div class="block">Element representing a component with different tiers. Your multi will accept any of them (as long as player does
|
|
not mix tier (*)), but would like to know which is used. Player can use more blueprint to get hints denoting more
|
|
advanced components.
|
|
<p>
|
|
Above all else, you need to decide what type of tier you are going to use. For simpler cases, Integer is a good
|
|
choice. You can also use an existing Enum. It can also be a String or a
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/util/ResourceLocation.html?is-external=true" title="class or interface in net.minecraft.util" class="externalLink"><code>ResourceLocation</code></a>, or basically anything. It doesn't even have to implement
|
|
<code>Comparable</code>.
|
|
<p>
|
|
If your tier extractor function returns null on any (Block, meta) pair, then it means this block is rejected.
|
|
This also implies null can never be a valid tier.
|
|
<p>
|
|
This structure element require you will reset the backing storage of getter in your own code, such that in every
|
|
round of structure checking, the first call to getter would always return notSet. You can also make getter to
|
|
return other value on that occasion to forcefully select a certain tier, but then you'd probably be better off
|
|
using block adders or <a href="#ofBlock(net.minecraft.block.Block,int,net.minecraft.block.Block,int)"><code>ofBlock(Block, int, Block, int)</code></a> and its overloads
|
|
<p>
|
|
There is yet no TileEntity counterpart of this utility. Feel free to submit a PR to add it.
|
|
<p>
|
|
(*): Implementation wise, this structure element will only accept a block if its tier is the same as existing
|
|
tier or if existing tier is unset (i.e. value of third argument). If there are multiple (block, tier) tuple for a
|
|
given tier, then player will be allowed to use multiple kinds of blocks, but their tier is guaranteed to be the
|
|
same.
|
|
<p>
|
|
<h3>WARNING</h3> <b>You SHOULD NOT return notSet from your tierExtractor.</b> If you do so, we will have this
|
|
chain of events:
|
|
<ul>
|
|
<li>at check start, tier is reset to notSet
|
|
<li>the tier extractor returns notSet for first block, so since ofBlocksTiered finds your current tier is notSet,
|
|
and the new block's tier is the same as that, so it's accepted
|
|
<li>at 2nd, 3rd..., same thing in 2 happens
|
|
<li>at last occurrence, player placed a valid block with a tier not notSet. ofBlocksTiered now sets your current
|
|
tier to this tier, and accept the block
|
|
<li>check got notified structure is sound, and tier is not notSet. it marks the structure as complete and start
|
|
doing its business
|
|
<li>Player enjoy a (probably) hilariously shaped multi and (probably) reduced build cost.
|
|
</ul>
|
|
<h3>Example Implementation</h3>
|
|
<p>
|
|
Assume you have 16 tier, each map to one particular block's 16 different meta. You will usually want something
|
|
like this
|
|
|
|
<pre>
|
|
public class Tile extends TileEntity {
|
|
private static final Block B = getTargetBlock();
|
|
private static final IStructureDefinition<Tile> S = IStructureDefinition.<Tile>builder()
|
|
// ... addShape, and other elements
|
|
.addElement('c', ofBlocksTiered((b, m) -> b == B ? m : null,
|
|
IntStream.range(0, 16).mapToObj(i -> Pair.of(B, i)).collect(Collectors.toList()),
|
|
-1,
|
|
(t, m) -> t.tier = m,
|
|
t -> t.tier))
|
|
.build();
|
|
private int tier;
|
|
|
|
public boolean check() {
|
|
tier = -1;
|
|
if (!S.check(...))
|
|
return false;
|
|
return isTierAcceptable(tier);
|
|
}
|
|
}
|
|
</pre>
|
|
|
|
Important bits of this example implementation:
|
|
<ul>
|
|
<li>The supplied ITierConverter returns null for an invalid block</li>
|
|
<li>Possible tier returned by ITierConverter is Integer object 0 to 15.</li>
|
|
<li>notSet is set to -1. tier got reset to this value by caller before calling into
|
|
<a href="IStructureDefinition.html#check(T,java.lang.String,net.minecraft.world.World,com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing,int,int,int,int,int,int,boolean)"><code>IStructureDefinition.check(Object, String, World, ExtendedFacing, int, int, int, int, int, int, boolean)</code></a></li>
|
|
<li>notSet is never a tier returned by ITierConverter.</li>
|
|
</ul>
|
|
<p>
|
|
As a friendly reminder, the above characteristics are only for this simply demo, not as a general restriction
|
|
imposed by ofBlocksTiered.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>tierExtractor</code> - a function to extract tier info from a block. This function can return null and will never
|
|
be passed a null block or an invalid block meta. If this function returns null, then the
|
|
block would be considered invalid.</dd>
|
|
<dd><code>allKnownTiers</code> - A list of all known tiers as of calling. Can be empty or null. No hint will be spawned if
|
|
empty or null. Cannot have null elements. First element denotes the most primitive tier.
|
|
Last element denotes the most advanced tier. If not all tiers are available at definition
|
|
construction time, use <a href="#lazy(java.util.function.Supplier)"><code>lazy(Supplier)</code></a> or its overloads to delay a bit. This list is
|
|
only for hint particle spawning and survival build. The hint/autoplace code will choose 1st
|
|
pair to spawn/place if trigger item has master channel data of 1, 2nd pair if 2, and so on.</dd>
|
|
<dd><code>notSet</code> - The value returned from <code>getter</code> when there were no tier info found in T yet. Cannot
|
|
be null.</dd>
|
|
<dd><code>getter</code> - a function to retrieve the current tier from context object</dd>
|
|
<dd><code>setter</code> - a function to set the current tier into context object</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="ofBlockUnlocalizedName(java.lang.String,java.lang.String,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ofBlockUnlocalizedName</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> ofBlockUnlocalizedName​(java.lang.String modid,
|
|
java.lang.String unlocalizedName,
|
|
int meta)</pre>
|
|
<div class="block">Denote a block using unlocalized names. This can be useful to get around mod loading order issues.
|
|
<p>
|
|
<b>DUE TO HISTORICAL REASONS, THIS WAS CALLED ofBlockUnlocalizedName, BUT IT ACTUALLY USES REGISTRY NAME
|
|
INSTEAD.</b>
|
|
<p>
|
|
While no immediate error will be thrown, client code should ensure said mod is loaded and said mod is present,
|
|
otherwise bad things will happen later!</div>
|
|
</li>
|
|
</ul>
|
|
<a id="ofBlockUnlocalizedName(java.lang.String,java.lang.String,int,boolean)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ofBlockUnlocalizedName</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> ofBlockUnlocalizedName​(java.lang.String modid,
|
|
java.lang.String registryName,
|
|
int meta,
|
|
boolean wildcard)</pre>
|
|
<div class="block">Denote a block using unlocalized names. This can be useful to get around mod loading order issues.
|
|
<p>
|
|
<b>DUE TO HISTORICAL REASONS, THIS WAS CALLED ofBlockUnlocalizedName, BUT IT ACTUALLY USES REGISTRY NAME
|
|
INSTEAD.</b>
|
|
<p>
|
|
While no immediate error will be thrown, client code should ensure said mod is loaded and said mod is present,
|
|
otherwise the element will effectively become an <a href="#error()"><code>error()</code></a>.
|
|
<p>
|
|
Will place block or hint using the given meta if wildcard is true.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="ofBlockUnlocalizedName(java.lang.String,java.lang.String,int,com.gtnewhorizon.structurelib.structure.IStructureElement)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ofBlockUnlocalizedName</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> ofBlockUnlocalizedName​(java.lang.String modid,
|
|
java.lang.String unlocalizedName,
|
|
int meta,
|
|
<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> fallback)</pre>
|
|
<div class="block">Similiar to the other overload, but allows client code to specify a fallback in case said block was not found
|
|
later when the element got called.
|
|
<p>
|
|
<b>DUE TO HISTORICAL REASONS, THIS WAS CALLED ofBlockUnlocalizedName, BUT IT ACTUALLY USES REGISTRY NAME
|
|
INSTEAD.</b>
|
|
<p>
|
|
This is slightly different to using the other overload and another element in a
|
|
<a href="#ofChain(com.gtnewhorizon.structurelib.structure.IStructureElement...)"><code>ofChain(IStructureElement[])</code></a>. Here fallback will only ever be used if this fails, where ofChain would
|
|
form an OR relationship even if the mod is loaded and the block exists in registry.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="ofBlocksFlatHint(java.util.Map,net.minecraft.block.Block,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ofBlocksFlatHint</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElementNoPlacement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementNoPlacement</a><T> ofBlocksFlatHint​(java.util.Map<<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a>,​java.lang.Integer> blocsMap,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> hintBlock,
|
|
int hintMeta)</pre>
|
|
<div class="block">Accept a set of blocks. Less cumbersome to use than <a href="#ofBlocksMapHint(java.util.Map,net.minecraft.block.Block,int)"><code>ofBlocksMapHint(Map, Block, int)</code></a> when for any
|
|
accepted block type we accept only one meta for each.
|
|
<p>
|
|
Does not have autoplace.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>blocsMap</code> - Accepted (block, meta) pairs.</dd>
|
|
<dd><code>hintBlock</code> - hint block to use</dd>
|
|
<dd><code>hintMeta</code> - hint meta to use</dd>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="#ofBlocksMapHint(java.util.Map,net.minecraft.block.Block,int)"><code>ofBlocksMapHint(Map, Block, int)</code></a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="ofBlocksMapHint(java.util.Map,net.minecraft.block.Block,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ofBlocksMapHint</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElementNoPlacement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementNoPlacement</a><T> ofBlocksMapHint​(java.util.Map<<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a>,​java.util.Collection<java.lang.Integer>> blocsMap,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> hintBlock,
|
|
int hintMeta)</pre>
|
|
<div class="block">Accept a set of blocks.
|
|
<p>
|
|
Does not have autoplace.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>blocsMap</code> - Accepted (block, meta) pairs.</dd>
|
|
<dd><code>hintBlock</code> - hint block to use</dd>
|
|
<dd><code>hintMeta</code> - hint meta to use</dd>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="#ofBlocksFlatHint(java.util.Map,net.minecraft.block.Block,int)"><code>ofBlocksFlatHint(Map, Block, int)</code></a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="ofBlockHint(net.minecraft.block.Block,int,net.minecraft.block.Block,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ofBlockHint</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElementNoPlacement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementNoPlacement</a><T> ofBlockHint​(<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> block,
|
|
int meta,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> hintBlock,
|
|
int hintMeta)</pre>
|
|
<div class="block">Accept one (block, meta). Spawn hint particles using an alternative block and meta. Not very useful...</div>
|
|
</li>
|
|
</ul>
|
|
<a id="ofBlockHint(net.minecraft.block.Block,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ofBlockHint</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElementNoPlacement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementNoPlacement</a><T> ofBlockHint​(<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> block,
|
|
int meta)</pre>
|
|
<div class="block">Accept one (block, meta). Same as <a href="#ofBlock(net.minecraft.block.Block,int)"><code>ofBlock(Block, int)</code></a>, except it explicitly turns off creative/survival
|
|
build.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="ofBlockAdderHint(com.gtnewhorizon.structurelib.structure.adders.IBlockAdder,net.minecraft.block.Block,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ofBlockAdderHint</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElementNoPlacement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementNoPlacement</a><T> ofBlockAdderHint​(<a href="adders/IBlockAdder.html" title="interface in com.gtnewhorizon.structurelib.structure.adders">IBlockAdder</a><T> iBlockAdder,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> hintBlock,
|
|
int hintMeta)</pre>
|
|
<div class="block">Add a block using block adder. Spawn hints using given hint block and meta.
|
|
<p>
|
|
Useful when your logic is very complex. Does not support autoplace.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="ofBlocksFlat(java.util.Map,net.minecraft.block.Block,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ofBlocksFlat</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> ofBlocksFlat​(java.util.Map<<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a>,​java.lang.Integer> blocsMap,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> defaultBlock,
|
|
int defaultMeta)</pre>
|
|
<div class="block">Accept a set of blocks. Less cumbersome to use than <a href="#ofBlocksMap(java.util.Map,net.minecraft.block.Block,int)"><code>ofBlocksMap(Map, Block, int)</code></a> when for any accepted
|
|
block type we accept only one meta for each.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>blocsMap</code> - Accepted (block, meta) pairs.</dd>
|
|
<dd><code>defaultBlock</code> - default block to place/spawn hint</dd>
|
|
<dd><code>defaultMeta</code> - default meta to place/spawn hint</dd>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="#ofBlocksMapHint(java.util.Map,net.minecraft.block.Block,int)"><code>ofBlocksMapHint(Map, Block, int)</code></a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="ofBlocksMap(java.util.Map,net.minecraft.block.Block,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ofBlocksMap</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> ofBlocksMap​(java.util.Map<<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a>,​java.util.Collection<java.lang.Integer>> blocsMap,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> defaultBlock,
|
|
int defaultMeta)</pre>
|
|
<div class="block">Accept a set of blocks.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>blocsMap</code> - Accepted (block, meta) pairs.</dd>
|
|
<dd><code>defaultBlock</code> - default block to place/spawn hint</dd>
|
|
<dd><code>defaultMeta</code> - default meta to place/spawn hint</dd>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="#ofBlocksMapHint(java.util.Map,net.minecraft.block.Block,int)"><code>ofBlocksMapHint(Map, Block, int)</code></a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="ofBlock(net.minecraft.block.Block,int,net.minecraft.block.Block,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ofBlock</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> ofBlock​(<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> block,
|
|
int meta,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> defaultBlock,
|
|
int defaultMeta)</pre>
|
|
<div class="block">Accept a block. Spawn hint/autoplace using another.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>block</code> - accepted block</dd>
|
|
<dd><code>meta</code> - accepted meta</dd>
|
|
<dd><code>defaultBlock</code> - hint block</dd>
|
|
<dd><code>defaultMeta</code> - hint meta</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="ofBlockAnyMeta(net.minecraft.block.Block,net.minecraft.block.Block,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ofBlockAnyMeta</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> ofBlockAnyMeta​(<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> block,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> defaultBlock,
|
|
int defaultMeta)</pre>
|
|
<div class="block">Same as <a href="#ofBlock(net.minecraft.block.Block,int,net.minecraft.block.Block,int)"><code>ofBlock(Block, int, Block, int)</code></a> but ignores target meta id</div>
|
|
</li>
|
|
</ul>
|
|
<a id="ofBlock(net.minecraft.block.Block,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ofBlock</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> ofBlock​(<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> block,
|
|
int meta)</pre>
|
|
<div class="block">Accept a single block with a fixed meta. Most primitive form of structure.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="ofBlockAnyMeta(net.minecraft.block.Block)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ofBlockAnyMeta</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> ofBlockAnyMeta​(<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> block)</pre>
|
|
<div class="block">Accept a single block, but accept any meta.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="ofBlockAnyMeta(net.minecraft.block.Block,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ofBlockAnyMeta</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> ofBlockAnyMeta​(<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> block,
|
|
int defaultMeta)</pre>
|
|
<div class="block">Accept a single block, but accept any meta. Spawn hint/autoplace using given meta.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="ofBlockAdder(com.gtnewhorizon.structurelib.structure.adders.IBlockAdder,net.minecraft.block.Block,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ofBlockAdder</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> ofBlockAdder​(<a href="adders/IBlockAdder.html" title="interface in com.gtnewhorizon.structurelib.structure.adders">IBlockAdder</a><T> iBlockAdder,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> defaultBlock,
|
|
int defaultMeta)</pre>
|
|
<div class="block">Add a block using block adder. Spawn hints/autoplace using given hint block and meta.
|
|
<p>
|
|
Useful when your logic is very complex.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="ofBlockAdder(com.gtnewhorizon.structurelib.structure.adders.IBlockAdder,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ofBlockAdder</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> ofBlockAdder​(<a href="adders/IBlockAdder.html" title="interface in com.gtnewhorizon.structurelib.structure.adders">IBlockAdder</a><T> iBlockAdder,
|
|
int dots)</pre>
|
|
</li>
|
|
</ul>
|
|
<a id="ofTileAdder(com.gtnewhorizon.structurelib.structure.adders.ITileAdder,net.minecraft.block.Block,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ofTileAdder</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElementNoPlacement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementNoPlacement</a><T> ofTileAdder​(<a href="adders/ITileAdder.html" title="interface in com.gtnewhorizon.structurelib.structure.adders">ITileAdder</a><T> iTileAdder,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> hintBlock,
|
|
int hintMeta)</pre>
|
|
<div class="block">Try to add a structure element with a tile entity. Note that tile adder will be called with a null argument at
|
|
locations without tile entity.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="ofSpecificTileAdder(java.util.function.BiPredicate,java.lang.Class,net.minecraft.block.Block,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ofSpecificTileAdder</h4>
|
|
<pre class="methodSignature">public static <T,​E> <a href="IStructureElementNoPlacement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementNoPlacement</a><T> ofSpecificTileAdder​(java.util.function.BiPredicate<T,​E> iTileAdder,
|
|
java.lang.Class<E> tileClass,
|
|
<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/block/Block.html?is-external=true" title="class or interface in net.minecraft.block" class="externalLink">Block</a> hintBlock,
|
|
int hintMeta)</pre>
|
|
<div class="block">Try to add a structure element with a particular type of tile entity. Note that tile adder will not be called at
|
|
locations without a tile entity.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="onElementPass(java.util.function.Consumer,com.gtnewhorizon.structurelib.structure.IStructureElement)">
|
|
<!-- -->
|
|
</a><a id="onElementPass(java.util.function.Consumer,B)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>onElementPass</h4>
|
|
<pre class="methodSignature">public static <B extends <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>,​T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> onElementPass​(java.util.function.Consumer<T> onCheckPass,
|
|
B element)</pre>
|
|
<div class="block">Call a callback if downstream element returned true in check.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>onCheckPass</code> - side effect</dd>
|
|
<dd><code>element</code> - downstream</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="onElementFail(java.util.function.Consumer,com.gtnewhorizon.structurelib.structure.IStructureElement)">
|
|
<!-- -->
|
|
</a><a id="onElementFail(java.util.function.Consumer,B)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>onElementFail</h4>
|
|
<pre class="methodSignature">public static <B extends <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>,​T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> onElementFail​(java.util.function.Consumer<T> onFail,
|
|
B element)</pre>
|
|
<div class="block">Call a callback if downstream element returned false in check.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>onFail</code> - side effect</dd>
|
|
<dd><code>element</code> - downstream</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="onlyIf(java.util.function.Predicate,com.gtnewhorizon.structurelib.structure.IStructureElement)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>onlyIf</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> onlyIf​(java.util.function.Predicate<? super T> predicate,
|
|
<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><? super T> downstream)</pre>
|
|
<div class="block">Enable this structure element only if given predicate returns true.
|
|
<p>
|
|
Return SKIP when survival auto place if given predicate returns false.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="onlyIf(java.util.function.Predicate,com.gtnewhorizon.structurelib.structure.IStructureElement,com.gtnewhorizon.structurelib.structure.IStructureElement.PlaceResult)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>onlyIf</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> onlyIf​(java.util.function.Predicate<? super T> predicate,
|
|
<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><? super T> downstream,
|
|
<a href="IStructureElement.PlaceResult.html" title="enum in com.gtnewhorizon.structurelib.structure">IStructureElement.PlaceResult</a> placeResultWhenDisabled)</pre>
|
|
<div class="block">Enable this structure element only if given predicate returns true.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>placeResultWhenDisabled</code> - value to return for survival auto place when predicate returns false</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="ofChain(com.gtnewhorizon.structurelib.structure.IStructureElement...)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ofChain</h4>
|
|
<pre class="methodSignature">@SafeVarargs
|
|
public static <T> <a href="IStructureElementChain.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementChain</a><T> ofChain​(<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>... elementChain)</pre>
|
|
<div class="block">This allows you to compose different <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure"><code>IStructureElement</code></a> to form a <b>OR</b> chain. As with any other OR
|
|
operator, this one exhibits short-circuiting behavior, i.e. it will not call next structure element if previous
|
|
one succeeded. (*)
|
|
<p>
|
|
This allows you e.g. accept both a glass block using <a href="#ofBlock(net.minecraft.block.Block,int,net.minecraft.block.Block,int)"><code>ofBlock(Block, int, Block, int)</code></a> and a piece of air
|
|
using <a href="#isAir()"><code>isAir()</code></a>. It will not attempt to capture any errors though, so next one will not be tried if
|
|
previous one would crash.
|
|
<p>
|
|
(*): For survival auto place, it will * REJECT, if all structure element REJECT * SKIP, if 1 or more structure
|
|
element SKIP and the rest structure element (0 or more) REJECT * any other result, **immediately** upon any
|
|
structure element returns these other results. This behavior is not 100% fixed and might change later on, but we
|
|
will send the notice on a best effort basis.
|
|
<p>
|
|
Take care while chaining, as it will try to call every structure element until it returns true. If none does it
|
|
will finally return false.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="ofChain(java.util.List)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ofChain</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElementChain.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementChain</a><T> ofChain​(java.util.List<<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> elementChain)</pre>
|
|
<div class="block">This allows you to compose different <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure"><code>IStructureElement</code></a> to form a <b>OR</b> chain.
|
|
<p>
|
|
Practically no difference with the other overload.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="#ofChain(com.gtnewhorizon.structurelib.structure.IStructureElement...)"><code>ofChain(IStructureElement[])</code></a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="withContext(com.gtnewhorizon.structurelib.structure.IStructureElement)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>withContext</h4>
|
|
<pre class="methodSignature">public static <CTX,​T extends <a href="IWithExtendedContext.html" title="interface in com.gtnewhorizon.structurelib.structure">IWithExtendedContext</a><CTX>> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> withContext​(<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><CTX> elem)</pre>
|
|
<div class="block">Switch to the extended context object in the downstream element</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Type Parameters:</span></dt>
|
|
<dd><code>CTX</code> - extended context type</dd>
|
|
<dd><code>T</code> - existing context object type</dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>elem</code> - downstream element</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="lazy(java.util.function.Supplier)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>lazy</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T> lazy​(java.util.function.Supplier<<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> to)</pre>
|
|
<div class="block">Similar to defer, but caches the first returned element returned and won't call it again. Initialization is not
|
|
thread safe. These both allow the structure element **constructor** to access properties only present on the
|
|
context object (e.g. GT5 multiblock controller), e.g. hatch texture index to use. Use `lazy` if the data you
|
|
access will remain constant across different context object.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="lazy(java.util.function.Function)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>lazy</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T> lazy​(java.util.function.Function<T,​<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> to)</pre>
|
|
<div class="block">This will defer the actual instantiation of structure element until the <b>first time</b> structure code is
|
|
actually called.
|
|
<p>
|
|
Similar to defer, but caches the first returned element returned and won't call it again. Initialization is not
|
|
thread safe. This will allow the structure element <b>constructor</b> to access properties only present on the
|
|
context object (e.g. GT5 multiblock controller), e.g. hatch texture index to use. Use this if the data you access
|
|
will remain constant.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>to</code> - create structure element from the first context object passed in</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="defer(java.util.function.Supplier)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>defer</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T> defer​(java.util.function.Supplier<<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> to)</pre>
|
|
<div class="block">This will defer the actual instantiation of structure element until the structure code is actually called. This
|
|
will allow the structure element <b>constructor</b> to access properties only present on the context object (e.g.
|
|
GT5 multiblock controller), e.g. hatch texture index to use. Use this if it might change for the same structure
|
|
definition, e.g. if your structure might switch mode and change some parameter, while basically remain the same
|
|
shape. Using this while <a href="#lazy(java.util.function.Supplier)"><code>lazy(Supplier)</code></a> is enough will not break anything, but would incur unnecessary
|
|
performance overhead.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>to</code> - downstream element supplier</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="defer(java.util.function.Function)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>defer</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T> defer​(java.util.function.Function<T,​<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> to)</pre>
|
|
<div class="block">This will defer the actual instantiation of structure element until the structure code is actually called. This
|
|
will allow the structure element <b>constructor</b> to access properties only present on the context object (e.g.
|
|
GT5 multiblock controller), e.g. hatch texture index to use. Use this if it might change for the same structure
|
|
definition, e.g. if your structure might switch mode and change some parameter, while basically remain the same
|
|
shape. Using this while <a href="#lazy(java.util.function.Supplier)"><code>lazy(Supplier)</code></a> is enough will not break anything, but would incur unnecessary
|
|
performance overhead.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>to</code> - downstream element supplier</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="defer(java.util.function.Function,java.util.Map)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>defer</h4>
|
|
<pre class="methodSignature">@Deprecated
|
|
public static <T,​K> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T> defer​(java.util.function.Function<T,​K> keyExtractor,
|
|
java.util.Map<K,​<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> map)</pre>
|
|
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">renamed to partitionBy</div>
|
|
</div>
|
|
<div class="block">This is the switch block for structure code.
|
|
<p>
|
|
This allows you to extract or compute a key from context object, and lookup a map for actual structure element to
|
|
use.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>keyExtractor</code> - extract a key from the context object</dd>
|
|
<dd><code>map</code> - all possible structure element</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="partitionBy(java.util.function.Function,java.util.Map)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>partitionBy</h4>
|
|
<pre class="methodSignature">public static <T,​K> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T> partitionBy​(java.util.function.Function<T,​K> keyExtractor,
|
|
java.util.Map<K,​<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> map)</pre>
|
|
<div class="block">This is the switch block for structure code.
|
|
<p>
|
|
This allows you to extract or compute a key from context object, and lookup a map for actual structure element to
|
|
use. This will usually, but not guaranteed, to throw an exception at runtime if keyExtractor returns a key not
|
|
found in map.
|
|
<p>
|
|
Do pay attention to what properties your map has though. You need to pay attention to how they consider equality
|
|
and how they consider null key/values. Guava ImmutableMap is usually a good enough choice.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>keyExtractor</code> - extract a key from the context object</dd>
|
|
<dd><code>map</code> - all possible structure element</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="defer(java.util.function.Function,java.util.Map,com.gtnewhorizon.structurelib.structure.IStructureElement)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>defer</h4>
|
|
<pre class="methodSignature">@Deprecated
|
|
public static <T,​K> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T> defer​(java.util.function.Function<T,​K> keyExtractor,
|
|
java.util.Map<K,​<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> map,
|
|
<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> defaultElem)</pre>
|
|
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">renamed to partitionBy</div>
|
|
</div>
|
|
<div class="block">This is the switch block for structure code, with default case support.
|
|
<p>
|
|
This allows you to extract or compute a key from context object, and lookup a map for actual structure element to
|
|
use. The fallback will only be used when keyExtractor returns a value not found in given map. This will play
|
|
nicely in combination with <a href="#error()"><code>error()</code></a>
|
|
<p>
|
|
Do pay attention to what properties your map has though. You need to pay attention to how they consider equality
|
|
and how they consider null key/values. Guava ImmutableMap is usually a good enough choice.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>keyExtractor</code> - extract a key from the context object</dd>
|
|
<dd><code>map</code> - all possible structure element</dd>
|
|
<dd><code>defaultElem</code> - element to use when keyExtractor returns a value not found in given map</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="partitionBy(java.util.function.Function,java.util.Map,com.gtnewhorizon.structurelib.structure.IStructureElement)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>partitionBy</h4>
|
|
<pre class="methodSignature">public static <T,​K> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T> partitionBy​(java.util.function.Function<T,​K> keyExtractor,
|
|
java.util.Map<K,​<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> map,
|
|
<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> defaultElem)</pre>
|
|
<div class="block">This is the switch block for structure code, with default case support.
|
|
<p>
|
|
This allows you to extract or compute a key from context object, and lookup a map for actual structure element to
|
|
use. The fallback will only be used when keyExtractor returns a value not found in given map. This will play
|
|
nicely in combination with <a href="#error()"><code>error()</code></a>
|
|
<p>
|
|
Do pay attention to what properties your map has though. You need to pay attention to how they consider equality
|
|
and how they consider null key/values. Guava ImmutableMap is usually a good enough choice.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>keyExtractor</code> - extract a key from the context object</dd>
|
|
<dd><code>map</code> - all possible structure element</dd>
|
|
<dd><code>defaultElem</code> - element to use when keyExtractor returns a value not found in given map</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="defer(java.util.function.Function,com.gtnewhorizon.structurelib.structure.IStructureElement...)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>defer</h4>
|
|
<pre class="methodSignature">@SafeVarargs
|
|
@Deprecated
|
|
public static <T> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T> defer​(java.util.function.Function<T,​java.lang.Integer> keyExtractor,
|
|
<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>... array)</pre>
|
|
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">renamed to partitionBy</div>
|
|
</div>
|
|
<div class="block">This is the switch block for structure code.
|
|
<p>
|
|
This allows you to extract or compute an index from context object, and lookup an array for actual structure
|
|
element to use. This will usually, but not guaranteed, to throw an exception at runtime if keyExtractor returns
|
|
an index not within the array bound
|
|
<p>
|
|
Do pay place null values in the array.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>keyExtractor</code> - extract an index from the context object</dd>
|
|
<dd><code>array</code> - all possible structure element</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="partitionBy(java.util.function.Function,com.gtnewhorizon.structurelib.structure.IStructureElement...)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>partitionBy</h4>
|
|
<pre class="methodSignature">@SafeVarargs
|
|
public static <T> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T> partitionBy​(java.util.function.Function<T,​java.lang.Integer> keyExtractor,
|
|
<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>... array)</pre>
|
|
<div class="block">This is the switch block for structure code.
|
|
<p>
|
|
This allows you to extract or compute an index from context object, and lookup an array for actual structure
|
|
element to use. This will usually, but not guaranteed, to throw an exception at runtime if keyExtractor returns
|
|
an index not within the array bound
|
|
<p>
|
|
Do pay place null values in the array.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>keyExtractor</code> - extract an index from the context object</dd>
|
|
<dd><code>array</code> - all possible structure element</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="defer(java.util.function.Function,java.util.List)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>defer</h4>
|
|
<pre class="methodSignature">@Deprecated
|
|
public static <T> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T> defer​(java.util.function.Function<T,​java.lang.Integer> keyExtractor,
|
|
java.util.List<<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> array)</pre>
|
|
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">renamed to partitionBy</div>
|
|
</div>
|
|
<div class="block">This is the switch block for structure code.
|
|
<p>
|
|
This allows you to extract or compute an index from context object, and lookup an array for actual structure
|
|
element to use. This will usually, but not guaranteed, to throw an exception at runtime if keyExtractor returns
|
|
an index not within the array bound
|
|
<p>
|
|
Do pay place null values in the array.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>keyExtractor</code> - extract an index from the context object</dd>
|
|
<dd><code>array</code> - all possible structure element</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="partitionBy(java.util.function.Function,java.util.List)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>partitionBy</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T> partitionBy​(java.util.function.Function<T,​java.lang.Integer> keyExtractor,
|
|
java.util.List<<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> array)</pre>
|
|
<div class="block">This is the switch block for structure code.
|
|
<p>
|
|
This allows you to extract or compute an index from context object, and lookup an array for actual structure
|
|
element to use. This will usually, but not guaranteed, to throw an exception at runtime if keyExtractor returns
|
|
an index not within the array bound
|
|
<p>
|
|
Do pay place null values in the array.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>keyExtractor</code> - extract an index from the context object</dd>
|
|
<dd><code>array</code> - all possible structure element</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="defer(java.util.function.BiFunction)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>defer</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T> defer​(java.util.function.BiFunction<T,​<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a>,​<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> to)</pre>
|
|
<div class="block">This will defer the actual instantiation of structure element until the structure code is actually called. This
|
|
will allow the structure element <b>constructor</b> to access properties only present on the context object (e.g.
|
|
GT5 multiblock controller), e.g. hatch texture index to use. Use this if it might change for the same structure
|
|
definition, e.g. if your structure might switch mode and change some parameter, while basically remain the same
|
|
shape. Using this while <a href="#lazy(java.util.function.Supplier)"><code>lazy(Supplier)</code></a> is enough will not break anything, but would incur unnecessary
|
|
performance overhead.
|
|
<p>
|
|
This variant also passes the trigger item to the function, allowing it to get more info.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>to</code> - downstream element supplier</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="defer(java.util.function.BiFunction,java.util.Map)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>defer</h4>
|
|
<pre class="methodSignature">@Deprecated
|
|
public static <T,​K> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T> defer​(java.util.function.BiFunction<T,​<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a>,​K> keyExtractor,
|
|
java.util.Map<K,​<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> map)</pre>
|
|
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">renamed to partitionBy</div>
|
|
</div>
|
|
<div class="block">This is the switch block for structure code.
|
|
<p>
|
|
This allows you to extract or compute a key from context object, and lookup a map for actual structure element to
|
|
use. This will usually, but not guaranteed, to throw an exception at runtime if keyExtractor returns a key not
|
|
found in map.
|
|
<p>
|
|
Do pay attention to what properties your map has though. You need to pay attention to how they consider equality
|
|
and how they consider null key/values. Guava ImmutableMap is usually a good enough choice.
|
|
<p>
|
|
This variant also passes the trigger item to the function, allowing it to get more info.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>keyExtractor</code> - extract a key from the context object and trigger item</dd>
|
|
<dd><code>map</code> - all possible structure element</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="partitionBy(java.util.function.BiFunction,java.util.Map)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>partitionBy</h4>
|
|
<pre class="methodSignature">public static <T,​K> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T> partitionBy​(java.util.function.BiFunction<T,​<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a>,​K> keyExtractor,
|
|
java.util.Map<K,​<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> map)</pre>
|
|
<div class="block">This is the switch block for structure code.
|
|
<p>
|
|
This allows you to extract or compute a key from context object, and lookup a map for actual structure element to
|
|
use. This will usually, but not guaranteed, to throw an exception at runtime if keyExtractor returns a key not
|
|
found in map.
|
|
<p>
|
|
Do pay attention to what properties your map has though. You need to pay attention to how they consider equality
|
|
and how they consider null key/values. Guava ImmutableMap is usually a good enough choice.
|
|
<p>
|
|
This variant also passes the trigger item to the function, allowing it to get more info.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>keyExtractor</code> - extract a key from the context object and trigger item</dd>
|
|
<dd><code>map</code> - all possible structure element</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="defer(java.util.function.BiFunction,java.util.Map,com.gtnewhorizon.structurelib.structure.IStructureElement)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>defer</h4>
|
|
<pre class="methodSignature">@Deprecated
|
|
public static <T,​K> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T> defer​(java.util.function.BiFunction<T,​<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a>,​K> keyExtractor,
|
|
java.util.Map<K,​<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> map,
|
|
<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> defaultElem)</pre>
|
|
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">renamed to partitionBy</div>
|
|
</div>
|
|
<div class="block">This is the switch block for structure code, with default case support.
|
|
<p>
|
|
This allows you to extract or compute a key from context object, and lookup a map for actual structure element to
|
|
use. The fallback will only be used when keyExtractor returns a value not found in given map. This will play
|
|
nicely in combination with <a href="#error()"><code>error()</code></a>
|
|
<p>
|
|
Do pay attention to what properties your map has though. You need to pay attention to how they consider equality
|
|
and how they consider null key/values. Guava ImmutableMap is usually a good enough choice.
|
|
<p>
|
|
This variant also passes the trigger item to the function, allowing it to get more info.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>keyExtractor</code> - extract a key from the context object and trigger item</dd>
|
|
<dd><code>map</code> - all possible structure element</dd>
|
|
<dd><code>defaultElem</code> - element to use when keyExtractor returns a value not found in given map</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="partitionBy(java.util.function.BiFunction,java.util.Map,com.gtnewhorizon.structurelib.structure.IStructureElement)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>partitionBy</h4>
|
|
<pre class="methodSignature">public static <T,​K> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T> partitionBy​(java.util.function.BiFunction<T,​<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a>,​K> keyExtractor,
|
|
java.util.Map<K,​<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> map,
|
|
<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> defaultElem)</pre>
|
|
<div class="block">This is the switch block for structure code, with default case support.
|
|
<p>
|
|
This allows you to extract or compute a key from context object, and lookup a map for actual structure element to
|
|
use. The fallback will only be used when keyExtractor returns a value not found in given map. This will play
|
|
nicely in combination with <a href="#error()"><code>error()</code></a>
|
|
<p>
|
|
Do pay attention to what properties your map has though. You need to pay attention to how they consider equality
|
|
and how they consider null key/values. Guava ImmutableMap is usually a good enough choice.
|
|
<p>
|
|
This variant also passes the trigger item to the function, allowing it to get more info.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>keyExtractor</code> - extract a key from the context object and trigger item</dd>
|
|
<dd><code>map</code> - all possible structure element</dd>
|
|
<dd><code>defaultElem</code> - element to use when keyExtractor returns a value not found in given map</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="defer(java.util.function.BiFunction,com.gtnewhorizon.structurelib.structure.IStructureElement...)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>defer</h4>
|
|
<pre class="methodSignature">@SafeVarargs
|
|
public static <T> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T> defer​(java.util.function.BiFunction<T,​<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a>,​java.lang.Integer> keyExtractor,
|
|
<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>... array)</pre>
|
|
<div class="block">This is the switch block for structure code.
|
|
<p>
|
|
This allows you to extract or compute an index from context object, and lookup an array for actual structure
|
|
element to use. This will usually, but not guaranteed, to throw an exception at runtime if keyExtractor returns
|
|
an index not within the array bound
|
|
<p>
|
|
Do pay place null values in the array.
|
|
<p>
|
|
This variant also passes the trigger item to the function, allowing it to get more info.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>keyExtractor</code> - extract a key from the context object and trigger item</dd>
|
|
<dd><code>array</code> - all possible structure element</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="defer(java.util.function.BiFunction,java.util.List)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>defer</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T> defer​(java.util.function.BiFunction<T,​<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a>,​java.lang.Integer> keyExtractor,
|
|
java.util.List<<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> array)</pre>
|
|
<div class="block">This is the switch block for structure code.
|
|
<p>
|
|
This allows you to extract or compute an index from context object, and lookup an array for actual structure
|
|
element to use. This will usually, but not guaranteed, to throw an exception at runtime if keyExtractor returns
|
|
an index not within the array bound
|
|
<p>
|
|
Do pay place null values in the array.
|
|
<p>
|
|
This variant also passes the trigger item to the function, allowing it to get more info.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>keyExtractor</code> - extract a key from the context object and trigger item</dd>
|
|
<dd><code>array</code> - all possible structure element</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="defer(java.util.function.Function,java.util.function.BiFunction)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>defer</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T> defer​(java.util.function.Function<T,​<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> toCheck,
|
|
java.util.function.BiFunction<T,​<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a>,​<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> to)</pre>
|
|
<div class="block">This will defer the actual instantiation of structure element until the <b>first time</b> structure code is
|
|
actually called.
|
|
<p>
|
|
Similar to defer, but caches the first returned element returned and won't call it again. Initialization is not
|
|
thread safe. This will allow the structure element <b>constructor</b> to access properties only present on the
|
|
context object (e.g. GT5 multiblock controller), e.g. hatch texture index to use. Use this if the data you access
|
|
will remain constant.
|
|
<p>
|
|
This variant will override the check function of the structure element from second function with the one returned
|
|
from the structure element from first function.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>toCheck</code> - override the check function with the returned element</dd>
|
|
<dd><code>to</code> - create structure element from the context object passed in</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="defer(java.util.function.Function,java.util.function.BiFunction,java.util.Map)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>defer</h4>
|
|
<pre class="methodSignature">@Deprecated
|
|
public static <T,​K> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T> defer​(java.util.function.Function<T,​K> keyExtractorCheck,
|
|
java.util.function.BiFunction<T,​<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a>,​K> keyExtractor,
|
|
java.util.Map<K,​<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> map)</pre>
|
|
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">renamed to partitionBy</div>
|
|
</div>
|
|
<div class="block">This is the switch block for structure code.
|
|
<p>
|
|
This allows you to extract or compute a key from context object, and lookup a map for actual structure element to
|
|
use. This will usually, but not guaranteed, to throw an exception at runtime if keyExtractor returns a key not
|
|
found in map.
|
|
<p>
|
|
Do pay attention to what properties your map has though. You need to pay attention to how they consider equality
|
|
and how they consider null key/values. Guava ImmutableMap is usually a good enough choice.
|
|
<p>
|
|
This variant also passes the trigger item to the function, allowing it to get more info.
|
|
<p>
|
|
This variant will override the check function of the structure element from second function with the one returned
|
|
from the structure element from first function.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>keyExtractorCheck</code> - key extractor of the structure element that will be used for check.</dd>
|
|
<dd><code>keyExtractor</code> - extract a key from the context object and trigger item</dd>
|
|
<dd><code>map</code> - all possible structure element</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="partitionBy(java.util.function.Function,java.util.function.BiFunction,java.util.Map)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>partitionBy</h4>
|
|
<pre class="methodSignature">public static <T,​K> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T> partitionBy​(java.util.function.Function<T,​K> keyExtractorCheck,
|
|
java.util.function.BiFunction<T,​<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a>,​K> keyExtractor,
|
|
java.util.Map<K,​<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> map)</pre>
|
|
<div class="block">This is the switch block for structure code.
|
|
<p>
|
|
This allows you to extract or compute a key from context object, and lookup a map for actual structure element to
|
|
use. This will usually, but not guaranteed, to throw an exception at runtime if keyExtractor returns a key not
|
|
found in map.
|
|
<p>
|
|
Do pay attention to what properties your map has though. You need to pay attention to how they consider equality
|
|
and how they consider null key/values. Guava ImmutableMap is usually a good enough choice.
|
|
<p>
|
|
This variant also passes the trigger item to the function, allowing it to get more info.
|
|
<p>
|
|
This variant will override the check function of the structure element from second function with the one returned
|
|
from the structure element from first function.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>keyExtractorCheck</code> - key extractor of the structure element that will be used for check.</dd>
|
|
<dd><code>keyExtractor</code> - extract a key from the context object and trigger item</dd>
|
|
<dd><code>map</code> - all possible structure element</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="defer(java.util.function.Function,java.util.function.BiFunction,java.util.Map,com.gtnewhorizon.structurelib.structure.IStructureElement)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>defer</h4>
|
|
<pre class="methodSignature">@Deprecated
|
|
public static <T,​K> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T> defer​(java.util.function.Function<T,​K> keyExtractorCheck,
|
|
java.util.function.BiFunction<T,​<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a>,​K> keyExtractor,
|
|
java.util.Map<K,​<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> map,
|
|
<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> defaultElem)</pre>
|
|
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">renamed to partitionBy</div>
|
|
</div>
|
|
<div class="block">This is the switch block for structure code, with default case.
|
|
<p>
|
|
This allows you to extract or compute a key from context object, and lookup a map for actual structure element to
|
|
use. defaultElem will be used if either extractor returned a key not found in map.
|
|
<p>
|
|
Do pay attention to what properties your map has though. You need to pay attention to how they consider equality
|
|
and how they consider null key/values. Guava ImmutableMap is usually a good enough choice.
|
|
<p>
|
|
This variant also passes the trigger item to the function, allowing it to get more info.
|
|
<p>
|
|
This variant will override the check function of the structure element from second function with the one returned
|
|
from the structure element from first function.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>keyExtractorCheck</code> - key extractor of the structure element that will be used for check.</dd>
|
|
<dd><code>keyExtractor</code> - extract a key from the context object and trigger item</dd>
|
|
<dd><code>map</code> - all possible structure element</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="partitionBy(java.util.function.Function,java.util.function.BiFunction,java.util.Map,com.gtnewhorizon.structurelib.structure.IStructureElement)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>partitionBy</h4>
|
|
<pre class="methodSignature">public static <T,​K> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T> partitionBy​(java.util.function.Function<T,​K> keyExtractorCheck,
|
|
java.util.function.BiFunction<T,​<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a>,​K> keyExtractor,
|
|
java.util.Map<K,​<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> map,
|
|
<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> defaultElem)</pre>
|
|
<div class="block">This is the switch block for structure code, with default case.
|
|
<p>
|
|
This allows you to extract or compute a key from context object, and lookup a map for actual structure element to
|
|
use. defaultElem will be used if either extractor returned a key not found in map.
|
|
<p>
|
|
Do pay attention to what properties your map has though. You need to pay attention to how they consider equality
|
|
and how they consider null key/values. Guava ImmutableMap is usually a good enough choice.
|
|
<p>
|
|
This variant also passes the trigger item to the function, allowing it to get more info.
|
|
<p>
|
|
This variant will override the check function of the structure element from second function with the one returned
|
|
from the structure element from first function.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>keyExtractorCheck</code> - key extractor of the structure element that will be used for check.</dd>
|
|
<dd><code>keyExtractor</code> - extract a key from the context object and trigger item</dd>
|
|
<dd><code>map</code> - all possible structure element</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="defer(java.util.function.Function,java.util.function.BiFunction,com.gtnewhorizon.structurelib.structure.IStructureElement...)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>defer</h4>
|
|
<pre class="methodSignature">@SafeVarargs
|
|
@Deprecated
|
|
public static <T> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T> defer​(java.util.function.Function<T,​java.lang.Integer> keyExtractorCheck,
|
|
java.util.function.BiFunction<T,​<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a>,​java.lang.Integer> keyExtractor,
|
|
<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>... array)</pre>
|
|
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">renamed to partitionBy</div>
|
|
</div>
|
|
<div class="block">This is the switch block for structure code, with default case.
|
|
<p>
|
|
This allows you to extract or compute an index from context object, and lookup an array for actual structure
|
|
element to use. This will usually, but not guaranteed, to throw an exception at runtime if keyExtractor returns
|
|
an index not within the array bound
|
|
<p>
|
|
Do pay place null values in the array.
|
|
<p>
|
|
This variant also passes the trigger item to the function, allowing it to get more info.
|
|
<p>
|
|
This variant will override the check function of the structure element from second function with the one returned
|
|
from the structure element from first function.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>keyExtractorCheck</code> - key extractor of the structure element that will be used for check.</dd>
|
|
<dd><code>keyExtractor</code> - extract a key from the context object and trigger item</dd>
|
|
<dd><code>array</code> - all possible structure element</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="partitionBy(java.util.function.Function,java.util.function.BiFunction,com.gtnewhorizon.structurelib.structure.IStructureElement...)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>partitionBy</h4>
|
|
<pre class="methodSignature">@SafeVarargs
|
|
public static <T> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T> partitionBy​(java.util.function.Function<T,​java.lang.Integer> keyExtractorCheck,
|
|
java.util.function.BiFunction<T,​<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a>,​java.lang.Integer> keyExtractor,
|
|
<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>... array)</pre>
|
|
<div class="block">This is the switch block for structure code, with default case.
|
|
<p>
|
|
This allows you to extract or compute an index from context object, and lookup an array for actual structure
|
|
element to use. This will usually, but not guaranteed, to throw an exception at runtime if keyExtractor returns
|
|
an index not within the array bound
|
|
<p>
|
|
Do pay place null values in the array.
|
|
<p>
|
|
This variant also passes the trigger item to the function, allowing it to get more info.
|
|
<p>
|
|
This variant will override the check function of the structure element from second function with the one returned
|
|
from the structure element from first function.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>keyExtractorCheck</code> - key extractor of the structure element that will be used for check.</dd>
|
|
<dd><code>keyExtractor</code> - extract a key from the context object and trigger item</dd>
|
|
<dd><code>array</code> - all possible structure element</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="defer(java.util.function.Function,java.util.function.BiFunction,java.util.List)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>defer</h4>
|
|
<pre class="methodSignature">@Deprecated
|
|
public static <T> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T> defer​(java.util.function.Function<T,​java.lang.Integer> keyExtractorCheck,
|
|
java.util.function.BiFunction<T,​<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a>,​java.lang.Integer> keyExtractor,
|
|
java.util.List<<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> array)</pre>
|
|
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">renamed to partitionBy</div>
|
|
</div>
|
|
<div class="block">This is the switch block for structure code, with default case.
|
|
<p>
|
|
This allows you to extract or compute an index from context object, and lookup an array for actual structure
|
|
element to use. This will usually, but not guaranteed, to throw an exception at runtime if keyExtractor returns
|
|
an index not within the array bound
|
|
<p>
|
|
This variant also passes the trigger item to the function, allowing it to get more info.
|
|
<p>
|
|
This variant will override the check function of the structure element from second function with the one returned
|
|
from the structure element from first function.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>keyExtractorCheck</code> - key extractor of the structure element that will be used for check.</dd>
|
|
<dd><code>keyExtractor</code> - extract a key from the context object and trigger item</dd>
|
|
<dd><code>array</code> - all possible structure element</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="partitionBy(java.util.function.Function,java.util.function.BiFunction,java.util.List)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>partitionBy</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElementDeferred.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElementDeferred</a><T> partitionBy​(java.util.function.Function<T,​java.lang.Integer> keyExtractorCheck,
|
|
java.util.function.BiFunction<T,​<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/item/ItemStack.html?is-external=true" title="class or interface in net.minecraft.item" class="externalLink">ItemStack</a>,​java.lang.Integer> keyExtractor,
|
|
java.util.List<<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T>> array)</pre>
|
|
<div class="block">This is the switch block for structure code, with default case.
|
|
<p>
|
|
This allows you to extract or compute an index from context object, and lookup an array for actual structure
|
|
element to use. This will usually, but not guaranteed, to throw an exception at runtime if keyExtractor returns
|
|
an index not within the array bound
|
|
<p>
|
|
This variant also passes the trigger item to the function, allowing it to get more info.
|
|
<p>
|
|
This variant will override the check function of the structure element from second function with the one returned
|
|
from the structure element from first function.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>keyExtractorCheck</code> - key extractor of the structure element that will be used for check.</dd>
|
|
<dd><code>keyExtractor</code> - extract a key from the context object and trigger item</dd>
|
|
<dd><code>array</code> - all possible structure element</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="withChannel(java.lang.String,com.gtnewhorizon.structurelib.structure.IStructureElement)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>withChannel</h4>
|
|
<pre class="methodSignature">public static <T> <a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> withChannel​(java.lang.String channel,
|
|
<a href="IStructureElement.html" title="interface in com.gtnewhorizon.structurelib.structure">IStructureElement</a><T> backing)</pre>
|
|
<div class="block">See channels.md in docs folder</div>
|
|
</li>
|
|
</ul>
|
|
<a id="step(int,int,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>step</h4>
|
|
<pre class="methodSignature">public static <T> com.gtnewhorizon.structurelib.structure.IStructureNavigate<T> step​(int a,
|
|
int b,
|
|
int c)</pre>
|
|
<div class="block">Used internally, to generate skips for structure definitions</div>
|
|
</li>
|
|
</ul>
|
|
<a id="step(com.gtnewhorizon.structurelib.util.Vec3Impl)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>step</h4>
|
|
<pre class="methodSignature">public static <T> com.gtnewhorizon.structurelib.structure.IStructureNavigate<T> step​(<a href="../util/Vec3Impl.html" title="class in com.gtnewhorizon.structurelib.util">Vec3Impl</a> step)</pre>
|
|
<div class="block">Used internally, to generate skips for structure definitions</div>
|
|
</li>
|
|
</ul>
|
|
<a id="getPseudoJavaCode(net.minecraft.world.World,com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing,int,int,int,int,int,int,java.util.function.Function,int,int,int,boolean)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getPseudoJavaCode</h4>
|
|
<pre class="methodSignature">public static java.lang.String getPseudoJavaCode​(<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/world/World.html?is-external=true" title="class or interface in net.minecraft.world" class="externalLink">World</a> world,
|
|
<a href="../alignment/enumerable/ExtendedFacing.html" title="enum in com.gtnewhorizon.structurelib.alignment.enumerable">ExtendedFacing</a> extendedFacing,
|
|
int basePositionX,
|
|
int basePositionY,
|
|
int basePositionZ,
|
|
int basePositionA,
|
|
int basePositionB,
|
|
int basePositionC,
|
|
java.util.function.Function<? super <a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/tileentity/TileEntity.html?is-external=true" title="class or interface in net.minecraft.tileentity" class="externalLink">TileEntity</a>,​java.lang.String> tileEntityClassifier,
|
|
int sizeA,
|
|
int sizeB,
|
|
int sizeC,
|
|
boolean transpose)</pre>
|
|
<div class="block">Used only to get pseudo code in structure writer...
|
|
<p>
|
|
NOTE: GT specific code got removed. TODO add a mean</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>tileEntityClassifier</code> - return a string that denote the type of a tile entity, or null if it's nothing
|
|
special. useful if the tile entity cannot be simply distinguished via getClass.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="iterate(net.minecraft.world.World,com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing,int,int,int,int,int,int,int,int,int,com.gtnewhorizon.structurelib.structure.IBlockPosConsumer)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>iterate</h4>
|
|
<pre class="methodSignature">public static void iterate​(<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/world/World.html?is-external=true" title="class or interface in net.minecraft.world" class="externalLink">World</a> world,
|
|
<a href="../alignment/enumerable/ExtendedFacing.html" title="enum in com.gtnewhorizon.structurelib.alignment.enumerable">ExtendedFacing</a> extendedFacing,
|
|
int basePositionX,
|
|
int basePositionY,
|
|
int basePositionZ,
|
|
int basePositionA,
|
|
int basePositionB,
|
|
int basePositionC,
|
|
int sizeA,
|
|
int sizeB,
|
|
int sizeC,
|
|
<a href="IBlockPosConsumer.html" title="interface in com.gtnewhorizon.structurelib.structure">IBlockPosConsumer</a> iBlockPosConsumer)</pre>
|
|
</li>
|
|
</ul>
|
|
<a id="iterate(net.minecraft.world.World,com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing,int,int,int,int,int,int,boolean,int,int,int,com.gtnewhorizon.structurelib.structure.IBlockPosConsumer,java.lang.Runnable,java.lang.Runnable)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>iterate</h4>
|
|
<pre class="methodSignature">public static void iterate​(<a href="https://skmedix.github.io/ForgeJavaDocs/javadoc/forge/1.7.10-10.13.4.1614/net/minecraft/world/World.html?is-external=true" title="class or interface in net.minecraft.world" class="externalLink">World</a> world,
|
|
<a href="../alignment/enumerable/ExtendedFacing.html" title="enum in com.gtnewhorizon.structurelib.alignment.enumerable">ExtendedFacing</a> extendedFacing,
|
|
int basePositionX,
|
|
int basePositionY,
|
|
int basePositionZ,
|
|
int basePositionA,
|
|
int basePositionB,
|
|
int basePositionC,
|
|
boolean transpose,
|
|
int sizeA,
|
|
int sizeB,
|
|
int sizeC,
|
|
<a href="IBlockPosConsumer.html" title="interface in com.gtnewhorizon.structurelib.structure">IBlockPosConsumer</a> iBlockPosConsumer,
|
|
java.lang.Runnable nextB,
|
|
java.lang.Runnable nextC)</pre>
|
|
</li>
|
|
</ul>
|
|
<a id="transpose(java.lang.String[][])">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>transpose</h4>
|
|
<pre class="methodSignature">public static java.lang.String[][] transpose​(java.lang.String[][] structurePiece)</pre>
|
|
<div class="block">Transposes shape (swaps B and C axis, can be used to un-transpose transposed shape) WARNING! Do not use on old
|
|
api...</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>structurePiece</code> - shape (transposed shape)</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>transposed shape (untransposed shape)</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<footer role="contentinfo">
|
|
<nav role="navigation">
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<div class="bottomNav"><a id="navbar.bottom">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a id="navbar.bottom.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../../index-all.html">Index</a></li>
|
|
<li><a href="../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../../index.html?com/gtnewhorizon/structurelib/structure/StructureUtility.html" target="_top">Frames</a></li>
|
|
<li><a href="StructureUtility.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_bottom">
|
|
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li>Field | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a id="skip.navbar.bottom">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
</nav>
|
|
</footer>
|
|
</body>
|
|
</html>
|