Skip to content

Commit

Permalink
Update to 1.19.3
Browse files Browse the repository at this point in the history
  • Loading branch information
MightyKnight committed Dec 9, 2022
1 parent dc2968e commit 38e97dd
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 19 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,11 @@ bin/
# fabric

run/
remappedSrc/

# java

hs_err_*.log
replay_*.log
*.hprof
*.jfr
14 changes: 7 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
org.gradle.jvmargs = -Xmx1G

# Fabric properties
minecraft_version = 1.19
yarn_mappings = 1.19+build.4
loader_version = 0.14.10
fabric_version= 0.57.0+1.19
minecraft_version = 1.19.3
yarn_mappings = 1.19.3+build.2
loader_version = 0.14.11
fabric_version= 0.68.1+1.19.3

# Mod properties
mod_version = 1.4.0
mod_version = 1.5.0
maven_group = me.heyzeer0
archives_base_name = ShieldDisruptor

# Other
modmenu_version = 4.0.0
clothconfig_version = 7.0.72
modmenu_version = 5.0.1
clothconfig_version = 9.0.94
6 changes: 3 additions & 3 deletions src/main/java/net/heyzeer0/sd/configs/GeneralConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import me.shedaniel.autoconfig.ConfigData;
import me.shedaniel.autoconfig.annotation.Config;
import net.minecraft.item.Items;
import net.minecraft.util.registry.Registry;
import net.minecraft.registry.Registries;

import java.util.Arrays;
import java.util.List;
Expand All @@ -14,8 +14,8 @@ public class GeneralConfig implements ConfigData {
public boolean isEnabled = true;

public List<String> hiddenItems = Arrays.asList(
Registry.ITEM.getId(Items.SHIELD).toString(),
Registry.ITEM.getId(Items.TOTEM_OF_UNDYING).toString());
Registries.ITEM.getId(Items.SHIELD).toString(),
Registries.ITEM.getId(Items.TOTEM_OF_UNDYING).toString());

// Ignore case and leading/trailing whitespaces when checking if entry is in config
public boolean contains(String s) {
Expand Down
12 changes: 5 additions & 7 deletions src/main/java/net/heyzeer0/sd/mixins/MixinHeldItemRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.entity.LivingEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.tag.ItemTags;
import net.minecraft.tag.TagBuilder;
import net.minecraft.tag.TagEntry;
import net.minecraft.tag.TagKey;
import net.minecraft.registry.Registries;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.registry.tag.TagKey;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
Expand All @@ -37,7 +35,7 @@ private void hideShield(LivingEntity entity, ItemStack stack, ModelTransformatio
if (player != null && player.getOffHandStack() != stack) return;

GeneralConfig config = ModCore.getMain().getGeneralConfig();
String id = Registry.ITEM.getId(stack.getItem()).toString();
String id = Registries.ITEM.getId(stack.getItem()).toString();

// Check if the item is specified in config
if(config.contains(id) || (id.startsWith("minecraft:") && config.contains(id.substring(10)))) {
Expand All @@ -53,7 +51,7 @@ private void hideShield(LivingEntity entity, ItemStack stack, ModelTransformatio
}

TagKey t = TagKey.of(
Registry.ITEM_KEY,
RegistryKeys.ITEM,
new Identifier(
tagKey.split(":")[0].replaceFirst("#", ""),
tagKey.split(":")[1]));
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
],
"depends": {
"fabricloader": ">=0.7.4",
"fabric": "*",
"minecraft": ">=1.16.5",
"fabric-api": "*",
"minecraft": ">=1.19.3",
"cloth-config2": "*"
},
"recommends": {
Expand Down

0 comments on commit 38e97dd

Please sign in to comment.