Skip to content

Commit

Permalink
fixed couple things
Browse files Browse the repository at this point in the history
  • Loading branch information
Globox1997 committed Jul 20, 2024
1 parent a0964ea commit 4cf62cd
Show file tree
Hide file tree
Showing 18 changed files with 87 additions and 7 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
### Added:
-
### Fixed:
-
- Fixed dragon tool durability
- Fixed trident crash
- Fixed dragon items enchanting
### Changed:
- Updated to mc 1.21
-
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx1G
loader_version=0.15.11

# Mod Properties
mod_version = 1.1.4
mod_version = 1.1.5
maven_group = net.dragonloot
archives_base_name = dragonloot

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/dragonloot/config/DragonLootConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class DragonLootConfig implements ConfigData {
@ConfigEntry.Gui.RequiresRestart
public int dragon_armor_durability_multiplier = 37;
@ConfigEntry.Gui.RequiresRestart
public int dragon_item_durability_multiplier = 37;
public int dragon_item_durability = 1961;
@ConfigEntry.Gui.RequiresRestart
public float dragon_item_base_damage = 5F;
@ConfigEntry.Gui.RequiresRestart
Expand Down
8 changes: 7 additions & 1 deletion src/main/java/net/dragonloot/entity/DragonTridentEntity.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,14 @@ public DragonTridentEntity(World world, LivingEntity owner, ItemStack stack) {
super(EntityInit.DRAGON_TRIDENT_ENTITY, owner, world, stack, null);
this.dataTracker.set(LOYALTY, this.getLoyalty(stack));
this.dataTracker.set(ENCHANTED, stack.hasGlint());
this.tridentStack = stack;
}

public DragonTridentEntity(World world, double x, double y, double z, ItemStack stack) {
super(EntityInit.DRAGON_TRIDENT_ENTITY, x, y, z, world, stack, stack);
this.dataTracker.set(LOYALTY, this.getLoyalty(stack));
this.dataTracker.set(ENCHANTED, stack.hasGlint());
this.tridentStack = stack;
}

@Override
Expand Down Expand Up @@ -104,12 +106,16 @@ private boolean isOwnerAlive() {

@Override
protected ItemStack asItemStack() {
if (this.tridentStack == null || this.tridentStack.isEmpty()) {
System.out.println("TEST");
this.tridentStack = new ItemStack(ItemInit.DRAGON_TRIDENT);
}
return this.tridentStack.copy();
}

@Environment(EnvType.CLIENT)
public boolean isEnchanted() {
return (Boolean) this.dataTracker.get(ENCHANTED);
return this.dataTracker.get(ENCHANTED);
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/dragonloot/item/DragonToolMaterials.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

public class DragonToolMaterials implements ToolMaterial {

public static final ToolMaterial DRAGON = new DragonToolMaterials(BlockTags.INCORRECT_FOR_WOODEN_TOOL, ConfigInit.CONFIG.dragon_item_durability_multiplier, ConfigInit.CONFIG.dragon_item_mining_speed_multiplier, ConfigInit.CONFIG.dragon_item_base_damage, ConfigInit.CONFIG.dragon_tool_enchantability, Ingredient.ofItems(ItemInit.DRAGON_SCALE), "dragon");
public static final ToolMaterial DRAGON = new DragonToolMaterials(BlockTags.INCORRECT_FOR_NETHERITE_TOOL, ConfigInit.CONFIG.dragon_item_durability, ConfigInit.CONFIG.dragon_item_mining_speed_multiplier, ConfigInit.CONFIG.dragon_item_base_damage, ConfigInit.CONFIG.dragon_tool_enchantability, Ingredient.ofItems(ItemInit.DRAGON_SCALE), "dragon");

private final TagKey<Block> inverseTag;
private final int itemDurability;
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/assets/dragonloot/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"text.autoconfig.dragonloot.option.dragon_armor_protection_leggings": "Dragon Armor Leggings Protection",
"text.autoconfig.dragonloot.option.dragon_armor_protection_boots": "Dragon Armor Boots Protection",
"text.autoconfig.dragonloot.option.dragon_armor_durability_multiplier": "Dragon Armor Durability Multiplier",
"text.autoconfig.dragonloot.option.dragon_item_durability_multiplier": "Dragon Item Durability Multiplier",
"text.autoconfig.dragonloot.option.dragon_item_durability": "Dragon Item Durability",
"text.autoconfig.dragonloot.option.dragon_item_base_damage": "Dragon Item Base Damage",
"text.autoconfig.dragonloot.option.dragon_anvil_no_cap": "Dragon Anvil No Cap",
"text.autoconfig.dragonloot.option.dragon_armor_toughness": "Dragon Armor Toughness",
Expand Down
6 changes: 6 additions & 0 deletions src/main/resources/data/minecraft/tags/item/axes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"dragonloot:dragon_axe"
]
}
6 changes: 6 additions & 0 deletions src/main/resources/data/minecraft/tags/item/chest_armor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"dragonloot:dragon_chestplate"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"dragonloot:dragon_bow"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"dragonloot:dragon_crossbow"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"dragonloot:dragon_trident"
]
}
6 changes: 6 additions & 0 deletions src/main/resources/data/minecraft/tags/item/foot_armor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"dragonloot:dragon_boots"
]
}
6 changes: 6 additions & 0 deletions src/main/resources/data/minecraft/tags/item/head_armor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"dragonloot:dragon_helmet"
]
}
6 changes: 6 additions & 0 deletions src/main/resources/data/minecraft/tags/item/hoes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"dragonloot:dragon_hoe"
]
}
6 changes: 6 additions & 0 deletions src/main/resources/data/minecraft/tags/item/leg_armor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"dragonloot:dragon_leggings"
]
}
6 changes: 6 additions & 0 deletions src/main/resources/data/minecraft/tags/item/pickaxes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"dragonloot:dragon_pickaxe"
]
}
6 changes: 6 additions & 0 deletions src/main/resources/data/minecraft/tags/item/shovels.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"dragonloot:dragon_shovel"
]
}
6 changes: 6 additions & 0 deletions src/main/resources/data/minecraft/tags/item/swords.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"dragonloot:dragon_sword"
]
}

0 comments on commit 4cf62cd

Please sign in to comment.