diff --git a/gradle.properties b/gradle.properties index a5a5ee7..ac3f22c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -34,7 +34,7 @@ mod_name=Familiar Magic # The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default. mod_license=MIT # The mod version. See https://semver.org/ -mod_version=1.0.5 +mod_version=1.0.6 # The group ID for the mod. It is only important when publishing as an artifact to a Maven repository. # This should match the base package used for the mod sources. # See https://maven.apache.org/guides/mini/guide-naming-conventions.html diff --git a/src/main/java/io/github/afamiliarquiet/familiar_magic/block/entity/SummoningTableBlockEntity.java b/src/main/java/io/github/afamiliarquiet/familiar_magic/block/entity/SummoningTableBlockEntity.java index 2ffc77e..351bf70 100644 --- a/src/main/java/io/github/afamiliarquiet/familiar_magic/block/entity/SummoningTableBlockEntity.java +++ b/src/main/java/io/github/afamiliarquiet/familiar_magic/block/entity/SummoningTableBlockEntity.java @@ -144,6 +144,7 @@ public SummoningTableBlockEntity(BlockPos pos, BlockState blockState) { Arrays.fill(this.targetFromCandlesInNybbles, FamiliarTricks.NO_CANDLE); } + // could maybe remember these for a few ticks if performance is a concern, update when candles update or something public boolean hasLitCandles() { for (byte tasty : this.targetFromCandlesInNybbles) { if ((tasty & (FamiliarTricks.NO_CANDLE | FamiliarTricks.UNLIT_CANDLE)) != 0) { @@ -154,8 +155,9 @@ public boolean hasLitCandles() { return true; } - public boolean hasTarget() { + public boolean hasTarget() { return this.level instanceof ServerLevel serverLevel + && hasLitCandles() && findTargetByUuid(this.getCandleTarget(), serverLevel.getServer()) != null; } diff --git a/src/main/java/io/github/afamiliarquiet/familiar_magic/mixin/FamiliarFoxMixin.java b/src/main/java/io/github/afamiliarquiet/familiar_magic/mixin/FamiliarFoxMixin.java index 4abc1a9..38b16ad 100644 --- a/src/main/java/io/github/afamiliarquiet/familiar_magic/mixin/FamiliarFoxMixin.java +++ b/src/main/java/io/github/afamiliarquiet/familiar_magic/mixin/FamiliarFoxMixin.java @@ -19,6 +19,6 @@ protected FamiliarFoxMixin(EntityType entityType, Level level) @Inject(at = @At("TAIL"), method = "registerGoals") private void registerGoals(CallbackInfo ci) { // a slightly more relieving casting than (Fox)(Object).. i'm kinda glad this fest is on neo, i'm liking it here - this.goalSelector.addGoal(10, new FoxActivateSummoningTableGoal((Fox)this.self(), 1, 12)); + this.goalSelector.addGoal(6, new FoxActivateSummoningTableGoal((Fox)this.self(), 1, 12)); } }