From 35b33251efde19040c18e8a69b5dd72306b48807 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 24 Nov 2022 14:55:15 +0100 Subject: [PATCH 1/2] Solved allomantic jump on nuggets --- README.md | 2 +- build.gradle | 2 +- .../powers/client/PowersClientEventHandler.java | 10 ++++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d7a25d49..54204c44 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Metallics Arts 1.19.2-1.3.2 +# Metallics Arts 1.19.2-1.3.3 ## Index 📋 diff --git a/build.gradle b/build.gradle index ba11386c..dd6e67c5 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ plugins { } -version = '1.19.2-1.3.2' +version = '1.19.2-1.3.3' group = 'net.rudahee.metallics_arts' // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = 'metallics_arts' diff --git a/src/main/java/net/rudahee/metallics_arts/modules/powers/client/PowersClientEventHandler.java b/src/main/java/net/rudahee/metallics_arts/modules/powers/client/PowersClientEventHandler.java index 55e86523..886fd8aa 100644 --- a/src/main/java/net/rudahee/metallics_arts/modules/powers/client/PowersClientEventHandler.java +++ b/src/main/java/net/rudahee/metallics_arts/modules/powers/client/PowersClientEventHandler.java @@ -56,6 +56,7 @@ public class PowersClientEventHandler { private final Set nearby_allomancers = new HashSet<>(); private final Set metal_blobs = new HashSet<>(); private int tickOffset = 0; + boolean count = true; BlockPos otherPlayerDeathPos = null; @@ -241,12 +242,13 @@ public void onClientTick(final TickEvent.ClientTickEvent event) { } } - if (!player.level.getBlockState(blockPos).is(Blocks.AIR) && controlTick == 0) { + if (!player.level.getBlockState(blockPos).is(Blocks.AIR)) { // IF ITS A BLOCK BlockPos blockPosition = blockPos; int slot = IronAndSteelHelpers.haveNuggets(player); + if (IronAndSteelHelpers.isBlockStateMetal(this.mc.level.getBlockState(blockPosition))) { ModNetwork.sendToServer(new PullAndPushBlockPacket(blockPosition, Math.round(IronAndSteelHelpers.PUSH * IronAndSteelHelpers.getMultiplier(player,playerCapability.getEnhanced(), @@ -254,13 +256,13 @@ public void onClientTick(final TickEvent.ClientTickEvent event) { } else if (slot != -1) { //player.getInventory().removeItem(slot, 1); - ModNetwork.sendToServer(new RemoveNuggetPacket(slot, player)); ModNetwork.sendToServer(new PullAndPushNuggetPacket(blockPosition, Math.round(IronAndSteelHelpers.PUSH * IronAndSteelHelpers.getMultiplier(player,playerCapability.getEnhanced(), playerCapability.isBurning(MetalsNBTData.LERASIUM))))); - if (controlTick == 0 ){ - controlTick = 10; + if (controlTick == 0 ){ + ModNetwork.sendToServer(new RemoveNuggetPacket(slot, player)); + controlTick = 18; } } } From 932712098732e0607130f543d1f8e0e48b072005 Mon Sep 17 00:00:00 2001 From: Tobias Burger Date: Thu, 24 Nov 2022 11:32:26 -0300 Subject: [PATCH 2/2] fixed: Beacons its not working with our custom metals. --- README.md | 6 ++--- .../data/network/RemoveNuggetPacket.java | 1 - ...nnerTag.java => ModBannerTagProvider.java} | 4 +-- .../data/providers/ModBeaconTagProvider.java | 26 +++++++++++++++++++ .../metallics_arts/setup/DataGenerators.java | 3 ++- 5 files changed, 33 insertions(+), 7 deletions(-) rename src/main/java/net/rudahee/metallics_arts/data/providers/{BannerTag.java => ModBannerTagProvider.java} (84%) create mode 100644 src/main/java/net/rudahee/metallics_arts/data/providers/ModBeaconTagProvider.java diff --git a/README.md b/README.md index 54204c44..bc469a4b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Metallics Arts 1.19.2-1.3.3 +# Metallics Arts 1.19.2-1.3.4 ## Index 📋 @@ -92,8 +92,8 @@ CurseForge page: - ~~Vials GUI, its not drawing correctly how much metal you have.~~ [v1.3.1] - ~~Bug with ctrl+space steel flying, nuggets drops doesnt sinchronyze with server~~[v1.3.2] - ~~Bendalloy do weird things in server~~[v1.3.2] -- Bronze allomantic is not drawing lines in multiplayer. -- Beacons its not working with our custom metals. +- ~~Bronze allomantic is not drawing lines in multiplayer.~~ [v1.3.2] +- ~~Beacons its not working with our custom metals.~~ [v1.3.4] - Names consistency are bad. **Improvements** diff --git a/src/main/java/net/rudahee/metallics_arts/data/network/RemoveNuggetPacket.java b/src/main/java/net/rudahee/metallics_arts/data/network/RemoveNuggetPacket.java index 4da9975b..aafc830c 100644 --- a/src/main/java/net/rudahee/metallics_arts/data/network/RemoveNuggetPacket.java +++ b/src/main/java/net/rudahee/metallics_arts/data/network/RemoveNuggetPacket.java @@ -25,7 +25,6 @@ public class RemoveNuggetPacket { public RemoveNuggetPacket(int slot, Player player) { this.uuid = player.getUUID(); this.slot = slot; - } private RemoveNuggetPacket(UUID uuid, int slot) { diff --git a/src/main/java/net/rudahee/metallics_arts/data/providers/BannerTag.java b/src/main/java/net/rudahee/metallics_arts/data/providers/ModBannerTagProvider.java similarity index 84% rename from src/main/java/net/rudahee/metallics_arts/data/providers/BannerTag.java rename to src/main/java/net/rudahee/metallics_arts/data/providers/ModBannerTagProvider.java index 7d7cc15d..1affd75b 100644 --- a/src/main/java/net/rudahee/metallics_arts/data/providers/BannerTag.java +++ b/src/main/java/net/rudahee/metallics_arts/data/providers/ModBannerTagProvider.java @@ -8,9 +8,9 @@ import net.rudahee.metallics_arts.modules.items.banners.Banners; import net.rudahee.metallics_arts.setup.enums.extras.MetalsNBTData; -public class BannerTag extends TagsProvider { +public class ModBannerTagProvider extends TagsProvider { - public BannerTag(DataGenerator pGenerator, net.minecraftforge.common.data.ExistingFileHelper existingFileHelper) { + public ModBannerTagProvider(DataGenerator pGenerator, net.minecraftforge.common.data.ExistingFileHelper existingFileHelper) { super(pGenerator, Registry.BANNER_PATTERN, MetallicsArts.MOD_ID, existingFileHelper); } diff --git a/src/main/java/net/rudahee/metallics_arts/data/providers/ModBeaconTagProvider.java b/src/main/java/net/rudahee/metallics_arts/data/providers/ModBeaconTagProvider.java new file mode 100644 index 00000000..12170d87 --- /dev/null +++ b/src/main/java/net/rudahee/metallics_arts/data/providers/ModBeaconTagProvider.java @@ -0,0 +1,26 @@ +package net.rudahee.metallics_arts.data.providers; + +import net.minecraft.core.Registry; +import net.minecraft.data.DataGenerator; +import net.minecraft.data.tags.TagsProvider; +import net.minecraft.tags.BlockTags; +import net.minecraft.world.level.block.Block; +import net.rudahee.metallics_arts.MetallicsArts; +import net.rudahee.metallics_arts.setup.registries.ModBlock; + +public class ModBeaconTagProvider extends TagsProvider { + public ModBeaconTagProvider(DataGenerator gen, net.minecraftforge.common.data.ExistingFileHelper existingFileHelper) { + super(gen,Registry.BLOCK,MetallicsArts.MOD_ID,existingFileHelper); + } + + @Override + protected void addTags() { + for (Block block: ModBlock.BLOCK_METAL_BLOCKS.values()) { + this.tag(BlockTags.BEACON_BASE_BLOCKS).add(block); + } + for (Block block: ModBlock.BLOCK_GEMS_BLOCKS.values()) { + this.tag(BlockTags.BEACON_BASE_BLOCKS).add(block); + } + + } +} diff --git a/src/main/java/net/rudahee/metallics_arts/setup/DataGenerators.java b/src/main/java/net/rudahee/metallics_arts/setup/DataGenerators.java index f579db40..a54ef1dc 100644 --- a/src/main/java/net/rudahee/metallics_arts/setup/DataGenerators.java +++ b/src/main/java/net/rudahee/metallics_arts/setup/DataGenerators.java @@ -22,6 +22,7 @@ public static void gatherData (GatherDataEvent event){ gen.addProvider(true, new ModBlockTagsProvider(gen, MetallicsArts.MOD_ID, event.getExistingFileHelper())); gen.addProvider(true, new ModLootTableProvider(gen)); gen.addProvider(true, new ModRecipeProvider(gen)); - gen.addProvider(event.includeServer(), new BannerTag(gen, event.getExistingFileHelper())); + gen.addProvider(event.includeServer(), new ModBannerTagProvider(gen, event.getExistingFileHelper())); + gen.addProvider(true,new ModBeaconTagProvider(gen,event.getExistingFileHelper())); } }