Skip to content

Commit eaef0d9

Browse files
authored
Merge pull request #123 from soupbag/whats-a-merge-resolution-2
Spawning fixes, added S icon to PC for specials, removed Ruby Rod recipe
2 parents ba66dd5 + 10cd0ae commit eaef0d9

145 files changed

Lines changed: 703 additions & 192 deletions

File tree

Some content is hidden

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

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
# 1.2.2
2+
3+
Additions
4+
- Added Cobblemon 1.7.2 compatibility!
5+
- Added an S icon to PC for Galaxy, Pastel, Shadow, Sketch, and Vintage Pokemon
6+
7+
Changes
8+
- Removed Ruby Rod recipe, Lake Guardian Crystals can be obtained from Cobblemon's fishing treasure loot table
9+
- Changed Legendary Pokemon Wing items to stack at 64
10+
- Shifted most Legendaries to only spawn above ground
11+
12+
Bug Fixes
13+
- Fixed Galarian Articuno/Moltres/Zapdos summoning as Kantoian
14+
- Fixed Mythicals not having 3 guaranteed 31 IVs
15+
- Fixed Arceus/Silvally types not changing
16+
- Fixed Terapagos abilities
17+
- Fixed external transformations on shift right click, eg. mega
18+
- Fixed Legendary item charging overflowing into all in inventory
19+
- Fixed Rotom spawns
20+
- Fixed some Pokemon not appearing as implemented for Pokedex completion
21+
- Fixed Pokemon spawn context to spawnablePositionType
22+
23+
124
# 1.2.1
225

326
Bug Fixes

common/src/main/generated/resources/data/generations_core/advancement/recipes/misc/ruby_rod.json

Lines changed: 0 additions & 32 deletions
This file was deleted.

common/src/main/generated/resources/data/generations_core/recipe/ruby_rod.json

Lines changed: 0 additions & 24 deletions
This file was deleted.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
package generations.gg.generations.core.generationscore.common.client.screen
2+
3+
import com.cobblemon.mod.common.api.gui.blitk
4+
import generations.gg.generations.core.generationscore.common.GenerationsCore
5+
import net.minecraft.client.gui.GuiGraphics
6+
7+
class SpecialAspectIcon(
8+
val x: Number,
9+
val y: Number,
10+
val centeredX: Boolean = false,
11+
val small: Boolean = false,
12+
val opacity: Float = 1F
13+
) {
14+
companion object {
15+
private const val ICON_DIAMETER = 16
16+
private const val SCALE = 1F
17+
private val iconResource = GenerationsCore.id("textures/gui/special_aspect_icon.png")
18+
}
19+
20+
fun render(context: GuiGraphics) {
21+
val diameter = if (small) (ICON_DIAMETER / 2) else ICON_DIAMETER
22+
val offsetX = if (centeredX) (((diameter / 2) * SCALE)) else 0F
23+
24+
blitk(
25+
matrixStack = context.pose(),
26+
texture = iconResource,
27+
x = (x.toFloat() - offsetX) / SCALE,
28+
y = y.toFloat() / SCALE,
29+
height = diameter,
30+
width = diameter,
31+
uOffset = 0F,
32+
textureWidth = diameter,
33+
textureHeight = diameter,
34+
alpha = opacity,
35+
scale = SCALE
36+
)
37+
}
38+
}

common/src/main/java/generations/gg/generations/core/generationscore/common/mixin/client/PcGuiMixin.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
import org.spongepowered.asm.mixin.injection.Inject;
2020
import org.spongepowered.asm.mixin.injection.Redirect;
2121
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
22+
import generations.gg.generations.core.generationscore.common.client.screen.SpecialAspectIcon;
23+
import java.util.Set;
2224

2325
@Mixin(PCGUI.class)
2426
public abstract class PcGuiMixin extends Screen {
@@ -39,6 +41,14 @@ public void renderThings(GuiGraphics context, int mouseX, int mouseY, float delt
3941
var y = (height - BASE_HEIGHT) / 2;
4042

4143
new TeraTypeIcon(x + 6 + 1, y + 27 + 66 - 9 - 1, previewPokemon.getTeraType(), false, true, 1f).render(context);
44+
if (generations$hasSpecialAspect(previewPokemon)) {
45+
new SpecialAspectIcon(x + 62, y + 83, false, true, 1f).render(context);
46+
}
4247
}
4348
}
49+
@Unique
50+
private boolean generations$hasSpecialAspect(Pokemon pokemon) {
51+
Set<String> pokemonAspectsString = pokemon.getAspects();
52+
return pokemonAspectsString.contains("vintage") || pokemonAspectsString.contains("pastel") || pokemonAspectsString.contains("galaxy") || pokemonAspectsString.contains("sketch") || pokemonAspectsString.contains("shadow");
53+
}
4454
}

common/src/main/java/generations/gg/generations/core/generationscore/common/world/item/GenerationsItems.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ object GenerationsItems: ItemPlatformRegistry() {
888888
val DARK_STONE = register("dark_stone", { TaoTrioStoneItem(it.stacksTo(1).durability(100), LegendKeys.ZEKROM) }, LEGENDARY_ITEMS)
889889
val DRAGON_STONE = register("dragon_stone", { TaoTrioStoneItem(it.stacksTo(1).durability(100), LegendKeys.KYUREM) }, LEGENDARY_ITEMS)
890890
val RAINBOW_WING = register("rainbow_wing", { WingItem(it, "rainbow", ElementalTypes.FLYING, LegendKeys.HO_OH) }, LEGENDARY_ITEMS)
891-
val SILVER_WING = register("silver_wing", { WingItem(it.stacksTo(1), "silver", ElementalTypes.FLYING, LegendKeys.LUGIA) }, LEGENDARY_ITEMS)
891+
val SILVER_WING = register("silver_wing", { WingItem(it, "silver", ElementalTypes.FLYING, LegendKeys.LUGIA) }, LEGENDARY_ITEMS)
892892
val DARK_SOUL = register("dark_soul", ::ItemWithLangTooltipImpl, LEGENDARY_ITEMS)
893893
val DRAGON_SOUL = register("dragon_soul", ::ItemWithLangTooltipImpl, LEGENDARY_ITEMS)
894894
val MELODY_FLUTE = register("melody_flute", ::MelodyFluteItem, LEGENDARY_ITEMS)
@@ -928,12 +928,12 @@ object GenerationsItems: ItemPlatformRegistry() {
928928
val REGIDRAGO_ORB = register("regidrago_orb", { RegiOrbItem(it, "regidrago") }, LEGENDARY_ITEMS)
929929
val REGIELEKI_ORB = register("regieleki_orb", { RegiOrbItem(it, "regieleki") }, LEGENDARY_ITEMS)
930930
val MAGMA_CRYSTAL = register("magma_crystal", { MagmaCrystal(it.stacksTo(1)) }, LEGENDARY_ITEMS)
931-
val ICY_WING = register("icy_wing", { WingItem(it.stacksTo(1), "icy", ElementalTypes.ICE, LegendKeys.ARTICUNO) }, LEGENDARY_ITEMS)
932-
val ELEGANT_WING = register("elegant_wing", { WingItem(it.stacksTo(1), "elegant", ElementalTypes.PSYCHIC, LegendKeys.GALARIAN_ARTICUNO) }, LEGENDARY_ITEMS)
933-
val STATIC_WING = register("static_wing", { WingItem(it.stacksTo(1), "static", ElementalTypes.ELECTRIC, LegendKeys.ZAPDOS) }, LEGENDARY_ITEMS)
934-
val BELLIGERENT_WING = register("belligerent_wing", { WingItem(it.stacksTo(1), "belligerent", ElementalTypes.FIGHTING, LegendKeys.GALARIAN_ZAPDOS) }, LEGENDARY_ITEMS)
935-
val FIERY_WING = register("fiery_wing", { WingItem(it.stacksTo(1).fireResistant(), "fiery", ElementalTypes.FIRE, LegendKeys.MOLTRES) }, LEGENDARY_ITEMS)
936-
val SINISTER_WING = register("sinister_wing", { WingItem(it.stacksTo(1), "sinister", ElementalTypes.DARK, LegendKeys.GALARIAN_MOLTRES) }, LEGENDARY_ITEMS)
931+
val ICY_WING = register("icy_wing", { WingItem(it, "icy", ElementalTypes.ICE, LegendKeys.ARTICUNO) }, LEGENDARY_ITEMS)
932+
val ELEGANT_WING = register("elegant_wing", { WingItem(it, "elegant", ElementalTypes.PSYCHIC, LegendKeys.GALARIAN_ARTICUNO) }, LEGENDARY_ITEMS)
933+
val STATIC_WING = register("static_wing", { WingItem(it, "static", ElementalTypes.ELECTRIC, LegendKeys.ZAPDOS) }, LEGENDARY_ITEMS)
934+
val BELLIGERENT_WING = register("belligerent_wing", { WingItem(it, "belligerent", ElementalTypes.FIGHTING, LegendKeys.GALARIAN_ZAPDOS) }, LEGENDARY_ITEMS)
935+
val FIERY_WING = register("fiery_wing", { WingItem(it.fireResistant(), "fiery", ElementalTypes.FIRE, LegendKeys.MOLTRES) }, LEGENDARY_ITEMS)
936+
val SINISTER_WING = register("sinister_wing", { WingItem(it, "sinister", ElementalTypes.DARK, LegendKeys.GALARIAN_MOLTRES) }, LEGENDARY_ITEMS)
937937
val MEW_DNA_FIBER = register("mew_dna_fiber", ::ItemWithLangTooltipImpl, LEGENDARY_ITEMS)
938938
val MEW_FOSSIL = register("mew_fossil", ::ItemWithLangTooltipImpl, LEGENDARY_ITEMS)
939939
val LIGHT_SOUL = register("light_soul", ::ItemWithLangTooltipImpl, LEGENDARY_ITEMS)
457 Bytes
Loading

common/src/main/resources/data/cobblemon/spawn_pool_world/0132_ditto.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"natural"
1111
],
1212
"type": "pokemon",
13-
"context": "grounded",
13+
"spawnablePositionType": "grounded",
1414
"bucket": "ultra-rare",
1515
"level": "4-29",
1616
"weight": 6.0,

common/src/main/resources/data/cobblemon/spawn_pool_world/0151_mew.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@
1010
"natural"
1111
],
1212
"type": "pokemon",
13-
"context": "grounded",
13+
"spawnablePositionType": "grounded",
1414
"bucket": "ultra-rare",
1515
"level": "70-75",
1616
"weight": 2.0,
1717
"condition": {
18+
"minSkyLight": 8,
19+
"maxSkyLight": 15,
1820
"biomes": [
1921
"#cobblemon:is_jungle"
2022
]

common/src/main/resources/data/cobblemon/spawn_pool_world/0265_wurmple.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"natural"
1111
],
1212
"type": "pokemon",
13-
"context": "grounded",
13+
"spawnablePositionType": "grounded",
1414
"bucket": "common",
1515
"level": "5-24",
1616
"weight": 5.0,

0 commit comments

Comments
 (0)