Skip to content

Commit

Permalink
Partial backport from 1.20.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Mechalopa committed Nov 19, 2023
1 parent 86f69f5 commit 4d713df
Show file tree
Hide file tree
Showing 19 changed files with 92 additions and 88 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ else if (ModConfigs.cachedServer.SAVAGEFANG_SPAWN_WEIGHT_IN_JUNGLE > 0

if (ModConfigs.cachedServer.MELTY_MONSTER_SPAWN_WEIGHT > 0)
{
event.getSpawns().getSpawner(MobCategory.MONSTER).add(new SpawnerData(ModEntityTypes.MELTY_MONSTER.get(), ModConfigs.cachedServer.MELTY_MONSTER_SPAWN_WEIGHT, 1, 2));
event.getSpawns().addMobCharge(ModEntityTypes.MELTY_MONSTER.get(), 0.25D, 0.25D);
event.getSpawns().getSpawner(MobCategory.MONSTER).add(new SpawnerData(ModEntityTypes.MELTY_MONSTER.get(), ModConfigs.cachedServer.MELTY_MONSTER_SPAWN_WEIGHT, 1, 3));
event.getSpawns().addMobCharge(ModEntityTypes.MELTY_MONSTER.get(), 0.12D, 0.5D);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ else if (recipe instanceof EnchantmentUpgradeRecipe && !flag1)
{
final int minLevel = eup.getMinLevel();
final int maxLevel = eup.getMaxLevel();
ItemStack stack1 = getEnchantableItemStack(registration, items, enchantment, ModTags.ENCHANTMENT_NOT_UPGRADEABLES);
ItemStack stack1 = getEnchantableItemStack(registration, items, enchantment, ModTags.ENCHANTMENT_NOT_UPGRADABLES);

if (!stack1.isEmpty())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public class ModItems
public static final RegistryObject<Item> REINFORCING_CHAIN = REGISTRY.register("reinforcing_chain", () -> new EnchantmentUpgradeItem(new Item.Properties().tab(HMaG.MODTAB), new EnchantmentUpgradeItem.Properties().enchantment(Enchantments.UNBREAKING, 0, 2)));
public static final RegistryObject<Item> MULTIPLEX_REINFORCING_CHAIN = REGISTRY.register("multiplex_reinforcing_chain", () -> new EnchantmentUpgradeItem(new Item.Properties().tab(HMaG.MODTAB).rarity(Rarity.UNCOMMON), new ModItem.Properties().foil(), new EnchantmentUpgradeItem.Properties().enchantment(Enchantments.UNBREAKING, 3, 9)));
public static final RegistryObject<Item> REPULSION_GADGET = REGISTRY.register("repulsion_gadget", () -> new EnchantmentUpgradeItem(new Item.Properties().tab(HMaG.MODTAB), new EnchantmentUpgradeItem.Properties().enchantment(Enchantments.KNOCKBACK, 0, 9).enchantment(Enchantments.PUNCH_ARROWS, 0, 9)));
public static final RegistryObject<Item> EVIL_FLAME = REGISTRY.register("evil_flame", () -> new EvilFlameItem(new Item.Properties().tab(HMaG.MODTAB)));
public static final RegistryObject<Item> EVIL_FLAME = REGISTRY.register("evil_flame", () -> new EvilFlameItem(new Item.Properties().tab(HMaG.MODTAB), new ModItem.Properties().burnTime(2000)));
public static final RegistryObject<Item> EVIL_THORN = REGISTRY.register("evil_thorn", () -> new EvilThornItem(new Item.Properties().tab(HMaG.MODTAB)));
public static final RegistryObject<Item> PURIFICATION_CLOTH = REGISTRY.register("purification_cloth", () -> new PurificationClothItem(new Item.Properties().tab(HMaG.MODTAB).stacksTo(16).rarity(Rarity.UNCOMMON)));
public static final RegistryObject<Item> ENDLESS_PEARL = REGISTRY.register("endless_pearl", () -> new EndlessPearlItem(new Item.Properties().tab(HMaG.MODTAB).stacksTo(1).rarity(Rarity.UNCOMMON)));
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/github/mechalopa/hmag/util/ModTags.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class ModTags
public static final TagKey<Item> CRIMSON_BOW_REPAIR_ITEMS = createItemTag("crimson_bow_repair_items");
public static final TagKey<Item> CURSE_REMOVE_ITEMS = createItemTag("curse_remove_items");
public static final TagKey<Item> CURSE_UNREMOVABLES = createItemTag("curse_unremovables");
public static final TagKey<Item> ENCHANTMENT_NOT_UPGRADEABLES = createItemTag("enchantment_not_upgradeables");
public static final TagKey<Item> ENCHANTMENT_NOT_UPGRADABLES = createItemTag("enchantment_not_upgradables");
public static final TagKey<Item> ENCHANTMENT_UPGRADE_ITEMS = createItemTag("enchantment_upgrade_items");
public static final TagKey<Item> FORTRESS_SHIELD_REPAIR_ITEMS = createItemTag("fortress_shield_repair_items");
public static final TagKey<Item> GLARYAD_TEMPT_ITEMS = createItemTag("glaryad_tempt_items");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ protected void defineSynchedData()
protected void registerGoals()
{
this.goalSelector.addGoal(0, new FloatGoal(this));
this.goalSelector.addGoal(4, new AbstractFlyingMonsterEntity.ChargeAttackGoal());
this.goalSelector.addGoal(4, new AbstractFlyingMonsterEntity.ChargeAttackGoal(0.325F, 1.75F));
this.goalSelector.addGoal(8, new AbstractFlyingMonsterEntity.MoveRandomGoal());
this.goalSelector.addGoal(9, new LookAtPlayerGoal(this, Player.class, 3.0F, 1.0F));
this.goalSelector.addGoal(10, new LookAtPlayerGoal(this, Mob.class, 8.0F));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

public class EvilFlameItem extends EnchantmentUpgradeItem
{
public EvilFlameItem(Item.Properties builder)
public EvilFlameItem(Item.Properties builder, ModItem.Properties builder2)
{
super(builder, new EnchantmentUpgradeItem.Properties().enchantment(Enchantments.FIRE_ASPECT, 0, 1).enchantment(Enchantments.FLAMING_ARROWS, 0, 0));
super(builder, builder2, new EnchantmentUpgradeItem.Properties().enchantment(Enchantments.FIRE_ASPECT, 0, 1).enchantment(Enchantments.FLAMING_ARROWS, 0, 0));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class EvilThornItem extends EnchantmentUpgradeItem
{
public EvilThornItem(Item.Properties builder)
{
super(builder, new EnchantmentUpgradeItem.Properties().enchantment(Enchantments.THORNS, 0, 9));
super(builder, new EnchantmentUpgradeItem.Properties().enchantment(Enchantments.THORNS, 0, 6));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public boolean matches(Container inv, Level level)
ItemStack stack = inv.getItem(0);
ItemStack stack1 = inv.getItem(1);

if (!stack.isEmpty() && !(stack.getItem() == null || stack.getItem() == Items.ENCHANTED_BOOK) && !stack1.isEmpty() && stack1.getItem() != null && stack1.getItem() instanceof EnchantmentUpgradeItem && stack1.is(ModTags.ENCHANTMENT_UPGRADE_ITEMS) && !stack.is(ModTags.ENCHANTMENT_NOT_UPGRADEABLES))
if (!stack.isEmpty() && !(stack.getItem() == null || stack.getItem() == Items.ENCHANTED_BOOK) && !stack1.isEmpty() && stack1.getItem() != null && stack1.getItem() instanceof EnchantmentUpgradeItem && stack1.is(ModTags.ENCHANTMENT_UPGRADE_ITEMS) && !stack.is(ModTags.ENCHANTMENT_NOT_UPGRADABLES))
{
final List<EnchantmentUpgradeProp> eups = ((EnchantmentUpgradeItem)stack1.getItem()).getEnchantmentUpgradeProps();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class AdditionalEntityLootModifier extends LootModifier
public AdditionalEntityLootModifier(LootItemCondition[] conditionsIn, LootItemFunction[] functions, Item addition)
{
super(conditionsIn);
this.functions = functions;
this.functions = functions;
this.addition = addition;
}

Expand Down
Binary file modified src/main/resources/assets/hmag/textures/item/evil_flame.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/main/resources/assets/hmag/textures/item/soul_powder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"replace": false,
"values": [
"hmag:lemon",
"hmag:cureberry",
"hmag:randomberry",
"hmag:exp_berry"
]
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "hmag:heart_of_the_sea_block"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "hmag:heart_of_the_sea_block"
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "hmag:nether_star_block"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "hmag:nether_star_block"
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "hmag:reinforced_block"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "hmag:reinforced_block"
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "hmag:reinforced_glass"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "hmag:reinforced_glass"
}
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@
"type": "minecraft:item",
"name": "hmag:tinted_reinforced_glass"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
Expand Down
20 changes: 20 additions & 0 deletions src/main/resources/data/hmag/tags/entity_types/creepers.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,26 @@
{
"id": "enderzoology:concussion_creeper",
"required": false
},
{
"id": "creepycreepers:ghostly_creeper",
"required": false
},
{
"id": "creepycreepers:snowy_creeper",
"required": false
},
{
"id": "creepycreepers:halloween_creeper",
"required": false
},
{
"id": "creepycreepers:tuff_creeper",
"required": false
},
{
"id": "creepycreepers:corrupted_creeper",
"required": false
}
]
}

0 comments on commit 4d713df

Please sign in to comment.