Compare commits

..

4 commits

Author SHA1 Message Date
Ell
99dcd0f1ad 38.2 2023-06-28 10:15:42 +02:00
Ell
911f68d3b2 allow seeing aura spot debug in spectator
closes #314
2023-06-28 10:13:18 +02:00
Ell
7a18cd29d2 dded range argument to reset command
closes #281
partly addresses #314
2023-06-28 10:10:32 +02:00
Ell
9f97008323 documented aura fizzling 2023-06-28 09:53:09 +02:00
5 changed files with 17 additions and 7 deletions

View file

@ -13,7 +13,7 @@ apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
version = '38.1'
version = '38.2'
group = 'de.ellpeck.naturesaura' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'NaturesAura'

View file

@ -34,10 +34,11 @@ public final class CommandAura {
source.sendSuccess(Component.literal("Removed aura from area"), true);
return 0;
})))
.then(Commands.literal("reset").executes(context -> {
.then(Commands.literal("reset").then(Commands.argument("range", IntegerArgumentType.integer(10, 1000)).executes(context -> {
var range = IntegerArgumentType.getInteger(context, "range");
var source = context.getSource();
var pos = new BlockPos(source.getPosition());
IAuraChunk.getSpotsInArea(source.getLevel(), pos, 35, (spot, amount) -> {
IAuraChunk.getSpotsInArea(source.getLevel(), pos, range, (spot, amount) -> {
var chunk = IAuraChunk.getAuraChunk(source.getLevel(), spot);
if (amount > 0)
chunk.drainAura(spot, amount);
@ -46,6 +47,6 @@ public final class CommandAura {
});
source.sendSuccess(Component.literal("Reset aura in area"), true);
return 0;
})));
}))));
}
}

View file

@ -73,7 +73,7 @@ public class ClientEvents {
if (mc.options.renderDebug && ModConfig.instance.debugText.get()) {
var prefix = ChatFormatting.GREEN + "[" + NaturesAura.MOD_NAME + "]" + ChatFormatting.RESET + " ";
List<String> left = event.getLeft();
if (mc.player.isCreative()) {
if (mc.player.isCreative() || mc.player.isSpectator()) {
left.add("");
var amount = new MutableInt(IAuraChunk.DEFAULT_AURA);
var spots = new MutableInt();
@ -187,7 +187,7 @@ public class ClientEvents {
// aura spot debug
ClientEvents.hoveringAuraSpot = null;
if (mc.options.renderDebug && mc.player.isCreative() && ModConfig.instance.debugLevel.get()) {
if (mc.options.renderDebug && (mc.player.isCreative() || mc.player.isSpectator()) && ModConfig.instance.debugLevel.get()) {
var playerEye = mc.player.getEyePosition(event.getPartialTick());
var playerView = mc.player.getViewVector(event.getPartialTick()).normalize();
var range = mc.gameMode.getPickRange();

View file

@ -9,10 +9,14 @@
"type": "text",
"text": "As described in the $(l:creating/on_generating)On Creating Aura$() section, most $(thing)creational devices$() lack the ability to create $(aura) beyond a certain point. The $(item)Creational Catalyst$() easily solves this problem: Placing it directly below any creational device will cause its limit to be lifted, making it able to generate $(aura) far beyond the previously mentioned point.$(br)This comes at no cost in return."
},
{
"type": "text",
"text": "While generating $(aura) indefinitely may be an exciting prospect for some magical botanists, it has also recently been discovered that doing so may be of little use due to $(l:intro/aura#fizzling)Aura fizzling$(). This should be kept in mind, and mitigated using a device like the $(l:devices/aura_detector)Aura Detector$()."
},
{
"type": "crafting",
"recipe": "naturesaura:generator_limit_remover",
"text": "Crafting the $(item)Creational Catalyst$() using the tokens"
}
]
}
}

View file

@ -18,6 +18,11 @@
{
"type": "text",
"text": "Similarly, if a draining instrument is placed close to a rich area, it will first drain that area before moving on to draining the area directly around itself.$(p)While this behavior surely sounds complicated, the consensus is that letting the apparatus and $(aura) do their thing for a while seems to be a good approach of analysis, as sometimes $(aura) tends to migrate and move around to balance itself out naturally."
},
{
"type": "text",
"text": "Lastly, and more recently, magical botanists have discovered a behavior not previously observed: $(item)Aura fizzling$(). This behavior seems to occur when $(aura) has spread far enough in all directions to be so distant from the point it originated that it starts slowly $(thing)fizzling out$(). While this does not affect the $(aura) closer to its origin in any way, it may still be something to be aware of, and mitigate using something like the $(l:devices/aura_detector)Aura Detector$().",
"anchor": "fizzling"
}
]
}