Compare commits

..
11 Commits
Author SHA1 Message Date
Martin Robertz 1b7fe15299 Merge remote-tracking branch 'ReignOfFROZE/master' into dev 2025-04-20 21:58:47 +02:00
Martin Robertz 3cbd6cf581 update 2025-04-12 23:09:52 +02:00
Martin Robertz 9d06da9b3b fix 2025-04-12 11:22:49 +02:00
Martin Robertz 88d5991161 update 2025-04-12 11:17:31 +02:00
Martin Robertz cce7372675 Merge remote-tracking branch 'origin/feature/channel-desc' into dev
# Conflicts:
#	dependencies.gradle
#	src/main/java/com/gtnewhorizon/structurelib/StructureLib.java
#	src/main/java/com/gtnewhorizon/structurelib/StructureLibAPI.java
#	src/main/java/com/gtnewhorizon/structurelib/gui/GuiScreenConfigureChannels.java
#	src/main/java/com/gtnewhorizon/structurelib/structure/IStructureDefinition.java
#	src/main/resources/assets/structurelib/lang/en_US.lang
#	src/main/resources/assets/structurelib/lang/zh_CN.lang
#	src/main/resources/assets/structurelib/textures/gui/channels.png
2025-04-12 11:16:46 +02:00
Glease 24403a82ce spotless
Signed-off-by: Glease <4586901+Glease@users.noreply.github.com>
2025-04-11 17:15:54 +08:00
Glease b775c1068d add gui tutorial and remove debug code
Signed-off-by: Glease <4586901+Glease@users.noreply.github.com>
2025-04-11 17:11:00 +08:00
Glease 6a557c9aa0 bruh
Signed-off-by: Glease <4586901+Glease@users.noreply.github.com>
2025-04-08 14:53:47 +08:00
Glease 14d7219b41 change NEI to a implementation dependency
Signed-off-by: Glease <4586901+Glease@users.noreply.github.com>
2025-04-08 14:46:12 +08:00
Glease faa3e75ed1 spotless
Signed-off-by: Glease <4586901+Glease@users.noreply.github.com>
2025-04-08 14:34:32 +08:00
Glease df96277bd7 add channel desc and channel indicator item
Signed-off-by: Glease <4586901+Glease@users.noreply.github.com>
2025-04-08 14:32:10 +08:00
3 changed files with 20 additions and 22 deletions

No files matched your search

+4 -4
View File
@@ -1,15 +1,15 @@
// Add your dependencies here
dependencies {
api("com.github.GTNewHorizons:GTNHLib:0.6.21:dev")
implementation("com.github.GTNewHorizons:NotEnoughItems:2.7.40-GTNH:dev")
api("com.github.GTNewHorizons:GTNHLib:0.6.19:dev")
implementation("com.github.GTNewHorizons:NotEnoughItems:2.7.38-GTNH:dev")
compileOnly("com.github.GTNewHorizons:ServerUtilities:2.1.46")
compileOnly("com.github.GTNewHorizons:ServerUtilities:2.1.41-pre")
testImplementation(platform('org.junit:junit-bom:5.9.2'))
testImplementation('org.junit.jupiter:junit-jupiter')
// runtimeOnlyNonPublishable("com.github.GTNewHorizons:GT5-Unofficial:5.09.51.261:dev") {
// runtimeOnlyNonPublishable("com.github.GTNewHorizons:GT5-Unofficial:5.09.51.234:dev") {
// exclude group: "com.github.GTNewHorizons", module: "StructureLib"
// }
}
@@ -379,7 +379,7 @@ public interface IStructureDefinition<T> {
basePositionC,
hintsOnly ? ignoreBlockUnloaded((e, w, x, y, z, a, b, c) -> {
e.spawnHint(object, world, x, y, z, trigger);
if (ChannelDataAccessor.hasSubChannel(trigger, "show_error")
if (ChannelDataAccessor.hasSubChannel(trigger, StructureLibAPI.CHANNEL_SHOW_ERROR)
&& !e.couldBeValid(object, world, x, y, z, trigger)) {
StructureLibAPI.markHintParticleError(StructureLib.getCurrentPlayer(), world, x, y, z);
}
@@ -768,20 +768,7 @@ public class StructureUtility {
* given tier, then player will be allowed to use multiple kinds of blocks, but their tier is guaranteed to be the
* same.
* <p>
* <h4>WARNING</h4> <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>
* <h4>Example Implementation</h4>
* <b>Example Implementation:</b>
* <p>
* Assume you have 16 tier, each map to one particular block's 16 different meta. You will usually want something
* like this
@@ -808,7 +795,7 @@ public class StructureUtility {
* }
* </pre>
*
* Important bits of this example implementation:
* Important bits:
* <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>
@@ -817,8 +804,19 @@ public class StructureUtility {
* <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.
* <p>
* <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>
*
* @param tierExtractor 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