From d6dba183f72c8b6fc894c8986d962bc450404e73 Mon Sep 17 00:00:00 2001 From: UselessBullets <80850784+UselessBullets@users.noreply.github.com> Date: Sun, 24 Mar 2024 00:23:16 -0500 Subject: [PATCH 1/7] Accounted for new nethercoal overlay texture --- src/main/java/turniplabs/halplibe/util/BlockCoords.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/turniplabs/halplibe/util/BlockCoords.java b/src/main/java/turniplabs/halplibe/util/BlockCoords.java index 03950b5..f2503cb 100644 --- a/src/main/java/turniplabs/halplibe/util/BlockCoords.java +++ b/src/main/java/turniplabs/halplibe/util/BlockCoords.java @@ -44,6 +44,7 @@ public static void markSectionUsed(int[] topLeft, int[] bottomRight){ markSectionUsed(new int[]{16,24}, new int[]{19, 31}); markSectionUsed(new int[]{5,17}, new int[]{6, 24}); markSectionUsed(new int[]{7,18}, new int[]{10, 20}); + markIDUsed(5, 16); markIDUsed(15, 16); markIDUsed(16, 16); markIDUsed(18, 8); From e7637049da00f03e030199d38275a1628543e9b4 Mon Sep 17 00:00:00 2001 From: UselessBullets <80850784+UselessBullets@users.noreply.github.com> Date: Sun, 24 Mar 2024 00:34:13 -0500 Subject: [PATCH 2/7] Use new BTA infiniburn system --- .../turniplabs/halplibe/helper/BlockBuilder.java | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/main/java/turniplabs/halplibe/helper/BlockBuilder.java b/src/main/java/turniplabs/halplibe/helper/BlockBuilder.java index 73e6b5b..b128dcb 100644 --- a/src/main/java/turniplabs/halplibe/helper/BlockBuilder.java +++ b/src/main/java/turniplabs/halplibe/helper/BlockBuilder.java @@ -5,6 +5,8 @@ import net.minecraft.client.render.block.model.BlockModel; import net.minecraft.client.render.block.model.BlockModelDispatcher; import net.minecraft.core.block.Block; +import net.minecraft.core.block.BlockFire; +import net.minecraft.core.block.tag.BlockTags; import net.minecraft.core.data.tag.Tag; import net.minecraft.core.item.Item; import net.minecraft.core.item.block.ItemBlock; @@ -13,17 +15,13 @@ import net.minecraft.core.util.helper.Side; import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; -import turniplabs.halplibe.mixin.accessors.BlockFireAccessor; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; import java.util.stream.Collectors; public class BlockBuilder implements Cloneable { - public static final Set infiniburnList = new TreeSet<>(); - static { - infiniburnList.add(Block.netherrack.id); - } - private final String MOD_ID; private Float hardness = null; private Float resistance = null; @@ -555,11 +553,11 @@ public T build(T block) { } if (flammability != null) { - ((BlockFireAccessor) Block.fire).callSetBurnRate(block.id, flammability[0], flammability[1]); + BlockFire.setBurnRate(block.id, flammability[0], flammability[1]); } if (infiniburn) { - infiniburnList.add(block.id); + block.withTags(BlockTags.INFINITE_BURN); } if (visualUpdateOnMetadata) { From cf6decae7005a5c55e69fdc5c81b6322f96f919d Mon Sep 17 00:00:00 2001 From: UselessBullets <80850784+UselessBullets@users.noreply.github.com> Date: Sun, 24 Mar 2024 00:36:50 -0500 Subject: [PATCH 3/7] Removed redundant accessor --- .../turniplabs/halplibe/helper/EntityHelper.java | 4 ++-- .../mixin/accessors/EntityListAccessor.java | 14 -------------- 2 files changed, 2 insertions(+), 16 deletions(-) delete mode 100644 src/main/java/turniplabs/halplibe/mixin/accessors/EntityListAccessor.java diff --git a/src/main/java/turniplabs/halplibe/helper/EntityHelper.java b/src/main/java/turniplabs/halplibe/helper/EntityHelper.java index 46b5c1b..3aab130 100644 --- a/src/main/java/turniplabs/halplibe/helper/EntityHelper.java +++ b/src/main/java/turniplabs/halplibe/helper/EntityHelper.java @@ -6,7 +6,7 @@ import net.minecraft.client.render.tileentity.TileEntityRenderer; import net.minecraft.core.block.entity.TileEntity; import net.minecraft.core.entity.Entity; -import turniplabs.halplibe.mixin.accessors.EntityListAccessor; +import net.minecraft.core.entity.EntityDispatcher; import turniplabs.halplibe.mixin.accessors.RenderManagerAccessor; import turniplabs.halplibe.mixin.accessors.TileEntityAccessor; import turniplabs.halplibe.mixin.accessors.TileEntityRendererAccessor; @@ -44,7 +44,7 @@ public static void createSpecialTileEntity(Class clazz, Ti */ public static class Core { public static void createEntity(Class clazz, int id, String name) { - EntityListAccessor.callAddMapping(clazz, name, id); + EntityDispatcher.addMapping(clazz, name, id); } public static void createTileEntity(Class clazz, String name) { TileEntityAccessor.callAddMapping(clazz, name); diff --git a/src/main/java/turniplabs/halplibe/mixin/accessors/EntityListAccessor.java b/src/main/java/turniplabs/halplibe/mixin/accessors/EntityListAccessor.java deleted file mode 100644 index 0c6fb6d..0000000 --- a/src/main/java/turniplabs/halplibe/mixin/accessors/EntityListAccessor.java +++ /dev/null @@ -1,14 +0,0 @@ -package turniplabs.halplibe.mixin.accessors; - -import net.minecraft.core.entity.Entity; -import net.minecraft.core.entity.EntityDispatcher; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.gen.Invoker; - -@Mixin(value = EntityDispatcher.class, remap = false) -public interface EntityListAccessor { - @Invoker("addMapping") - static void callAddMapping(Class clazz, String name, int id) { - throw new AssertionError(); - } -} From 1c0844c332a6d978191dcb534576659047db86cb Mon Sep 17 00:00:00 2001 From: UselessBullets <80850784+UselessBullets@users.noreply.github.com> Date: Sun, 24 Mar 2024 00:38:26 -0500 Subject: [PATCH 4/7] Update gradle.properties --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index ec898a8..9bc2fb6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,7 +7,7 @@ bta_version=7.1-pre2a loader_version=0.15.6-babric.4-bta # Mod -mod_version=3.4.16 +mod_version=3.4.17 mod_group=turniplabs mod_name=halplibe From 9e7ea8d68511176af5914e2a17c7853ef549e7b5 Mon Sep 17 00:00:00 2001 From: UselessBullets <80850784+UselessBullets@users.noreply.github.com> Date: Sun, 24 Mar 2024 00:40:48 -0500 Subject: [PATCH 5/7] Update halplibe.mixins.json --- src/main/resources/halplibe.mixins.json | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/resources/halplibe.mixins.json b/src/main/resources/halplibe.mixins.json index 1b218b9..6c24e3a 100644 --- a/src/main/resources/halplibe.mixins.json +++ b/src/main/resources/halplibe.mixins.json @@ -7,7 +7,6 @@ "accessors.BlockFireAccessor", "accessors.EntityFireflyFXAccessor", "accessors.EntityFXAccessor", - "accessors.EntityListAccessor", "accessors.LanguageAccessor", "accessors.RecipeSymbolAccessor", "accessors.TileEntityAccessor", From 2d37f225489ea22ba5f872b6f00a79d6745283a8 Mon Sep 17 00:00:00 2001 From: oly <33404595+Olypolyu@users.noreply.github.com> Date: Sun, 24 Mar 2024 21:36:27 -0300 Subject: [PATCH 6/7] fix broken imports. blockSound has been moved to client on pre2a. --- src/main/java/turniplabs/halplibe/helper/BlockBuilder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/turniplabs/halplibe/helper/BlockBuilder.java b/src/main/java/turniplabs/halplibe/helper/BlockBuilder.java index b128dcb..a2377f5 100644 --- a/src/main/java/turniplabs/halplibe/helper/BlockBuilder.java +++ b/src/main/java/turniplabs/halplibe/helper/BlockBuilder.java @@ -1,5 +1,7 @@ package turniplabs.halplibe.helper; +import net.minecraft.client.sound.BlockSound; +import net.minecraft.client.sound.BlockSoundDispatcher; import net.minecraft.client.render.block.color.BlockColor; import net.minecraft.client.render.block.color.BlockColorDispatcher; import net.minecraft.client.render.block.model.BlockModel; @@ -10,8 +12,6 @@ import net.minecraft.core.data.tag.Tag; import net.minecraft.core.item.Item; import net.minecraft.core.item.block.ItemBlock; -import net.minecraft.core.sound.BlockSound; -import net.minecraft.core.sound.BlockSoundDispatcher; import net.minecraft.core.util.helper.Side; import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; From 997478a8b53584f12e13a484435649b02e4d299c Mon Sep 17 00:00:00 2001 From: Oly Date: Sun, 24 Mar 2024 21:47:16 -0300 Subject: [PATCH 7/7] Revert "fix broken imports." This reverts commit 2d37f225489ea22ba5f872b6f00a79d6745283a8. --- src/main/java/turniplabs/halplibe/helper/BlockBuilder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/turniplabs/halplibe/helper/BlockBuilder.java b/src/main/java/turniplabs/halplibe/helper/BlockBuilder.java index a2377f5..b128dcb 100644 --- a/src/main/java/turniplabs/halplibe/helper/BlockBuilder.java +++ b/src/main/java/turniplabs/halplibe/helper/BlockBuilder.java @@ -1,7 +1,5 @@ package turniplabs.halplibe.helper; -import net.minecraft.client.sound.BlockSound; -import net.minecraft.client.sound.BlockSoundDispatcher; import net.minecraft.client.render.block.color.BlockColor; import net.minecraft.client.render.block.color.BlockColorDispatcher; import net.minecraft.client.render.block.model.BlockModel; @@ -12,6 +10,8 @@ import net.minecraft.core.data.tag.Tag; import net.minecraft.core.item.Item; import net.minecraft.core.item.block.ItemBlock; +import net.minecraft.core.sound.BlockSound; +import net.minecraft.core.sound.BlockSoundDispatcher; import net.minecraft.core.util.helper.Side; import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils;