Skip to content

Commit

Permalink
[1.21.1] Add Gunslinger xp to cgm:bullet (#609)
Browse files Browse the repository at this point in the history
* [1.20.1] Add Gunslinger xp to `cgm:bullet`

* [1.21.1] Add #pmmo:gun and associated xp

* _grumble_

* And perks
  • Loading branch information
SomewhatDamaged authored Nov 28, 2024
1 parent 7944259 commit 9e4f6b7
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 3 deletions.
79 changes: 78 additions & 1 deletion src/main/java/harmonised/pmmo/config/PerksConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,84 @@ private static Map<EventType, List<CompoundTag>> generateDefaults() {
bodyList.add(TagBuilder.start().withString("perk", "pmmo:damage_boost").withString(APIUtils.SKILLNAME, "magic")
.withList("applies_to", StringTag.valueOf("ars_nouveau:spell_bow")).build());
bodyList.add(TagBuilder.start().withString("perk", "pmmo:damage_boost").withString(APIUtils.SKILLNAME, "gunslinging")
.withList("applies_to", StringTag.valueOf("cgm:pistol"),StringTag.valueOf("cgm:shotgun"),StringTag.valueOf("cgm:rifle")).build());
.withList("applies_to",
StringTag.valueOf("cgm:*"),
StringTag.valueOf("scguns:arc_worker"),
StringTag.valueOf("scguns:astella"),
StringTag.valueOf("scguns:auvtomag"),
StringTag.valueOf("scguns:blasphemy"),
StringTag.valueOf("scguns:blunderbuss"),
StringTag.valueOf("scguns:bomb_lance"),
StringTag.valueOf("scguns:boomstick"),
StringTag.valueOf("scguns:brawler"),
StringTag.valueOf("scguns:bruiser"),
StringTag.valueOf("scguns:callwell"),
StringTag.valueOf("scguns:carapice"),
StringTag.valueOf("scguns:cogloader"),
StringTag.valueOf("scguns:combat_shotgun"),
StringTag.valueOf("scguns:cyclone"),
StringTag.valueOf("scguns:dark_matter"),
StringTag.valueOf("scguns:defender_pistol"),
StringTag.valueOf("scguns:dozier_rl"),
StringTag.valueOf("scguns:earths_corpse"),
StringTag.valueOf("scguns:echoes_2"),
StringTag.valueOf("scguns:flintlock_pistol"),
StringTag.valueOf("scguns:floundergat"),
StringTag.valueOf("scguns:freyr"),
StringTag.valueOf("scguns:gale"),
StringTag.valueOf("scguns:gattaler"),
StringTag.valueOf("scguns:gauss_rifle"),
StringTag.valueOf("scguns:greaser_smg"),
StringTag.valueOf("scguns:gyrojet_pistol"),
StringTag.valueOf("scguns:handcannon"),
StringTag.valueOf("scguns:howler"),
StringTag.valueOf("scguns:howler_conversion"),
StringTag.valueOf("scguns:inertial"),
StringTag.valueOf("scguns:iron_javelin"),
StringTag.valueOf("scguns:iron_spear"),
StringTag.valueOf("scguns:jackhammer"),
StringTag.valueOf("scguns:krauser"),
StringTag.valueOf("scguns:laser_musket"),
StringTag.valueOf("scguns:llr_director"),
StringTag.valueOf("scguns:lockewood"),
StringTag.valueOf("scguns:locust"),
StringTag.valueOf("scguns:lone_wonder"),
StringTag.valueOf("scguns:m22_waltz"),
StringTag.valueOf("scguns:m3_carabine"),
StringTag.valueOf("scguns:makeshift_rifle"),
StringTag.valueOf("scguns:marlin"),
StringTag.valueOf("scguns:mas_55"),
StringTag.valueOf("scguns:mk43_rifle"),
StringTag.valueOf("scguns:musket"),
StringTag.valueOf("scguns:newborn_cyst"),
StringTag.valueOf("scguns:osgood_50"),
StringTag.valueOf("scguns:pax"),
StringTag.valueOf("scguns:plasgun"),
StringTag.valueOf("scguns:prush_gun"),
StringTag.valueOf("scguns:pulsar"),
StringTag.valueOf("scguns:rat_king_and_queen"),
StringTag.valueOf("scguns:raygun"),
StringTag.valueOf("scguns:repeating_musket"),
StringTag.valueOf("scguns:rocket_rifle"),
StringTag.valueOf("scguns:rusty_gnat"),
StringTag.valueOf("scguns:saketini"),
StringTag.valueOf("scguns:sawed_off_callwell"),
StringTag.valueOf("scguns:scrapper"),
StringTag.valueOf("scguns:sculk_resonator"),
StringTag.valueOf("scguns:sequoia"),
StringTag.valueOf("scguns:shellurker"),
StringTag.valueOf("scguns:soul_drummer"),
StringTag.valueOf("scguns:spitfire"),
StringTag.valueOf("scguns:super_shotgun"),
StringTag.valueOf("scguns:thunderhead"),
StringTag.valueOf("scguns:umax_pistol"),
StringTag.valueOf("scguns:uppercut"),
StringTag.valueOf("scguns:venturi"),
StringTag.valueOf("scguns:vulcanic_repeater"),
StringTag.valueOf("scguns:waltz_conversion"),
StringTag.valueOf("scguns:whispers"),
StringTag.valueOf("scguns:winnie")
).build());
defaultSettings.put(EventType.DEAL_DAMAGE, new ArrayList<>(bodyList));
return defaultSettings;
}
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/harmonised/pmmo/config/codecs/ServerData.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ public XpGains() {this(0.0, false,
"minecraft:generic_kill", Map.of("combat", 1L),
"minecraft:player_attack", Map.of("combat", 1L),
"#minecraft:is_projectile", Map.of("archery", 1L),
"#pmmo:magic", Map.of("magic", 15L)
"#pmmo:magic", Map.of("magic", 15L),
"#pmmo:gun", Map.of("gunslinging", 1L)
),
EventType.RECEIVE_DAMAGE, Map.of(
"minecraft:generic_kill", Map.of("endurance", 1L),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,8 @@ private enum Category {
Functions.pathPrepend(Reference.SMELTABLES.location(), "items"),
Functions.pathPrepend(Reference.FROM_ENVIRONMENT.location(), "damage_type"),
Functions.pathPrepend(Reference.FROM_IMPACT.location(), "damage_type"),
Functions.pathPrepend(Reference.FROM_MAGIC.location(), "damage_type")),
Functions.pathPrepend(Reference.FROM_MAGIC.location(), "damage_type"),
Functions.pathPrepend(Reference.FROM_GUN.location(), "damage_type")),
(id) -> gson.toJson(TagFile.CODEC.encodeStart(JsonOps.INSTANCE, new TagFile(List.of(), false, List.of())).result().get())),
CONFIGS("config", server -> Arrays.stream(ConfigListener.ServerConfigs.values())
.map(sc -> Reference.rl(sc.filename)).collect(Collectors.toSet()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,8 @@ protected void addTags(Provider provider) {
.addOptional(ResourceLocation.parse("irons_spellbooks:evocation_magic"))
.addOptional(ResourceLocation.parse("irons_spellbooks:eldritch_magic"))
.addOptional(ResourceLocation.parse("irons_spellbooks:nature_magic"));
tag(Reference.FROM_GUN)
.addOptional(ResourceLocation.parse("cgm:bullet"))
.addOptional(ResourceLocation.parse("scguns:bullet"));
}
}
1 change: 1 addition & 0 deletions src/main/java/harmonised/pmmo/util/Reference.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,5 @@ public class Reference {
public static final TagKey<DamageType> FROM_ENVIRONMENT = TagKey.create(Registries.DAMAGE_TYPE, rl("environment"));
public static final TagKey<DamageType> FROM_IMPACT = TagKey.create(Registries.DAMAGE_TYPE, rl("impact"));
public static final TagKey<DamageType> FROM_MAGIC = TagKey.create(Registries.DAMAGE_TYPE, rl("magic"));
public static final TagKey<DamageType> FROM_GUN = TagKey.create(Registries.DAMAGE_TYPE, rl("gun"));
}

0 comments on commit 9e4f6b7

Please sign in to comment.