diff --git a/src/main/java/ru/betterend/blocks/complex/MetalMaterial.java b/src/main/java/ru/betterend/blocks/complex/MetalMaterial.java index cb057d54..b0dbd619 100644 --- a/src/main/java/ru/betterend/blocks/complex/MetalMaterial.java +++ b/src/main/java/ru/betterend/blocks/complex/MetalMaterial.java @@ -225,5 +225,6 @@ public class MetalMaterial { TagHelper.addTag(BlockTags.BEACON_BASE_BLOCKS, block); TagHelper.addTag(ItemTags.BEACON_PAYMENT_ITEMS, ingot); TagHelper.addTag(TagAPI.DRAGON_IMMUNE, ore, bars); + TagHelper.addTag(TagAPI.HAMMERS, hammer); } } \ No newline at end of file diff --git a/src/main/java/ru/betterend/mixin/client/BiomeColorsMixin.java b/src/main/java/ru/betterend/mixin/client/BiomeColorsMixin.java index 5b4b9af3..cce33d52 100644 --- a/src/main/java/ru/betterend/mixin/client/BiomeColorsMixin.java +++ b/src/main/java/ru/betterend/mixin/client/BiomeColorsMixin.java @@ -13,10 +13,13 @@ import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import ru.bclib.util.BlocksHelper; import ru.bclib.util.ColorUtil; +import ru.bclib.util.MHelper; import ru.betterend.client.ClientOptions; import ru.betterend.registry.EndBlocks; import java.awt.Point; +import java.util.Arrays; +import java.util.Comparator; @Mixin(BiomeColors.class) public class BiomeColorsMixin { @@ -35,8 +38,7 @@ public class BiomeColorsMixin { mut.setX(pos.getX() + OFFSETS[i].x); mut.setZ(pos.getZ() + OFFSETS[i].y); if ((view.getBlockState(mut).is(EndBlocks.BRIMSTONE))) { - info.setReturnValue(i < 16 ? STREAM_COLOR : POISON_COLOR); - info.cancel(); + info.setReturnValue(i < 4 ? POISON_COLOR : STREAM_COLOR); return; } } @@ -46,21 +48,15 @@ public class BiomeColorsMixin { static { HAS_SODIUM = FabricLoader.getInstance().isModLoaded("sodium"); + int index = 0; OFFSETS = new Point[20]; - for (int i = 0; i < 3; i++) { - int p = i - 1; - OFFSETS[i] = new Point(p, -2); - OFFSETS[i + 3] = new Point(p, 2); - OFFSETS[i + 6] = new Point(-2, p); - OFFSETS[i + 9] = new Point(2, p); - } - - for (int i = 0; i < 4; i++) { - int inner = i + 16; - Direction dir = BlocksHelper.HORIZONTAL[i]; - OFFSETS[inner] = new Point(dir.getStepX(), dir.getStepZ()); - dir = BlocksHelper.HORIZONTAL[(i + 1) & 3]; - OFFSETS[i + 12] = new Point(OFFSETS[inner].x + dir.getStepX(), OFFSETS[inner].y + dir.getStepZ()); + for (int x = -2; x < 3; x++) { + for (int z = -2; z < 3; z++) { + if ((x != 0 || z != 0) && (Math.abs(x) != 2 || Math.abs(z) != 2)) { + OFFSETS[index++] = new Point(x, z); + } + } } + Arrays.sort(OFFSETS, Comparator.comparingInt(pos -> MHelper.sqr(pos.x) + MHelper.sqr(pos.y))); } } diff --git a/src/main/java/ru/betterend/recipe/AlloyingRecipes.java b/src/main/java/ru/betterend/recipe/AlloyingRecipes.java index f6585a15..b4f5aefe 100644 --- a/src/main/java/ru/betterend/recipe/AlloyingRecipes.java +++ b/src/main/java/ru/betterend/recipe/AlloyingRecipes.java @@ -19,7 +19,7 @@ public class AlloyingRecipes { .setOutput(Items.GOLD_INGOT, 3) .setExpiriense(3F) .build(); - AlloyingRecipe.Builder.create("additional_gold") + AlloyingRecipe.Builder.create("additional_copper") .setInput(EndTags.ALLOYING_COPPER, EndTags.ALLOYING_COPPER) .setOutput(Items.COPPER_INGOT, 3) .setExpiriense(3F)