Skip to content

Commit a1d1646

Browse files
committed
Fixed #3, changed namespace to match Fabric
1 parent 1e4f955 commit a1d1646

File tree

76 files changed

+743
-730
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+743
-730
lines changed

Diff for: build.gradle

+5-2
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ repositories {
100100
}
101101

102102
dependencies {
103-
minecraft "net.minecraftforge:forge:${project.forge_version}"
103+
minecraft "net.minecraftforge:forge:${project.mc_version}-${project.forge_version}"
104104

105105
//Dependencies
106106
implementation fg.deobf(group: 'top.theillusivec4.caelus', name: 'caelus-forge', version: "${project.caelus_version}")
@@ -116,7 +116,10 @@ processResources {
116116
inputs.property "version", project.version
117117

118118
filesMatching("META-INF/mods.toml") {
119-
expand "version": project.version
119+
expand 'version': project.version,
120+
'mc_requirements': project.mc_requirements,
121+
'forge_requirements': project.forge_requirements,
122+
'origins_requirements': project.origins_requirements
120123
}
121124
}
122125

Diff for: gradle.properties

+9-6
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,24 @@ org.gradle.jvmargs=-Xmx3G
44
org.gradle.daemon=false
55

66
# Base properties
7-
minecraft_version=1.18.2
8-
forge_version=1.18.2-40.0.52
7+
mc_version=1.18.2
8+
forge_version=40.1.0
99
mappings_channel=parchment
1010
mappings_version=2022.03.13-1.18.2
1111

1212
# Mod Properties
13-
mod_version=1.1.2.1
14-
mod_id=origins_classes
15-
mod_author=LimonBlaze
1613
maven_group=limonblaze.originsclasses
1714
archives_base_name=origins-classes-forge
15+
mod_version=1.1.3
16+
mod_id=origins_classes
17+
mod_author=LimonBlaze
18+
mc_requirements=[1.18.2,1.19)
19+
forge_requirements=[40.0.47,)
20+
origins_requirements=[1.18.2-1.4.1,)
1821

1922
# Dependencies
2023
caelus_version=1.18.1-3.0.0.2
21-
origins_version=3757460
24+
origins_version=3761477
2225

2326
# Compat Dependencies
2427
apotheosis_version=3717791

Diff for: src/main/java/limonblaze/originsclasses/OriginsClasses.java

+8-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import net.minecraft.world.entity.EntityType;
1111
import net.minecraftforge.event.entity.EntityAttributeModificationEvent;
1212
import net.minecraftforge.eventbus.api.IEventBus;
13+
import net.minecraftforge.fml.ModLoadingContext;
1314
import net.minecraftforge.fml.common.Mod;
1415
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
1516
import org.apache.logging.log4j.LogManager;
@@ -18,6 +19,7 @@
1819
@Mod(OriginsClasses.MODID)
1920
public class OriginsClasses {
2021
public static final String MODID = "origins_classes";
22+
public static final String LEGACY_MODID = "origins-classes";
2123
public static final Logger LOGGER = LogManager.getLogger();
2224

2325
public OriginsClasses() {
@@ -32,10 +34,15 @@ public OriginsClasses() {
3234
modBus.addListener(this::attachAttributes);
3335
modBus.addListener(OriginsClassesCommon::setup);
3436
modBus.addListener(OriginsClassesClient::setup);
37+
LOGGER.info("Origins:Classes " + ModLoadingContext.get().getActiveContainer().getModInfo().getVersion() + " has initialized. Time for work!");
3538
}
3639

3740
public static ResourceLocation identifier(String path) {
38-
return new ResourceLocation(OriginsClasses.MODID, path);
41+
return new ResourceLocation(MODID, path);
42+
}
43+
44+
public static ResourceLocation legacyIdentifier(String path) {
45+
return new ResourceLocation(LEGACY_MODID, path);
3946
}
4047

4148
public void attachAttributes(EntityAttributeModificationEvent event) {

Diff for: src/main/java/limonblaze/originsclasses/common/data/tag/OriginsClassesEntityTypeTags.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
public class OriginsClassesEntityTypeTags {
1010

11-
public static final TagKey<EntityType<?>> INFINITE_TRADER = tag(OriginsClasses.identifier("infinite_trader"));
11+
public static final TagKey<EntityType<?>> INFINITE_TRADER = tag(OriginsClasses.legacyIdentifier("infinite_trader"));
1212

1313
private static TagKey<EntityType<?>> tag(ResourceLocation id) {
1414
return TagKey.create(Registry.ENTITY_TYPE_REGISTRY, id);

Diff for: src/main/java/limonblaze/originsclasses/common/data/tag/OriginsClassesItemTags.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
public class OriginsClassesItemTags {
1010

11-
public static final TagKey<Item> MERCHANT_BLACKLIST = tag(OriginsClasses.identifier("merchant_blacklist"));
11+
public static final TagKey<Item> MERCHANT_BLACKLIST = tag(OriginsClasses.legacyIdentifier("merchant_blacklist"));
1212

1313
private static TagKey<Item> tag(ResourceLocation id) {
1414
return TagKey.create(Registry.ITEM_REGISTRY, id);

Diff for: src/main/java/limonblaze/originsclasses/mixin/AbstractCauldronBlockMixin.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public class AbstractCauldronBlockMixin {
3535
ItemStack stack = player.getItemInHand(hand);
3636
if(stack.getItem() instanceof PotionItem &&
3737
!PotionUtils.getPotion(stack).getEffects().isEmpty() &&
38-
NbtUtils.getOriginsClassesData(stack, NbtUtils.POTION_BONUS, NbtType.BYTE).isPresent()) {
38+
NbtUtils.getOriginsClassesData(stack, NbtUtils.POTION_BONUS, NbtType.BYTE).isPresent()) {
3939
int bonus = IPowerContainer.getPowers(player, OriginsClassesPowers.POTION_BONUS.get()).stream()
4040
.filter(cp -> cp.isActive(player)).mapToInt(cp -> cp.getConfiguration().value()).sum();
4141
if(bonus > 0) {

Diff for: src/main/resources/META-INF/mods.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,22 @@ authors="LimonBlaze"
1414
description = "An add-on for the Origins mod which adds classes to the game."
1515

1616
[[dependencies.origins_classes]]
17-
modId = "forge"
17+
modId = "minecraft"
1818
mandatory = true
19-
versionRange = "[40.0.47,)"
19+
versionRange = "${mc_requirements}"
2020
ordering = "NONE"
2121
side = "BOTH"
2222

2323
[[dependencies.origins_classes]]
24-
modId = "minecraft"
24+
modId = "forge"
2525
mandatory = true
26-
versionRange = "[1.18.2,)"
26+
versionRange = "${forge_requirements}"
2727
ordering = "NONE"
2828
side = "BOTH"
2929

3030
[[dependencies.origins_classes]]
3131
modId = "origins"
3232
mandatory = true
33-
versionRange = "[1.18.2-1.4.1,)"
33+
versionRange = "${origins_requirements}"
3434
ordering = "NONE"
3535
side = "BOTH"
+134
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
{
2+
"layer.origins-classes.class.name": "Class",
3+
"layer.origins-classes.class.missing_origin.name": "Missing",
4+
"layer.origins-classes.class.missing_origin.description": "You do not have a class.",
5+
6+
"attribute.origins_classes.mining_speed": "Mining Speed",
7+
"attribute.origins_classes.projectile_strength": "Projectile Strength",
8+
9+
"tooltip.origins_classes.food_bonus": "+%s Nourishment",
10+
"tooltip.origins_classes.potion_bonus": "+%s Quality",
11+
12+
"origin.origins-classes.warrior.name": "Warrior",
13+
"origin.origins-classes.warrior.description": "These honorable fighters favor the sword and shield to take down their foes.",
14+
15+
"origin.origins-classes.archer.name": "Archer",
16+
"origin.origins-classes.archer.description": "One shot, one kill.",
17+
18+
"origin.origins-classes.rogue.name": "Rogue",
19+
"origin.origins-classes.rogue.description": "Usually known to be thieves and robbers, rogues are proficient in ambushes and stealth attacks.",
20+
21+
"origin.origins-classes.beastmaster.name": "Beastmaster",
22+
"origin.origins-classes.beastmaster.description": "Beastmasters are solitary people who prefer the company of animals.",
23+
24+
"origin.origins-classes.blacksmith.name": "Blacksmith",
25+
"origin.origins-classes.blacksmith.description": "Valued friends of anyone, Blacksmiths are able to create better tools, weapons and armor.",
26+
27+
"origin.origins-classes.cleric.name": "Cleric",
28+
"origin.origins-classes.cleric.description": "They have learned how to channel the magic present in the world and use that to their advantage.",
29+
30+
"origin.origins-classes.cook.name": "Cook",
31+
"origin.origins-classes.cook.description": "There is no one better to prepare your food than a Cook.",
32+
33+
"origin.origins-classes.farmer.name": "Farmer",
34+
"origin.origins-classes.farmer.description": "Farmers have been known to provide everyone with food for as long as anyone can remember.",
35+
36+
"origin.origins-classes.merchant.name": "Merchant",
37+
"origin.origins-classes.merchant.description": "Always looking for an additional emerald, Merchants are proficient traders.",
38+
39+
"origin.origins-classes.rancher.name": "Rancher",
40+
"origin.origins-classes.rancher.description": "Making the most of animals, Ranchers are able to gather many useful resources.",
41+
42+
"origin.origins-classes.miner.name": "Miner",
43+
"origin.origins-classes.miner.description": "Miners are the most proficient at digging up the earth's treasures.",
44+
45+
"origin.origins-classes.lumberjack.name": "Lumberjack",
46+
"origin.origins-classes.lumberjack.description": "Trees should watch out when Lumberjacks are around.",
47+
48+
"origin.origins-classes.explorer.name": "Explorer",
49+
"origin.origins-classes.explorer.description": "Explorers find their way through the most difficult terrain easily and discover hidden landmarks.",
50+
51+
"origin.origins-classes.nitwit.name": "Nitwit",
52+
"origin.origins-classes.nitwit.description": "Nitwits aren't really good at anything.",
53+
54+
"power.origins-classes.less_shield_slowdown.name": "Shield Wield",
55+
"power.origins-classes.less_shield_slowdown.description": "You are slowed down less when protecting yourself with a shield.",
56+
57+
"power.origins-classes.sneaky.name": "Sneaky",
58+
"power.origins-classes.sneaky.description": "Your nameplate is never visible through walls, even when you're not sneaking.",
59+
60+
"power.origins-classes.stealth.name": "In the Shadows",
61+
"power.origins-classes.stealth.description": "When you have been sneaking for 5 seconds, you enter Stealth.",
62+
63+
"power.origins-classes.stealth_core.name": "Stealth",
64+
"power.origins-classes.stealth_core.description": "While in stealth, you make less sound and deal extra damage when attacking an enemy from behind. You exit Stealth when you stop sneaking.",
65+
66+
"power.origins-classes.less_bow_slowdown.name": "Agility",
67+
"power.origins-classes.less_bow_slowdown.description": "You can move quicker than others while drawing your bow.",
68+
69+
"power.origins-classes.no_projectile_divergence.name": "Accuracy",
70+
"power.origins-classes.no_projectile_divergence.description": "All of your projectiles have increased accuracy.",
71+
72+
"power.origins-classes.more_attack_damage.name": "Weapon Knowledge",
73+
"power.origins-classes.more_attack_damage.description": "Able to use each weapon to its fullest potential, you deal a bit more damage.",
74+
75+
"power.origins-classes.tamed_animal_boost.name": "Fauna Friends",
76+
"power.origins-classes.tamed_animal_boost.description": "Animals you tame receive a permanent buff to their health and strength.",
77+
78+
"power.origins-classes.tamed_potion_diffusal.name": "Effective Empathy",
79+
"power.origins-classes.tamed_potion_diffusal.description": "Your nearby tamed animals also receive potion effects when you drink a potion.",
80+
81+
"power.origins-classes.more_smoker_xp.name": "Smoking",
82+
"power.origins-classes.more_smoker_xp.description": "You receive more experience from cooking food in a smoker.",
83+
84+
"power.origins-classes.better_crafted_food.name": "Good Meals",
85+
"power.origins-classes.better_crafted_food.description": "Food crafted by you is more saturating.",
86+
87+
"power.origins-classes.potion_bonus.name": "Qualified Potions",
88+
"power.origins-classes.potion_bonus.description": "As a last step in potion brewing, you may strengthen(for instant effects) or extend(for lasting effects) the potion effects with water from a cauldron.",
89+
90+
"power.origins-classes.better_enchanting.name": "Enchantment Mastery",
91+
"power.origins-classes.better_enchanting.description": "You are able achieve higher enchantment levels at an enchantment table.",
92+
93+
"power.origins-classes.quality_equipment.name": "High-Quality Equipment",
94+
"power.origins-classes.quality_equipment.description": "Equipment you create provides small buffs.",
95+
96+
"power.origins-classes.efficient_repairs.name": "Efficient Repairs",
97+
"power.origins-classes.efficient_repairs.description": "Repairing equipment in an anvil costs less material. Repairing by combining equipment restores more durability.",
98+
99+
"power.origins-classes.more_crop_drops.name": "Bountiful Harvest",
100+
"power.origins-classes.more_crop_drops.description": "When harvesting crops, there is a chance that you receive twice the yield.",
101+
102+
"power.origins-classes.better_bone_meal.name": "Fertilizing Techniques",
103+
"power.origins-classes.better_bone_meal.description": "Bone meal is twice as effective in your experienced hands when used on crops and plants.",
104+
105+
"power.origins-classes.twin_breeding.name": "Twin Births",
106+
"power.origins-classes.twin_breeding.description": "Animals bred by you have a chance to produce two babies.",
107+
108+
"power.origins-classes.more_animal_loot.name": "Scavenging",
109+
"power.origins-classes.more_animal_loot.description": "You are able to sometimes receive more material from killing animals.",
110+
111+
"power.origins-classes.trade_availability.name": "Restocking",
112+
"power.origins-classes.trade_availability.description": "Villagers you trade with never run out of resources to trade for you.",
113+
114+
"power.origins-classes.rare_wandering_loot.name": "Charisma",
115+
"power.origins-classes.rare_wandering_loot.description": "You are able to convince wandering traders to offer some of their rarer items to you.",
116+
117+
"power.origins-classes.no_sprint_exhaustion.name": "Fit",
118+
"power.origins-classes.no_sprint_exhaustion.description": "Sprinting doesn't cause you to exhaust.",
119+
120+
"power.origins-classes.explorer_kit.name": "Explorer Kit",
121+
"power.origins-classes.explorer_kit.description": "You start the game with a compass, a clock and nine empty maps.",
122+
123+
"power.origins-classes.no_mining_exhaustion.name": "Experienced Excavator",
124+
"power.origins-classes.no_mining_exhaustion.description": "Breaking blocks doesn't cause you to exhaust.",
125+
126+
"power.origins-classes.more_stone_break_speed.name": "Mining Expert",
127+
"power.origins-classes.more_stone_break_speed.description": "You mine stone material quicker than others.",
128+
129+
"power.origins-classes.tree_felling.name": "Timber!",
130+
"power.origins-classes.tree_felling.description": "You cut down whole trees at once, unless you sneak.",
131+
132+
"power.origins-classes.more_planks_from_logs.name": "Woodcutting",
133+
"power.origins-classes.more_planks_from_logs.description": "You gain two more wooden planks from a single log when crafting."
134+
}

0 commit comments

Comments
 (0)