mirror of
https://gitlab.com/cable-mc/cobblemon.git
synced 2026-10-22 23:26:25 -04:00
Compare commits
184
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
49c22f951d | ||
|
|
a94cbc4eae | ||
|
|
a0e732dc6e | ||
|
|
ea20c2aa4c | ||
|
|
da5272c473 | ||
|
|
a785e574e0 | ||
|
|
4b236b0268 | ||
|
|
1cd86ae5d6 | ||
|
|
b7489a0b14 | ||
|
|
f7554425dc | ||
|
|
858d2e908a | ||
|
|
b61e0b0c82 | ||
|
|
4d9a6e71c9 | ||
|
|
a0010de504 | ||
|
|
cb73a30e23 | ||
|
|
9a7536b068 | ||
|
|
bd973e702e | ||
|
|
ede1851d34 | ||
|
|
cdb8ee0d8e | ||
|
|
e7d86a382c | ||
|
|
eb911df830 | ||
|
|
1c30acc53c | ||
|
|
32b0699235 | ||
|
|
e9c6580230 | ||
|
|
f893eb48fd | ||
|
|
232e2f18bf | ||
|
|
c266c99710 | ||
|
|
2a0e8f6d47 | ||
|
|
e6bd8ec529 | ||
|
|
911a95e873 | ||
|
|
447cfc2ae5 | ||
|
|
8dfeb0d260 | ||
|
|
caa7b19833 | ||
|
|
64dd8ae193 | ||
|
|
156ee6f290 | ||
|
|
fe433d1417 | ||
|
|
0dc662d295 | ||
|
|
081e370bfd | ||
|
|
3ef0567287 | ||
|
|
3cad9e5481 | ||
|
|
dc8b7908be | ||
|
|
85085a1eca | ||
|
|
bff59dee6e | ||
|
|
bb5828531a | ||
|
|
cd08e98c28 | ||
|
|
5083af626c | ||
|
|
137bb37c29 | ||
|
|
eec578b312 | ||
|
|
bf7d40c9b5 | ||
|
|
5abb3d7f97 | ||
|
|
975ad8186a | ||
|
|
26b6419f04 | ||
|
|
331f7ca425 | ||
|
|
71c9ac0ff0 | ||
|
|
1404cc0ab5 | ||
|
|
6ca908a91d | ||
|
|
0948b8da9a | ||
|
|
22e04a53b3 | ||
|
|
df3217b41b | ||
|
|
b6abe9711d | ||
|
|
38c2e0d194 | ||
|
|
69566a97ca | ||
|
|
9ff15a1913 | ||
|
|
89e43945a3 | ||
|
|
bd8dcddf35 | ||
|
|
dd372f3160 | ||
|
|
6866e9af9b | ||
|
|
c56aab28d4 | ||
|
|
e45f2c6261 | ||
|
|
ca58801794 | ||
|
|
38fa5e2628 | ||
|
|
fae1ae7124 | ||
|
|
3ec5f76c73 | ||
|
|
d9bea49567 | ||
|
|
235b753a25 | ||
|
|
3d48432390 | ||
|
|
5bb8aaba55 | ||
|
|
23ba41e981 | ||
|
|
7b03940dab | ||
|
|
29b049452b | ||
|
|
0b0f665804 | ||
|
|
3cdf28ffdd | ||
|
|
5d53fba2ce | ||
|
|
c6fb18ea51 | ||
|
|
2d851cb134 | ||
|
|
8d5d37c750 | ||
|
|
cdb9c80c0e | ||
|
|
a77f035617 | ||
|
|
f685be0aab | ||
|
|
14cc851562 | ||
|
|
7223d1fd68 | ||
|
|
6ab5ad52ec | ||
|
|
079b2ae766 | ||
|
|
34eea827e7 | ||
|
|
06c6ee5a9c | ||
|
|
54748c20ea | ||
|
|
75f52e4cf4 | ||
|
|
55446dd4b1 | ||
|
|
02e63b6fc8 | ||
|
|
3aebcf66ec | ||
|
|
49a5f716b7 | ||
|
|
8b825d558f | ||
|
|
9a7f97f11f | ||
|
|
95b8d62e4a | ||
|
|
0bd7b4dab3 | ||
|
|
8cbada0cf5 | ||
|
|
f0784fec2d | ||
|
|
cfe0c5e0a5 | ||
|
|
4354c3fb03 | ||
|
|
f25a676bd5 | ||
|
|
a9906762a0 | ||
|
|
7b5b88eca2 | ||
|
|
291682ba52 | ||
|
|
546d403b45 | ||
|
|
c9f40e32a1 | ||
|
|
d642b8dd07 | ||
|
|
549a11116e | ||
|
|
b5468a4a4f | ||
|
|
c5d278ccb7 | ||
|
|
bf5e15de45 | ||
|
|
f4af417267 | ||
|
|
69c04acaeb | ||
|
|
83a6bb188f | ||
|
|
494a8b5e91 | ||
|
|
c8021f2f08 | ||
|
|
8cdf3af047 | ||
|
|
c90a24e1ab | ||
|
|
83e3cfc34e | ||
|
|
133dd4e5b7 | ||
|
|
a8cca14b86 | ||
|
|
9b0f356fa4 | ||
|
|
f2b0a102b6 | ||
|
|
a7d01b230a | ||
|
|
2a7db4b9b8 | ||
|
|
77e5f2501d | ||
|
|
e6513717bd | ||
|
|
0e0c98f693 | ||
|
|
528bfa4e22 | ||
|
|
83c87779d7 | ||
|
|
dc33235144 | ||
|
|
935c658c5f | ||
|
|
0426f4fbf9 | ||
|
|
75bc03fdcb | ||
|
|
46e771a062 | ||
|
|
4c0095844b | ||
|
|
10a2ef27d6 | ||
|
|
309ff3da13 | ||
|
|
3af91e2a74 | ||
|
|
2e027e3db7 | ||
|
|
fc40fb02c0 | ||
|
|
2c1c0299f9 | ||
|
|
3c7637515c | ||
|
|
08cbbaf68c | ||
|
|
6e911acf01 | ||
|
|
f6d82a1b28 | ||
|
|
702126aeab | ||
|
|
df566e8fcb | ||
|
|
c83e0f33b5 | ||
|
|
f279f936b6 | ||
|
|
f8e20bafd9 | ||
|
|
a5211ca7ff | ||
|
|
0a5abdb331 | ||
|
|
4ed7413dd2 | ||
|
|
40b66c24fc | ||
|
|
2f7bedf001 | ||
|
|
44c31a9ddb | ||
|
|
20a35de3d8 | ||
|
|
cfc8a15db1 | ||
|
|
d5ba22a86c | ||
|
|
a38505f1c5 | ||
|
|
3cf1ba1fb3 | ||
|
|
9f5d595827 | ||
|
|
75673f0204 | ||
|
|
b43a7571ff | ||
|
|
b071dc04d3 | ||
|
|
12f9ff1647 | ||
|
|
3256a302df | ||
|
|
edbe447477 | ||
|
|
2f43910368 | ||
|
|
c2e87e4cfa | ||
|
|
e40d2ee806 | ||
|
|
ba74e7603b | ||
|
|
19c3fe6dc4 | ||
|
|
d0778dd124 |
@@ -157,6 +157,9 @@ build:
|
||||
paths:
|
||||
- neoforge/build/libs
|
||||
- fabric/build/libs
|
||||
exclude:
|
||||
- neoforge/build/libs/*-dev-shadow.jar
|
||||
- fabric/build/libs/*-dev-shadow.jar
|
||||
|
||||
publish:
|
||||
stage: deploy
|
||||
|
||||
+94
-34
@@ -1,41 +1,101 @@
|
||||
# Changelog
|
||||
## [1.8.1 (September 13th, 2026)](#1-8-1)
|
||||
## [1.8.2 (MONTH xth, 2026)](#1-8-2)
|
||||
|
||||
### Additions
|
||||
- The following items can now be placed on the ground as blocks:
|
||||
- King's Rock, Galarica Cuff, Unremarkable Teacup, Masterpiece Teacup, Chipped Pot, Cracked Pot, Sachet, Metal Powder, Quick Powder, Bright Powder, Icy Rock, Heat Rock, Smooth Rock, Damp Rock, Destiny Knot, Luminous Moss, Never-Melt Ice, Wide Lens, Scope Lens, and Zoom Lens.
|
||||
- Iron Ball, Metal Coat, Throat Spray, HP Up, Protein, Iron, Carbos, Calcium, Zinc, PP Up, PP Max, Upgrade, Dubious Disc, and Loaded Dice.
|
||||
- The following items can now be placed on various surfaces:
|
||||
- Galarica Wreath, Magnet, Flame Orb, Life Orb, Toxic Orb, Light Ball, and Smoke Ball.
|
||||
- The following items can now be placed as blocks and have additional functionality:
|
||||
- Ring Target, Metronome, and Eject Button.
|
||||
- The following items can now be worn by Players and Pokémon:
|
||||
- Galarica Wreath, Cleanse Tag, Spell Tag, Sharp Beak, Covert Cloak, Shell Helmet, and Never-Melt Ice.
|
||||
- Wearable items can now be equipped by a player by holding it and right-clicking (or rebound use/interact)
|
||||
- Wearable items that can be placed down are exempt from this behaviour.
|
||||
|
||||
### Pokémon Added
|
||||
#### Generation 4
|
||||
- Snover
|
||||
- Abomasnow
|
||||
- Burmy
|
||||
- Wormadam
|
||||
- Mothim
|
||||
|
||||
#### Generation 5
|
||||
- Tympole
|
||||
- Palpitoad
|
||||
- Seismitoad
|
||||
|
||||
#### Generation 6
|
||||
- Helioptile
|
||||
- Heliolisk
|
||||
|
||||
#### Generation 7
|
||||
- Grubbin
|
||||
- Charjabug
|
||||
- Vikavolt
|
||||
|
||||
#### Generation 9
|
||||
- Greavard
|
||||
- Houndstone
|
||||
|
||||
### Model updates for the following Pokémon
|
||||
- Cacnea
|
||||
- Cacturne
|
||||
- Binacle
|
||||
- Barbaracle
|
||||
- Glimmet
|
||||
- Glimmora
|
||||
- Deerling
|
||||
- Sawsbuck (All forms)
|
||||
- Absol
|
||||
|
||||
### Animation updates for the following Pokémon
|
||||
- Flapple, Appletun, Dipplin, Hydrapple (placeholder animations only).
|
||||
- Cacnea
|
||||
- Cacturne
|
||||
|
||||
### Changes
|
||||
- Updated various recipes to display in Recipe Groups within the Recipe Book
|
||||
- Updated most recipes to display more logically/consistently within the Recipe Book's categories
|
||||
- Make ride rotations less jittery in multiplayer.
|
||||
- Changes tm shelf discs to use textures instead of tinting and overlays to line up with item display
|
||||
- Blank TM can now be inserted into the Disc Shelf
|
||||
|
||||
### Fixes
|
||||
- Fixed a potential world generation stall caused by Type Gem clusters.
|
||||
- Fixed Pokémon on shoulders not animating if they are visibly holding a held item.
|
||||
- Fixed NPCs getting their own TM progress file.
|
||||
- Fixed odd NeoForge crash due to a dependency being outdated. It will now correctly flag the dependency for being outdated.
|
||||
- Fixed the TM Machine refusing move selections that the `unlockAllMoveDexMovesByDefault` config had made visible, leaving the move slot blank and the craft button unresponsive.
|
||||
- Fixed the Beast Ball not applying its 0.1× penalty to Pokémon that are not Ultra Beasts.
|
||||
- Fixed the Moon Ball reading the world's total elapsed time instead of the time of day, so its bonus applied during the day instead.
|
||||
- Fixed the Love Ball never awarding its 2.5× opposite gender bonus, and matching species by display name instead of identifier.
|
||||
- Fixed the Timer Ball being weaker than a regular Poké Ball on early turns and only reaching 4× on turn 14 instead of turn 10.
|
||||
- Fixed the Luxury Ball only doubling Friendship gains of 1, leaving level up and berry gains unaffected.
|
||||
- Fixed Rufflet, Braviary, and Hisuian Braviary flooding logs with errors about missing sound events.
|
||||
- Fixed Pokémon property typos in Pangoro and Dedenne herd spawn files.
|
||||
- Fixed unintentional watermelon cosmetic for Hisuian Electrode.
|
||||
- Fixed Blastoise having an unintentional passenger seat.
|
||||
- Fixed form typo in Rockruff-Dusk spawn, preventing it from being able to spawn.
|
||||
- Fixed the `stat_compare` and `stat_equal` evolution requirements crashing the game when given `special_attack` or `special_defence`, and made them treat any non-permanent stat as a failed requirement instead of crashing.
|
||||
- Fixed Rowap and Jacoba berries not correctly altering Pokémon sizes when used as bait.
|
||||
- Fixed Ampharos' eyes not emitting particles.
|
||||
- Fixed Alolan Raticate's cry not playing.
|
||||
- Fixed several incorrect light-based spawning conditions for ghosts and bugs.
|
||||
- Removed unused, placeholder habitat pools.
|
||||
- Fixed Mantyke, Mantine, and Quaxly getting stuck in a recoil 'expression' during battles due to having an expression assigned as a recoil animation.
|
||||
- Fixed Lucario's aura particles not emitting.
|
||||
- Fixed Lycanroc's head movement.
|
||||
- Added head movement to Archaludon.
|
||||
- Fixed Duraludon line not having their sleep animations.
|
||||
- Fixed Diglett line not having their faint animations.
|
||||
- Fixed Kingambit moving its legs while walking.
|
||||
- Correctly grants "They're Minerals!" advancement when planting a type gem
|
||||
- Type Gem Blocks now have advancements to give you the recipe in the recipe book (the data for the advancements were inside the recipes somehow??)
|
||||
- Some other recipes without advancements have also been corrected
|
||||
- Corrected the TM Recipes for Charge Beam and Payday
|
||||
- Type Gem blocks now properly generate clusters off of the block.
|
||||
- Starter Screen Categories will no longer stop rendering if they are bigger than the viewport, and you are not viewing top or bottom edges
|
||||
- Random Starter option now properly handled in height calculation, so now it won't run off into other categories or be un-accessible due to scroll limits if it causes a new row
|
||||
- Mochi and Feathers no longer drop glass bottles on use
|
||||
- Fixed a rare set of concurrency bugs related to reloading packs on NeoForge; fixes a ModernFix issue
|
||||
- Removed unnecessary conditions for Mimikyu's standing pose. Hopefully fixes the rare instance of it using its shoulder animations during battle in multiplayer scenarios.
|
||||
- Fixed Rockruff line not blinking
|
||||
- Fixed Flygon sometimes using its running animation instead of walking
|
||||
- Fixed Bramblin always sleeping outside of battle
|
||||
- Fixed Dragonair using its battle idle as a normal idle
|
||||
- Fixed Lycanroc's head movement
|
||||
- Added head movement to Archaludon
|
||||
- Fixed Duraludon line not having any sleep animations
|
||||
- Fixed Diglett line not having their faint animations
|
||||
- Fixed Kingambit moving its legs while walking
|
||||
- Various Structure fixes
|
||||
- Fixed shiny pokemon under certain circumstances forgetting taught TMs
|
||||
|
||||
### Developer
|
||||
- Fixed wrong order of operations in the code flow prior to the `FOSSIL_REVIVED` event causing pokemon to appear without entity link
|
||||
- Fixed TestPartySlot command not correctly comparing the provided spec with the target Pokémon
|
||||
|
||||
### Molang & Datapacks
|
||||
- A new `negate` variant for evolution requirements has been added, which will negate (invert) the provided inner condition.
|
||||
- Added Molang functions for individual Pokédex ids, wherein a subdex is passed in as a string to `dex_caught_count` etc.
|
||||
|
||||
### Particles
|
||||
|
||||
#### New Move Animations
|
||||
|
||||
### Localization
|
||||
- Updated translations for:
|
||||
- Brazilian Portuguese
|
||||
- Simplified Chinese
|
||||
- Japanese
|
||||
- Updated translations for:
|
||||
@@ -0,0 +1,2 @@
|
||||
Spec Doc: https://docs.google.com/document/d/1hEKKrT4JEagJBykx-k9K2BoeNxiMGahUWXnf8YQ85xo/edit?tab=t.0
|
||||
Marshal: dhi_holo
|
||||
@@ -1,9 +0,0 @@
|
||||
- Some kind of particle effect for them? they're meant to have glowing eyes, so maybe some red particles on the eye locator
|
||||
--- global posers? stacked posers?
|
||||
--- red texture seems to be what some people wanted.
|
||||
|
||||
/- shoulder mounts part of it
|
||||
- omni boost
|
||||
- roar when player comes within reach, adjust levels
|
||||
|
||||
- Riding settings to control what the min scale is for a pokemon to be ridable.
|
||||
+5
-2
@@ -1,3 +1,6 @@
|
||||
import utilities.gitBranch
|
||||
import utilities.gitShortCommit
|
||||
|
||||
plugins {
|
||||
id("cobblemon.root-conventions")
|
||||
}
|
||||
@@ -6,6 +9,6 @@ version = "${project.property("mod_version")}+${project.property("mc_version")}"
|
||||
|
||||
val isSnapshot = project.property("snapshot")?.equals("true") == true
|
||||
if (isSnapshot) {
|
||||
val fixedBranchName = versioning.info.branch.substringAfter("/")
|
||||
version = "$version-${fixedBranchName}-${versioning.info.build}"
|
||||
val fixedBranchName = gitBranch().substringAfter("/")
|
||||
version = "$version-${fixedBranchName}-${gitShortCommit()}"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
# Changelog
|
||||
## [1.8.1 (September 13th, 2026)](#1-8-1)
|
||||
|
||||
### Animation updates for the following Pokémon
|
||||
- Flapple, Appletun, Dipplin, Hydrapple (placeholder animations only).
|
||||
|
||||
### Fixes
|
||||
- Fixed a potential world generation stall caused by Type Gem clusters.
|
||||
- Fixed Pokémon on shoulders not animating if they are visibly holding a held item.
|
||||
- Fixed NPCs getting their own TM progress file.
|
||||
- Fixed odd NeoForge crash due to a dependency being outdated. It will now correctly flag the dependency for being outdated.
|
||||
- Fixed the TM Machine refusing move selections that the `unlockAllMoveDexMovesByDefault` config had made visible, leaving the move slot blank and the craft button unresponsive.
|
||||
- Fixed the Beast Ball not applying its 0.1× penalty to Pokémon that are not Ultra Beasts.
|
||||
- Fixed the Moon Ball reading the world's total elapsed time instead of the time of day, so its bonus applied during the day instead.
|
||||
- Fixed the Love Ball never awarding its 2.5× opposite gender bonus, and matching species by display name instead of identifier.
|
||||
- Fixed the Timer Ball being weaker than a regular Poké Ball on early turns and only reaching 4× on turn 14 instead of turn 10.
|
||||
- Fixed the Luxury Ball only doubling Friendship gains of 1, leaving level up and berry gains unaffected.
|
||||
- Fixed Rufflet, Braviary, and Hisuian Braviary flooding logs with errors about missing sound events.
|
||||
- Fixed Pokémon property typos in Pangoro and Dedenne herd spawn files.
|
||||
- Fixed unintentional watermelon cosmetic for Hisuian Electrode.
|
||||
- Fixed Blastoise having an unintentional passenger seat.
|
||||
- Fixed form typo in Rockruff-Dusk spawn, preventing it from being able to spawn.
|
||||
- Fixed the `stat_compare` and `stat_equal` evolution requirements crashing the game when given `special_attack` or `special_defence`, and made them treat any non-permanent stat as a failed requirement instead of crashing.
|
||||
- Fixed Rowap and Jacoba berries not correctly altering Pokémon sizes when used as bait.
|
||||
- Fixed Ampharos' eyes not emitting particles.
|
||||
- Fixed Alolan Raticate's cry not playing.
|
||||
- Fixed several incorrect light-based spawning conditions for ghosts and bugs.
|
||||
- Removed unused, placeholder habitat pools.
|
||||
- Fixed Mantyke, Mantine, and Quaxly getting stuck in a recoil 'expression' during battles due to having an expression assigned as a recoil animation.
|
||||
- Fixed Lucario's aura particles not emitting.
|
||||
- Fixed Lycanroc's head movement.
|
||||
- Added head movement to Archaludon.
|
||||
- Fixed Duraludon line not having their sleep animations.
|
||||
- Fixed Diglett line not having their faint animations.
|
||||
- Fixed Kingambit moving its legs while walking.
|
||||
|
||||
### Localization
|
||||
- Updated translations for:
|
||||
- Brazilian Portuguese
|
||||
- Simplified Chinese
|
||||
- Japanese
|
||||
+15
-6
@@ -1,9 +1,8 @@
|
||||
|
||||
import utilities.isSnapshot
|
||||
import utilities.version
|
||||
import java.time.OffsetDateTime
|
||||
import java.time.ZoneOffset
|
||||
import java.time.format.DateTimeFormatter
|
||||
import utilities.gitBranch
|
||||
import utilities.gitCommit
|
||||
|
||||
/*
|
||||
*
|
||||
@@ -72,6 +71,14 @@ tasks.withType<Test> {
|
||||
}
|
||||
}
|
||||
|
||||
// Git info lives in its own output dir (not processResources) so a new commit only rewrites this one file.
|
||||
val writeGitInfo by tasks.registering(WriteProperties::class) {
|
||||
destinationFile = layout.buildDirectory.file("generated/gitInfo/cobblemon-git.properties")
|
||||
property("commit", gitCommit())
|
||||
property("branch", gitBranch())
|
||||
}
|
||||
sourceSets.main { output.dir(mapOf("builtBy" to writeGitInfo), layout.buildDirectory.dir("generated/gitInfo")) }
|
||||
|
||||
tasks.processResources {
|
||||
exclude("data/**/README.md")
|
||||
}
|
||||
@@ -98,11 +105,13 @@ sourceSets {
|
||||
property("modid", "cobblemon")
|
||||
property("version", project.version())
|
||||
property("isSnapshot", if(rootProject.isSnapshot()) "true" else "false")
|
||||
property("gitCommit", versioning.info.commit)
|
||||
property("branch", versioning.info.branch)
|
||||
System.getProperty("buildNumber")?.let { property("buildNumber", it) }
|
||||
property("timestamp", OffsetDateTime.now(ZoneOffset.UTC).format(DateTimeFormatter.ofPattern("MM/dd/yyyy hh:mm:ss")) + " UTC")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// The platform jars are built from :common:jar, so the remapped common jars are only needed by `publish`
|
||||
tasks.assemble {
|
||||
setDependsOn(dependsOn.filterNot { (it as? TaskProvider<*>)?.name in setOf("remapJar", "remapSourcesJar") })
|
||||
}
|
||||
|
||||
@@ -8,8 +8,12 @@ object CobblemonBuildDetails {
|
||||
const val VERSION = "{{ version }}"
|
||||
const val SNAPSHOT = {{ isSnapshot }}
|
||||
|
||||
const val GIT_COMMIT = "{{ gitCommit | default("Not Specified") }}"
|
||||
const val BRANCH = "{{ branch | default("Not Specified") }}"
|
||||
// Read at runtime rather than templated in, so a new commit doesn't invalidate compiled code.
|
||||
private val git = java.util.Properties().apply {
|
||||
CobblemonBuildDetails::class.java.getResourceAsStream("/cobblemon-git.properties")?.use(::load)
|
||||
}
|
||||
@JvmField val GIT_COMMIT: String = git.getProperty("commit", "Not Specified")
|
||||
@JvmField val BRANCH: String = git.getProperty("branch", "Not Specified")
|
||||
|
||||
fun smallCommitHash(): String {
|
||||
return this.GIT_COMMIT.substring(0, 7)
|
||||
|
||||
@@ -12,10 +12,13 @@ import com.cobblemon.mod.common.api.apricorn.Apricorn
|
||||
import com.cobblemon.mod.common.api.pokemon.stats.Stats
|
||||
import com.cobblemon.mod.common.block.*
|
||||
import com.cobblemon.mod.common.block.LecternBlock
|
||||
import com.cobblemon.mod.common.block.appliances.*
|
||||
import com.cobblemon.mod.common.block.MintBlock.MintType
|
||||
import com.cobblemon.mod.common.block.campfirepot.CampfireBlock
|
||||
import com.cobblemon.mod.common.block.campfirepot.CampfirePotBlock
|
||||
import com.cobblemon.mod.common.block.chest.GildedChestBlock
|
||||
import com.cobblemon.mod.common.block.decor.ActivatableDecorationBlock
|
||||
import com.cobblemon.mod.common.block.decor.RingTargetBlock
|
||||
import com.cobblemon.mod.common.block.general.BaleBlock
|
||||
import com.cobblemon.mod.common.block.general.HorizontalRotationCarpetBlock
|
||||
import com.cobblemon.mod.common.block.general.HorizontalRotationalBlock
|
||||
@@ -26,12 +29,7 @@ import com.cobblemon.mod.common.block.sign.CobblemonSignBlock
|
||||
import com.cobblemon.mod.common.block.sign.CobblemonWallHangingSignBlock
|
||||
import com.cobblemon.mod.common.block.sign.CobblemonWallSignBlock
|
||||
import com.cobblemon.mod.common.block.tmmachine.TMMachineBlock
|
||||
import com.cobblemon.mod.common.mixin.invoker.BlocksInvoker
|
||||
import com.cobblemon.mod.common.mixin.invoker.DoorBlockInvoker
|
||||
import com.cobblemon.mod.common.mixin.invoker.FireBlockInvoker
|
||||
import com.cobblemon.mod.common.mixin.invoker.PressurePlateBlockInvoker
|
||||
import com.cobblemon.mod.common.mixin.invoker.StairsBlockInvoker
|
||||
import com.cobblemon.mod.common.mixin.invoker.TrapdoorBlockInvoker
|
||||
import com.cobblemon.mod.common.mixin.invoker.*
|
||||
import com.cobblemon.mod.common.platform.PlatformRegistry
|
||||
import com.cobblemon.mod.common.util.cobblemonResource
|
||||
import net.minecraft.core.BlockPos
|
||||
@@ -620,6 +618,88 @@ object CobblemonBlocks : PlatformRegistry<Registry<Block>, ResourceKey<Registry<
|
||||
@JvmField
|
||||
val WEAKNESS_POLICY = create("weakness_policy", WallAttachedDirectionalShapeBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_PAPER_LARGE_SOUNDS).mapColor(MapColor.NONE).noOcclusion().noCollission(), 14, 12, 1))
|
||||
|
||||
@JvmField
|
||||
val RING_TARGET = create("ring_target", RingTargetBlock(BlockBehaviour.Properties.of().sound(SoundType.WOOD).mapColor(MapColor.NONE).noOcclusion().strength(0.125f)))
|
||||
@JvmField
|
||||
val MAGNET = create("magnet", MagnetBlock(BlockBehaviour.Properties.of().sound(SoundType.METAL).mapColor(MapColor.NONE).noOcclusion().strength(0.075f)))
|
||||
@JvmField
|
||||
val GALARICA_WREATH = create("galarica_wreath", GalaricaWreathBlock(BlockBehaviour.Properties.of().sound(SoundType.AZALEA_LEAVES).mapColor(MapColor.NONE).noOcclusion().noCollission()))
|
||||
|
||||
@JvmField
|
||||
val FLAME_ORB = create("flame_orb", OrbBlock(BlockBehaviour.Properties.of().sound(SoundType.GLASS).mapColor(MapColor.NONE).noOcclusion().lightLevel{15}))
|
||||
@JvmField
|
||||
val TOXIC_ORB = create("toxic_orb", OrbBlock(BlockBehaviour.Properties.of().sound(SoundType.GLASS).mapColor(MapColor.NONE).noOcclusion()))
|
||||
@JvmField
|
||||
val LIFE_ORB = create("life_orb", OrbBlock(BlockBehaviour.Properties.of().sound(SoundType.GLASS).mapColor(MapColor.NONE).noOcclusion().lightLevel{7}))
|
||||
@JvmField
|
||||
val LIGHT_BALL = create("light_ball", OrbBlock(BlockBehaviour.Properties.of().sound(SoundType.GLASS).mapColor(MapColor.NONE).noOcclusion().lightLevel{13}))
|
||||
@JvmField
|
||||
val SMOKE_BALL = create("smoke_ball", OrbBlock(BlockBehaviour.Properties.of().sound(SoundType.GLASS).mapColor(MapColor.NONE).noOcclusion()))
|
||||
|
||||
@JvmField
|
||||
val KINGS_ROCK = create("kings_rock", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.TUMBLESTONE_BLOCK_SOUNDS).mapColor(MapColor.NONE).noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.CENTERED_6x))
|
||||
|
||||
@JvmField
|
||||
val GALARICA_CUFF = create("galarica_cuff", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.AZALEA_LEAVES).mapColor(MapColor.NONE).noCollission().noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.FLATTENED_10x4))
|
||||
@JvmField
|
||||
val UNREMARKABLE_TEACUP = create("unremarkable_teacup", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.DECORATED_POT).mapColor(MapColor.NONE).noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.TEACUP))
|
||||
@JvmField
|
||||
val MASTERPIECE_TEACUP = create("masterpiece_teacup", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.DECORATED_POT).mapColor(MapColor.NONE).noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.TEACUP))
|
||||
@JvmField
|
||||
val CHIPPED_POT = create("chipped_pot", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.DECORATED_POT).mapColor(MapColor.NONE).noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.TEAPOT))
|
||||
@JvmField
|
||||
val CRACKED_POT = create("cracked_pot", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.DECORATED_POT).mapColor(MapColor.NONE).noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.TEAPOT))
|
||||
|
||||
@JvmField
|
||||
val SACHET = create("sachet", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.WOOL).mapColor(MapColor.NONE).noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.POUCH))
|
||||
@JvmField
|
||||
val METAL_POWDER = create("metal_powder", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.WOOL).mapColor(MapColor.NONE).noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.POUCH))
|
||||
@JvmField
|
||||
val QUICK_POWDER = create("quick_powder", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.WOOL).mapColor(MapColor.NONE).noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.POUCH))
|
||||
@JvmField
|
||||
val BRIGHT_POWDER = create("bright_powder", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.WOOL).mapColor(MapColor.NONE).noOcclusion().lightLevel{3}, DecorativeItemBlock.DecorativeItemBlockType.POUCH))
|
||||
|
||||
@JvmField
|
||||
val NEVER_MELT_ICE = create("never_melt_ice", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.GLASS).mapColor(MapColor.NONE).noOcclusion().friction(0.989F), DecorativeItemBlock.DecorativeItemBlockType.NEVERMELT))
|
||||
@JvmField
|
||||
val SCOPE_LENS = create("scope_lens", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.COPPER).mapColor(MapColor.NONE).noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.SCOPE))
|
||||
@JvmField
|
||||
val WIDE_LENS = create("wide_lens", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.COPPER).mapColor(MapColor.NONE).noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.WIDE))
|
||||
@JvmField
|
||||
val ZOOM_LENS = create("zoom_lens", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.COPPER).mapColor(MapColor.NONE).noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.ZOOM))
|
||||
|
||||
@JvmField
|
||||
val ICY_ROCK = create("icy_rock", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.DEEPSLATE).mapColor(MapColor.NONE).noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.FLATTENED_8x4))
|
||||
@JvmField
|
||||
val HEAT_ROCK = create("heat_rock", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.DEEPSLATE).mapColor(MapColor.NONE).noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.FLATTENED_8x4))
|
||||
@JvmField
|
||||
val SMOOTH_ROCK = create("smooth_rock", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.DEEPSLATE).mapColor(MapColor.NONE).noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.FLATTENED_8x4))
|
||||
@JvmField
|
||||
val DAMP_ROCK = create("damp_rock", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.DEEPSLATE).mapColor(MapColor.NONE).noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.FLATTENED_8x6))
|
||||
@JvmField
|
||||
val DESTINY_KNOT = create("destiny_knot", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.WOOL).mapColor(MapColor.NONE).noOcclusion(), DecorativeItemBlock.DecorativeItemBlockType.KNOT))
|
||||
@JvmField
|
||||
val LUMINOUS_MOSS = create("luminous_moss", DecorativeItemBlock(BlockBehaviour.Properties.of().sound(SoundType.MOSS).mapColor(MapColor.NONE).noOcclusion().lightLevel{5}, DecorativeItemBlock.DecorativeItemBlockType.CENTERED_8x))
|
||||
|
||||
@JvmField
|
||||
val METRONOME = create("metronome", ActivatableDecorationBlock(BlockBehaviour.Properties.of().sound(SoundType.METAL).mapColor(MapColor.NONE).pushReaction(PushReaction.DESTROY).noOcclusion(), ActivatableDecorationBlock.ActivatableDecorationBlockType.METRONOME))
|
||||
@JvmField
|
||||
val EJECT_BUTTON = create("eject_button", EjectButtonBlock(BlockBehaviour.Properties.of().sound(SoundType.METAL).mapColor(MapColor.NONE).pushReaction(PushReaction.DESTROY).noOcclusion().strength(0.125f), 40))
|
||||
|
||||
@JvmField
|
||||
val LOADED_DICE = create("loaded_dice", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.DICE))
|
||||
@JvmField
|
||||
val IRON_BALL = create("iron_ball", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.METAL).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.IRON_BALL))
|
||||
@JvmField
|
||||
val METAL_COAT = create("metal_coat", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.METAL).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.METAL_COAT))
|
||||
@JvmField
|
||||
val UPGRADE = create("upgrade", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.UPGRADE))
|
||||
@JvmField
|
||||
val DUBIOUS_DISC = create("dubious_disc", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.UPGRADE))
|
||||
|
||||
@JvmField
|
||||
val THROAT_SPRAY = create("throat_spray", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.THROAT_SPRAY))
|
||||
|
||||
@JvmField
|
||||
val FULL_HEAL = create("full_heal", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.STATUS_RESTORE))
|
||||
@JvmField
|
||||
@@ -670,6 +750,23 @@ object CobblemonBlocks : PlatformRegistry<Registry<Block>, ResourceKey<Registry<
|
||||
@JvmField
|
||||
val X_SPEED = create("x_${Stats.SPEED.identifier.path}", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.BATTLE_ITEM))
|
||||
|
||||
@JvmField
|
||||
val HP_UP = create("hp_up", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.VITAMIN))
|
||||
@JvmField
|
||||
val PROTEIN = create("protein", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.VITAMIN))
|
||||
@JvmField
|
||||
val IRON = create("iron", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.VITAMIN))
|
||||
@JvmField
|
||||
val CARBOS = create("carbos", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.VITAMIN))
|
||||
@JvmField
|
||||
val CALCIUM = create("calcium", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.VITAMIN))
|
||||
@JvmField
|
||||
val ZINC = create("zinc", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.VITAMIN))
|
||||
@JvmField
|
||||
val PP_UP = create("pp_up", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.VITAMIN))
|
||||
@JvmField
|
||||
val PP_MAX = create("pp_max", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.VITAMIN))
|
||||
|
||||
@JvmField
|
||||
val MONITOR = create("monitor", MonitorBlock(BlockBehaviour.Properties.of().mapColor(MapColor.METAL).sound(SoundType.METAL).pushReaction(PushReaction.BLOCK).requiresCorrectToolForDrops().strength(5.0F, 6.0F).lightLevel { if (it.getValue(MonitorBlock.SCREEN) != MonitorBlock.MonitorScreen.OFF) 13 else 0 }))
|
||||
@JvmField
|
||||
@@ -685,6 +782,7 @@ object CobblemonBlocks : PlatformRegistry<Registry<Block>, ResourceKey<Registry<
|
||||
@JvmField
|
||||
val PC = create("pc", PCBlock(BlockBehaviour.Properties.of().mapColor(MapColor.METAL).sound(SoundType.METAL).pushReaction(PushReaction.BLOCK).strength(2F).noOcclusion().lightLevel { if ((it.getValue(PCBlock.ON) as Boolean) && (it.getValue(PCBlock.PART) == PCBlock.PCPart.TOP)) 13 else 0 }))
|
||||
|
||||
@JvmField
|
||||
val TM_MACHINE = create(
|
||||
"tm_machine",
|
||||
TMMachineBlock(
|
||||
@@ -707,13 +805,100 @@ object CobblemonBlocks : PlatformRegistry<Registry<Block>, ResourceKey<Registry<
|
||||
@JvmField
|
||||
val DISPLAY_CASE = create("display_case", DisplayCaseBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.DISPLAY_CASE_SOUNDS).noOcclusion().pushReaction(PushReaction.BLOCK).mapColor(MapColor.STONE).strength(0.3F).requiresCorrectToolForDrops()))
|
||||
|
||||
//Rotom Blocks
|
||||
//Oven
|
||||
@JvmField
|
||||
val COPPER_OVEN = create("copper_oven", WeatheringCopperOvenBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_ORANGE).requiresCorrectToolForDrops().strength(3.0f, 6.0f).sound(SoundType.COPPER).pushReaction(PushReaction.BLOCK)))
|
||||
@JvmField
|
||||
val EXPOSED_COPPER_OVEN = create("exposed_copper_oven", WeatheringCopperOvenBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.ofFullCopy(COPPER_OVEN).mapColor(MapColor.TERRACOTTA_LIGHT_GRAY)))
|
||||
@JvmField
|
||||
val WEATHERED_COPPER_OVEN = create("weathered_copper_oven", WeatheringCopperOvenBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.ofFullCopy(COPPER_OVEN).mapColor(MapColor.WARPED_STEM)))
|
||||
@JvmField
|
||||
val OXIDIZED_COPPER_OVEN = create("oxidized_copper_oven", WeatheringCopperOvenBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.ofFullCopy(COPPER_OVEN).mapColor(MapColor.WARPED_NYLIUM)))
|
||||
@JvmField
|
||||
val WAXED_COPPER_OVEN = create("waxed_copper_oven", CopperOvenBlock(BlockBehaviour.Properties.ofFullCopy(COPPER_OVEN)))
|
||||
@JvmField
|
||||
val WAXED_EXPOSED_COPPER_OVEN = create("waxed_exposed_copper_oven", CopperOvenBlock(BlockBehaviour.Properties.ofFullCopy(EXPOSED_COPPER_OVEN)))
|
||||
@JvmField
|
||||
val WAXED_WEATHERED_COPPER_OVEN = create("waxed_weathered_copper_oven", CopperOvenBlock(BlockBehaviour.Properties.ofFullCopy(WEATHERED_COPPER_OVEN)))
|
||||
@JvmField
|
||||
val WAXED_OXIDIZED_COPPER_OVEN = create("waxed_oxidized_copper_oven", CopperOvenBlock(BlockBehaviour.Properties.ofFullCopy(OXIDIZED_COPPER_OVEN)))
|
||||
//Washer
|
||||
@JvmField
|
||||
val COPPER_WASHER = create("copper_washer", WeatheringCopperWasherBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_ORANGE).requiresCorrectToolForDrops().strength(3.0f, 6.0f).sound(SoundType.COPPER).pushReaction(PushReaction.BLOCK)))
|
||||
@JvmField
|
||||
val EXPOSED_COPPER_WASHER = create("exposed_copper_washer", WeatheringCopperWasherBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.ofFullCopy(COPPER_WASHER).mapColor(MapColor.TERRACOTTA_LIGHT_GRAY)))
|
||||
@JvmField
|
||||
val WEATHERED_COPPER_WASHER = create("weathered_copper_washer", WeatheringCopperWasherBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.ofFullCopy(COPPER_WASHER).mapColor(MapColor.WARPED_STEM)))
|
||||
@JvmField
|
||||
val OXIDIZED_COPPER_WASHER = create("oxidized_copper_washer", WeatheringCopperWasherBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.ofFullCopy(COPPER_WASHER).mapColor(MapColor.WARPED_NYLIUM)))
|
||||
@JvmField
|
||||
val WAXED_COPPER_WASHER = create("waxed_copper_washer", CopperWasherBlock(BlockBehaviour.Properties.ofFullCopy(COPPER_WASHER)))
|
||||
@JvmField
|
||||
val WAXED_EXPOSED_COPPER_WASHER = create("waxed_exposed_copper_washer", CopperWasherBlock(BlockBehaviour.Properties.ofFullCopy(EXPOSED_COPPER_WASHER)))
|
||||
@JvmField
|
||||
val WAXED_WEATHERED_COPPER_WASHER = create("waxed_weathered_copper_washer", CopperWasherBlock(BlockBehaviour.Properties.ofFullCopy(WEATHERED_COPPER_WASHER)))
|
||||
@JvmField
|
||||
val WAXED_OXIDIZED_COPPER_WASHER = create("waxed_oxidized_copper_washer", CopperWasherBlock(BlockBehaviour.Properties.ofFullCopy(OXIDIZED_COPPER_WASHER)))
|
||||
//Fan
|
||||
@JvmField
|
||||
val COPPER_FAN = create("copper_fan", WeatheringCopperFanBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_ORANGE).requiresCorrectToolForDrops().strength(3.0f, 6.0f).sound(SoundType.COPPER).pushReaction(PushReaction.DESTROY)))
|
||||
@JvmField
|
||||
val EXPOSED_COPPER_FAN = create("exposed_copper_fan", WeatheringCopperFanBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.ofFullCopy(COPPER_FAN).mapColor(MapColor.TERRACOTTA_LIGHT_GRAY)))
|
||||
@JvmField
|
||||
val WEATHERED_COPPER_FAN = create("weathered_copper_fan", WeatheringCopperFanBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.ofFullCopy(COPPER_FAN).mapColor(MapColor.WARPED_STEM)))
|
||||
@JvmField
|
||||
val OXIDIZED_COPPER_FAN = create("oxidized_copper_fan", WeatheringCopperFanBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.ofFullCopy(COPPER_FAN).mapColor(MapColor.WARPED_NYLIUM)))
|
||||
@JvmField
|
||||
val WAXED_COPPER_FAN = create("waxed_copper_fan", CopperFanBlock(BlockBehaviour.Properties.ofFullCopy(COPPER_FAN)))
|
||||
@JvmField
|
||||
val WAXED_EXPOSED_COPPER_FAN = create("waxed_exposed_copper_fan", CopperFanBlock(BlockBehaviour.Properties.ofFullCopy(EXPOSED_COPPER_FAN)))
|
||||
@JvmField
|
||||
val WAXED_WEATHERED_COPPER_FAN = create("waxed_weathered_copper_fan", CopperFanBlock(BlockBehaviour.Properties.ofFullCopy(WEATHERED_COPPER_FAN)))
|
||||
@JvmField
|
||||
val WAXED_OXIDIZED_COPPER_FAN = create("waxed_oxidized_copper_fan", CopperFanBlock(BlockBehaviour.Properties.ofFullCopy(OXIDIZED_COPPER_FAN)))
|
||||
//Mower
|
||||
@JvmField
|
||||
val COPPER_MOWER = create("copper_mower", WeatheringCopperMowerBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_ORANGE).requiresCorrectToolForDrops().strength(3.0f, 6.0f).sound(SoundType.COPPER).pushReaction(PushReaction.NORMAL)))
|
||||
@JvmField
|
||||
val EXPOSED_COPPER_MOWER = create("exposed_copper_mower", WeatheringCopperMowerBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.ofFullCopy(COPPER_MOWER).mapColor(MapColor.TERRACOTTA_LIGHT_GRAY)))
|
||||
@JvmField
|
||||
val WEATHERED_COPPER_MOWER = create("weathered_copper_mower", WeatheringCopperMowerBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.ofFullCopy(COPPER_MOWER).mapColor(MapColor.WARPED_STEM)))
|
||||
@JvmField
|
||||
val OXIDIZED_COPPER_MOWER = create("oxidized_copper_mower", WeatheringCopperMowerBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.ofFullCopy(COPPER_MOWER).mapColor(MapColor.WARPED_NYLIUM)))
|
||||
@JvmField
|
||||
val WAXED_COPPER_MOWER = create("waxed_copper_mower", CopperMowerBlock(BlockBehaviour.Properties.ofFullCopy(COPPER_MOWER)))
|
||||
@JvmField
|
||||
val WAXED_EXPOSED_COPPER_MOWER = create("waxed_exposed_copper_mower", CopperMowerBlock(BlockBehaviour.Properties.ofFullCopy(EXPOSED_COPPER_MOWER)))
|
||||
@JvmField
|
||||
val WAXED_WEATHERED_COPPER_MOWER = create("waxed_weathered_copper_mower", CopperMowerBlock(BlockBehaviour.Properties.ofFullCopy(WEATHERED_COPPER_MOWER)))
|
||||
@JvmField
|
||||
val WAXED_OXIDIZED_COPPER_MOWER = create("waxed_oxidized_copper_mower", CopperMowerBlock(BlockBehaviour.Properties.ofFullCopy(OXIDIZED_COPPER_MOWER)))
|
||||
//Fridge
|
||||
@JvmField
|
||||
val COPPER_FRIDGE = create("copper_fridge", WeatheringCopperFridgeBlock(WeatheringCopper.WeatherState.UNAFFECTED, BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_ORANGE).requiresCorrectToolForDrops().strength(3.0f, 6.0f).sound(SoundType.COPPER).pushReaction(PushReaction.BLOCK)))
|
||||
@JvmField
|
||||
val EXPOSED_COPPER_FRIDGE = create("exposed_copper_fridge", WeatheringCopperFridgeBlock(WeatheringCopper.WeatherState.EXPOSED, BlockBehaviour.Properties.ofFullCopy(COPPER_FRIDGE).mapColor(MapColor.TERRACOTTA_LIGHT_GRAY)))
|
||||
@JvmField
|
||||
val WEATHERED_COPPER_FRIDGE = create("weathered_copper_fridge", WeatheringCopperFridgeBlock(WeatheringCopper.WeatherState.WEATHERED, BlockBehaviour.Properties.ofFullCopy(COPPER_FRIDGE).mapColor(MapColor.WARPED_STEM)))
|
||||
@JvmField
|
||||
val OXIDIZED_COPPER_FRIDGE = create("oxidized_copper_fridge", WeatheringCopperFridgeBlock(WeatheringCopper.WeatherState.OXIDIZED, BlockBehaviour.Properties.ofFullCopy(COPPER_FRIDGE).mapColor(MapColor.WARPED_NYLIUM)))
|
||||
@JvmField
|
||||
val WAXED_COPPER_FRIDGE = create("waxed_copper_fridge", CopperFridgeBlock(BlockBehaviour.Properties.ofFullCopy(COPPER_FRIDGE)))
|
||||
@JvmField
|
||||
val WAXED_EXPOSED_COPPER_FRIDGE = create("waxed_exposed_copper_fridge", CopperFridgeBlock(BlockBehaviour.Properties.ofFullCopy(EXPOSED_COPPER_FRIDGE)))
|
||||
@JvmField
|
||||
val WAXED_WEATHERED_COPPER_FRIDGE = create("waxed_weathered_copper_fridge", CopperFridgeBlock(BlockBehaviour.Properties.ofFullCopy(WEATHERED_COPPER_FRIDGE)))
|
||||
@JvmField
|
||||
val WAXED_OXIDIZED_COPPER_FRIDGE = create("waxed_oxidized_copper_fridge", CopperFridgeBlock(BlockBehaviour.Properties.ofFullCopy(OXIDIZED_COPPER_FRIDGE)))
|
||||
|
||||
// TODO after 1.7
|
||||
// @JvmField
|
||||
// val INCENSE_SWEET = create("incense_sweet", SweetIncenseBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.DISPLAY_CASE_SOUNDS).noOcclusion().pushReaction(PushReaction.BLOCK).mapColor(MapColor.STONE).strength(0.3F)))
|
||||
|
||||
@JvmField
|
||||
val PASTURE = create("pasture", PastureBlock(BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_BROWN).sound(SoundType.WOOD).strength(2F).noOcclusion().pushReaction(PushReaction.BLOCK).lightLevel { if ((it.getValue(PastureBlock.ON) as Boolean) && (it.getValue(PastureBlock.PART) == PastureBlock.PasturePart.TOP)) 13 else 0 }))
|
||||
|
||||
@JvmField
|
||||
val RED_MINT = create("red_mint", MintBlock(MintType.RED, BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_RED).noCollission().randomTicks().instabreak().sound(CobblemonSounds.MINT_SOUNDS).pushReaction(PushReaction.DESTROY)))
|
||||
@JvmField
|
||||
val BLUE_MINT = create("blue_mint", MintBlock(MintType.BLUE, BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_BLUE).noCollission().randomTicks().instabreak().sound(CobblemonSounds.MINT_SOUNDS).pushReaction(PushReaction.DESTROY)))
|
||||
@@ -774,6 +959,57 @@ object CobblemonBlocks : PlatformRegistry<Registry<Block>, ResourceKey<Registry<
|
||||
SACCHARINE_LOG to STRIPPED_SACCHARINE_LOG,
|
||||
SACCHARINE_LOG_SLATHERED to STRIPPED_SACCHARINE_LOG
|
||||
)
|
||||
/**Same idea as above, but for Copper Oxidation over time (or when inverted, scraping with an axe)*/
|
||||
fun oxidizingBlocks(): Map<Block, Block> = mapOf(
|
||||
//Ovens
|
||||
COPPER_OVEN to EXPOSED_COPPER_OVEN,
|
||||
EXPOSED_COPPER_OVEN to WEATHERED_COPPER_OVEN,
|
||||
WEATHERED_COPPER_OVEN to OXIDIZED_COPPER_OVEN,
|
||||
//Washers
|
||||
COPPER_WASHER to EXPOSED_COPPER_WASHER,
|
||||
EXPOSED_COPPER_WASHER to WEATHERED_COPPER_WASHER,
|
||||
WEATHERED_COPPER_WASHER to OXIDIZED_COPPER_WASHER,
|
||||
//Fans
|
||||
COPPER_FAN to EXPOSED_COPPER_FAN,
|
||||
EXPOSED_COPPER_FAN to WEATHERED_COPPER_FAN,
|
||||
WEATHERED_COPPER_FAN to OXIDIZED_COPPER_FAN,
|
||||
//Fridges
|
||||
COPPER_FRIDGE to EXPOSED_COPPER_FRIDGE,
|
||||
EXPOSED_COPPER_FRIDGE to WEATHERED_COPPER_FRIDGE,
|
||||
WEATHERED_COPPER_FRIDGE to OXIDIZED_COPPER_FRIDGE,
|
||||
//Mowers
|
||||
COPPER_MOWER to EXPOSED_COPPER_MOWER,
|
||||
EXPOSED_COPPER_MOWER to WEATHERED_COPPER_MOWER,
|
||||
WEATHERED_COPPER_MOWER to OXIDIZED_COPPER_MOWER
|
||||
)
|
||||
/**Same idea as above, but for waxing blocks with Honeycomb (or unwaxing them with an axe)*/
|
||||
fun waxingBlocks(): Map<Block, Block> = mapOf(
|
||||
//Ovens
|
||||
COPPER_OVEN to WAXED_COPPER_OVEN,
|
||||
EXPOSED_COPPER_OVEN to WAXED_EXPOSED_COPPER_OVEN,
|
||||
WEATHERED_COPPER_OVEN to WAXED_WEATHERED_COPPER_OVEN,
|
||||
OXIDIZED_COPPER_OVEN to WAXED_OXIDIZED_COPPER_OVEN,
|
||||
//Washers
|
||||
COPPER_WASHER to WAXED_COPPER_WASHER,
|
||||
EXPOSED_COPPER_WASHER to WAXED_EXPOSED_COPPER_WASHER,
|
||||
WEATHERED_COPPER_WASHER to WAXED_WEATHERED_COPPER_WASHER,
|
||||
OXIDIZED_COPPER_WASHER to WAXED_OXIDIZED_COPPER_WASHER,
|
||||
//Fans
|
||||
COPPER_FAN to WAXED_COPPER_FAN,
|
||||
EXPOSED_COPPER_FAN to WAXED_EXPOSED_COPPER_FAN,
|
||||
WEATHERED_COPPER_FAN to WAXED_WEATHERED_COPPER_FAN,
|
||||
OXIDIZED_COPPER_FAN to WAXED_OXIDIZED_COPPER_FAN,
|
||||
//Fridges
|
||||
COPPER_FRIDGE to WAXED_COPPER_FRIDGE,
|
||||
EXPOSED_COPPER_FRIDGE to WAXED_EXPOSED_COPPER_FRIDGE,
|
||||
WEATHERED_COPPER_FRIDGE to WAXED_WEATHERED_COPPER_FRIDGE,
|
||||
OXIDIZED_COPPER_FRIDGE to WAXED_OXIDIZED_COPPER_FRIDGE,
|
||||
//Mowers
|
||||
COPPER_MOWER to WAXED_COPPER_MOWER,
|
||||
EXPOSED_COPPER_MOWER to WAXED_EXPOSED_COPPER_MOWER,
|
||||
WEATHERED_COPPER_MOWER to WAXED_WEATHERED_COPPER_MOWER,
|
||||
OXIDIZED_COPPER_MOWER to WAXED_OXIDIZED_COPPER_MOWER
|
||||
)
|
||||
|
||||
private fun apricornBlock(name: String, apricorn: Apricorn): ApricornBlock = this.create(name, ApricornBlock(BlockBehaviour.Properties.of().mapColor(apricorn.mapColor()).randomTicks().strength(Blocks.OAK_LOG.defaultDestroyTime(), Blocks.OAK_LOG.explosionResistance).sound(SoundType.WOOD).noOcclusion(), apricorn))
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.cobblemon.mod.common.api.net.NetworkPacket
|
||||
import com.mojang.brigadier.arguments.ArgumentType
|
||||
import kotlin.reflect.KClass
|
||||
import net.minecraft.commands.synchronization.ArgumentTypeInfo
|
||||
import net.minecraft.core.HolderLookup
|
||||
import net.minecraft.resources.ResourceKey
|
||||
import net.minecraft.resources.ResourceLocation
|
||||
import net.minecraft.server.MinecraftServer
|
||||
@@ -168,12 +169,16 @@ interface CobblemonImplementation {
|
||||
* TODO
|
||||
*
|
||||
* @param identifier
|
||||
* @param reloader
|
||||
* @param reloaderFactory
|
||||
* @param type
|
||||
* @param dependencies
|
||||
*/
|
||||
fun registerResourceReloader(identifier: ResourceLocation, reloader: PreparableReloadListener, type: PackType, dependencies: Collection<ResourceLocation>)
|
||||
|
||||
fun registerResourceReloader(
|
||||
identifier: ResourceLocation,
|
||||
type: PackType,
|
||||
dependencies: Collection<ResourceLocation>,
|
||||
reloaderFactory: (HolderLookup.Provider) -> PreparableReloadListener
|
||||
)
|
||||
/**
|
||||
* TODO
|
||||
*
|
||||
|
||||
@@ -472,9 +472,9 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
|
||||
// Evolution items
|
||||
@JvmField val LINK_CABLE = create("link_cable", LinkCableItem())
|
||||
@JvmField val DRAGON_SCALE = noSettingsItem("dragon_scale")
|
||||
@JvmField val METAL_COAT = noSettingsItem("metal_coat")
|
||||
@JvmField val UPGRADE = noSettingsItem("upgrade")
|
||||
@JvmField val DUBIOUS_DISC = noSettingsItem("dubious_disc")
|
||||
@JvmField val METAL_COAT = itemNameBlockItem("metal_coat", CobblemonBlocks.METAL_COAT)
|
||||
@JvmField val UPGRADE = itemNameBlockItem("upgrade", CobblemonBlocks.UPGRADE)
|
||||
@JvmField val DUBIOUS_DISC = itemNameBlockItem("dubious_disc", CobblemonBlocks.DUBIOUS_DISC)
|
||||
@JvmField val DEEP_SEA_SCALE = noSettingsItem("deep_sea_scale")
|
||||
@JvmField val DEEP_SEA_TOOTH = noSettingsItem("deep_sea_tooth")
|
||||
@JvmField val ELECTIRIZER = noSettingsItem("electirizer")
|
||||
@@ -483,7 +483,7 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
|
||||
@JvmField val PROTECTOR = noSettingsItem("protector")
|
||||
@JvmField val REAPER_CLOTH = noSettingsItem("reaper_cloth")
|
||||
@JvmField val PRISM_SCALE = noSettingsItem("prism_scale")
|
||||
@JvmField val SACHET = noSettingsItem("sachet")
|
||||
@JvmField val SACHET = itemNameBlockItem("sachet", CobblemonBlocks.SACHET)
|
||||
@JvmField val WHIPPED_DREAM = create("whipped_dream", foodItem(8, 0.3f))
|
||||
@JvmField val STRAWBERRY_SWEET = create("strawberry_sweet", foodItem(6, 0.125f))
|
||||
@JvmField val LOVE_SWEET = create("love_sweet", foodItem(6, 0.125f))
|
||||
@@ -492,22 +492,20 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
|
||||
@JvmField val FLOWER_SWEET = create("flower_sweet", foodItem(6, 0.125f))
|
||||
@JvmField val STAR_SWEET = create("star_sweet", foodItem(6, 0.125f))
|
||||
@JvmField val RIBBON_SWEET = create("ribbon_sweet", foodItem(6, 0.125f))
|
||||
@JvmField val CHIPPED_POT = noSettingsItem("chipped_pot")
|
||||
@JvmField val CRACKED_POT = noSettingsItem("cracked_pot")
|
||||
@JvmField val MASTERPIECE_TEACUP = noSettingsItem("masterpiece_teacup")
|
||||
@JvmField val UNREMARKABLE_TEACUP = noSettingsItem("unremarkable_teacup")
|
||||
@JvmField val CHIPPED_POT = itemNameBlockItem("chipped_pot", CobblemonBlocks.CHIPPED_POT)
|
||||
@JvmField val CRACKED_POT = itemNameBlockItem("cracked_pot", CobblemonBlocks.CRACKED_POT)
|
||||
@JvmField val MASTERPIECE_TEACUP = itemNameBlockItem("masterpiece_teacup", CobblemonBlocks.MASTERPIECE_TEACUP)
|
||||
@JvmField val UNREMARKABLE_TEACUP = itemNameBlockItem("unremarkable_teacup", CobblemonBlocks.UNREMARKABLE_TEACUP)
|
||||
@JvmField val SWEET_APPLE = compostableItem("sweet_apple", foodItem(4, 0.3f), 0.65f)
|
||||
@JvmField val TART_APPLE = compostableItem("tart_apple", foodItem(4, 0.3f), 0.65f)
|
||||
@JvmField val SYRUPY_APPLE = compostableItem("syrupy_apple", foodItem(4, 0.3f), 0.65f)
|
||||
@JvmField val GALARICA_CUFF = noSettingsItem("galarica_cuff")
|
||||
@JvmField val GALARICA_WREATH = noSettingsItem("galarica_wreath")
|
||||
@JvmField val GALARICA_CUFF = itemNameBlockItem("galarica_cuff", CobblemonBlocks.GALARICA_CUFF)
|
||||
@JvmField val BLACK_AUGURITE = noSettingsItem("black_augurite")
|
||||
@JvmField val PEAT_BLOCK = noSettingsItem("peat_block")
|
||||
@JvmField val RAZOR_CLAW = noSettingsItem("razor_claw")
|
||||
@JvmField val RAZOR_FANG = noSettingsItem("razor_fang")
|
||||
@JvmField val AUSPICIOUS_ARMOR = heldItem("auspicious_armor")
|
||||
@JvmField val MALICIOUS_ARMOR = heldItem("malicious_armor")
|
||||
@JvmField val SHELL_HELMET = heldItem("shell_helmet")
|
||||
@JvmField val METAL_ALLOY = noSettingsItem("metal_alloy")
|
||||
@JvmField val SCROLL_OF_DARKNESS = noSettingsItem("scroll_of_darkness")
|
||||
@JvmField val SCROLL_OF_WATERS = noSettingsItem("scroll_of_waters")
|
||||
@@ -651,17 +649,17 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
|
||||
@JvmField
|
||||
val EXPERIENCE_CANDY_XL = candyItem("exp_candy_xl") { _, _ -> CandyItem.DEFAULT_XL_CANDY_YIELD }
|
||||
@JvmField
|
||||
val CALCIUM = create("calcium", VitaminItem(Stats.SPECIAL_ATTACK))
|
||||
val CALCIUM = create("calcium", VitaminItem(Stats.SPECIAL_ATTACK, CobblemonBlocks.CALCIUM))
|
||||
@JvmField
|
||||
val CARBOS = create("carbos", VitaminItem(Stats.SPEED))
|
||||
val CARBOS = create("carbos", VitaminItem(Stats.SPEED, CobblemonBlocks.CARBOS))
|
||||
@JvmField
|
||||
val HP_UP = create("hp_up", VitaminItem(Stats.HP))
|
||||
val HP_UP = create("hp_up", VitaminItem(Stats.HP, CobblemonBlocks.HP_UP))
|
||||
@JvmField
|
||||
val IRON = create("iron", VitaminItem(Stats.DEFENCE))
|
||||
val IRON = create("iron", VitaminItem(Stats.DEFENCE, CobblemonBlocks.IRON))
|
||||
@JvmField
|
||||
val PROTEIN = create("protein", VitaminItem(Stats.ATTACK))
|
||||
val PROTEIN = create("protein", VitaminItem(Stats.ATTACK, CobblemonBlocks.PROTEIN))
|
||||
@JvmField
|
||||
val ZINC = create("zinc", VitaminItem(Stats.SPECIAL_DEFENCE))
|
||||
val ZINC = create("zinc", VitaminItem(Stats.SPECIAL_DEFENCE, CobblemonBlocks.ZINC))
|
||||
@JvmField
|
||||
val HEALTH_MOCHI = create("health_mochi", MochiItem(Stats.HP))
|
||||
@JvmField
|
||||
@@ -743,9 +741,9 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
|
||||
@JvmField
|
||||
val MAX_REVIVE = create("max_revive", ReviveItem(max = true))
|
||||
@JvmField
|
||||
val PP_UP = create("pp_up", PPUpItem(1))
|
||||
val PP_UP = create("pp_up", PPUpItem(1, CobblemonBlocks.PP_UP))
|
||||
@JvmField
|
||||
val PP_MAX = create("pp_max", PPUpItem(3))
|
||||
val PP_MAX = create("pp_max", PPUpItem(3, CobblemonBlocks.PP_MAX))
|
||||
|
||||
@JvmField
|
||||
val RED_MINT_SEEDS = mintSeed("red", MintType.RED.getCropBlock())
|
||||
@@ -922,11 +920,18 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
|
||||
@JvmField val CHOICE_SPECS = wearableItem("choice_specs")
|
||||
@JvmField val EXP_SHARE = wearableItem("exp_share")
|
||||
@JvmField val FOCUS_BAND = wearableItem("focus_band")
|
||||
@JvmField val KINGS_ROCK = wearableItem("kings_rock")
|
||||
@JvmField val KINGS_ROCK = wearableBlockItem("kings_rock", CobblemonBlocks.KINGS_ROCK)
|
||||
@JvmField val NEVER_MELT_ICE = wearableBlockItem("never_melt_ice", CobblemonBlocks.NEVER_MELT_ICE)
|
||||
@JvmField val MUSCLE_BAND = wearableItem("muscle_band")
|
||||
@JvmField val ROCKY_HELMET = wearableItem("rocky_helmet")
|
||||
@JvmField val SAFETY_GOGGLES = wearableItem("safety_goggles")
|
||||
@JvmField val WISE_GLASSES = wearableItem("wise_glasses")
|
||||
@JvmField val SHARP_BEAK = wearableItem("sharp_beak")
|
||||
@JvmField val COVERT_CLOAK = wearableItem("covert_cloak")
|
||||
@JvmField val SHELL_HELMET = wearableItem("shell_helmet")
|
||||
@JvmField val GALARICA_WREATH = wearableBlockItem("galarica_wreath", CobblemonBlocks.GALARICA_WREATH)
|
||||
@JvmField val CLEANSE_TAG = wearableBlockItem("cleanse_tag", CobblemonBlocks.CLEANSE_TAG)
|
||||
@JvmField val SPELL_TAG = wearableBlockItem("spell_tag", CobblemonBlocks.SPELL_TAG)
|
||||
|
||||
// Held Items
|
||||
@JvmField
|
||||
@@ -954,17 +959,13 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
|
||||
@JvmField
|
||||
val CHOICE_SCARF = heldItem("choice_scarf")
|
||||
@JvmField
|
||||
val CLEANSE_TAG = itemNameBlockItem("cleanse_tag", CobblemonBlocks.CLEANSE_TAG)
|
||||
@JvmField
|
||||
val CLEAR_AMULET = heldItem("clear_amulet")
|
||||
@JvmField
|
||||
val COVERT_CLOAK = heldItem("covert_cloak")
|
||||
@JvmField
|
||||
val DESTINY_KNOT = heldItem("destiny_knot")
|
||||
val DESTINY_KNOT = itemNameBlockItem("destiny_knot", CobblemonBlocks.DESTINY_KNOT)
|
||||
@JvmField
|
||||
val DRAGON_FANG = heldItem("dragon_fang")
|
||||
@JvmField
|
||||
val EJECT_BUTTON = heldItem("eject_button")
|
||||
val EJECT_BUTTON = itemNameBlockItem("eject_button", CobblemonBlocks.EJECT_BUTTON)
|
||||
@JvmField
|
||||
val EJECT_PACK = heldItem("eject_pack")
|
||||
@JvmField
|
||||
@@ -978,7 +979,7 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
|
||||
@JvmField
|
||||
val FAIRY_FEATHER = heldItem("fairy_feather")
|
||||
@JvmField
|
||||
val FLAME_ORB = heldItem("flame_orb")
|
||||
val FLAME_ORB = itemNameBlockItem("flame_orb", CobblemonBlocks.FLAME_ORB)
|
||||
@JvmField
|
||||
val FLOAT_STONE = heldItem("float_stone")
|
||||
@JvmField
|
||||
@@ -992,34 +993,32 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
|
||||
@JvmField
|
||||
val HEAVY_DUTY_BOOTS = heldItem("heavy_duty_boots")
|
||||
@JvmField
|
||||
val IRON_BALL = heldItem("iron_ball")
|
||||
val IRON_BALL = itemNameBlockItem("iron_ball", CobblemonBlocks.IRON_BALL)
|
||||
@JvmField
|
||||
val LAGGING_TAIL = heldItem("lagging_tail")
|
||||
@JvmField
|
||||
val LEFTOVERS = compostableHeldItem("leftovers", null, 0.50f)
|
||||
@JvmField
|
||||
val LIFE_ORB = heldItem("life_orb")
|
||||
val LIFE_ORB = itemNameBlockItem("life_orb", CobblemonBlocks.LIFE_ORB)
|
||||
@JvmField
|
||||
val LIGHT_BALL = heldItem("light_ball")
|
||||
val LIGHT_BALL = itemNameBlockItem("light_ball", CobblemonBlocks.LIGHT_BALL)
|
||||
@JvmField
|
||||
val LIGHT_CLAY = heldItem("light_clay")
|
||||
@JvmField
|
||||
val LOADED_DICE = heldItem("loaded_dice")
|
||||
val LOADED_DICE = itemNameBlockItem("loaded_dice", CobblemonBlocks.LOADED_DICE)
|
||||
@JvmField
|
||||
val LUCKY_EGG = heldItem("lucky_egg")
|
||||
@JvmField
|
||||
val LUMINOUS_MOSS = heldItem("luminous_moss")
|
||||
val LUMINOUS_MOSS = itemNameBlockItem("luminous_moss", CobblemonBlocks.LUMINOUS_MOSS)
|
||||
@JvmField
|
||||
val MAGNET = heldItem("magnet")
|
||||
val MAGNET = itemNameBlockItem("magnet", CobblemonBlocks.MAGNET)
|
||||
@JvmField
|
||||
val METRONOME = heldItem("metronome")
|
||||
val METRONOME = itemNameBlockItem("metronome", CobblemonBlocks.METRONOME)
|
||||
@JvmField
|
||||
val MIRACLE_SEED = heldItem("miracle_seed")
|
||||
@JvmField
|
||||
val MYSTIC_WATER = heldItem("mystic_water")
|
||||
@JvmField
|
||||
val NEVER_MELT_ICE = heldItem("never_melt_ice")
|
||||
@JvmField
|
||||
val POISON_BARB = heldItem("poison_barb")
|
||||
@JvmField
|
||||
val POWER_ANKLET = heldItem("power_anklet")
|
||||
@@ -1044,13 +1043,11 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
|
||||
@JvmField
|
||||
val RED_CARD = heldItem("red_card")
|
||||
@JvmField
|
||||
val RING_TARGET = heldItem("ring_target")
|
||||
val RING_TARGET = itemNameBlockItem("ring_target", CobblemonBlocks.RING_TARGET)
|
||||
@JvmField
|
||||
val ROOM_SERVICE = heldItem("room_service")
|
||||
@JvmField
|
||||
val SCOPE_LENS = heldItem("scope_lens")
|
||||
@JvmField
|
||||
val SHARP_BEAK = heldItem("sharp_beak")
|
||||
val SCOPE_LENS = itemNameBlockItem("scope_lens", CobblemonBlocks.SCOPE_LENS)
|
||||
@JvmField
|
||||
val SHED_SHELL = heldItem("shed_shell")
|
||||
@JvmField
|
||||
@@ -1062,9 +1059,7 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
|
||||
@JvmField
|
||||
val SOFT_SAND = heldItem("soft_sand")
|
||||
@JvmField
|
||||
val SPELL_TAG = itemNameBlockItem("spell_tag", CobblemonBlocks.SPELL_TAG)
|
||||
@JvmField
|
||||
val SMOKE_BALL = heldItem("smoke_ball")
|
||||
val SMOKE_BALL = itemNameBlockItem("smoke_ball", CobblemonBlocks.SMOKE_BALL)
|
||||
@JvmField
|
||||
val SOOTHE_BELL = heldItem("soothe_bell")
|
||||
@JvmField
|
||||
@@ -1072,9 +1067,9 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
|
||||
@JvmField
|
||||
val TERRAIN_EXTENDER = heldItem("terrain_extender")
|
||||
@JvmField
|
||||
val THROAT_SPRAY = heldItem("throat_spray")
|
||||
val THROAT_SPRAY = itemNameBlockItem("throat_spray", CobblemonBlocks.THROAT_SPRAY)
|
||||
@JvmField
|
||||
val TOXIC_ORB = heldItem("toxic_orb")
|
||||
val TOXIC_ORB = itemNameBlockItem("toxic_orb", CobblemonBlocks.TOXIC_ORB)
|
||||
@JvmField
|
||||
val TWISTED_SPOON = heldItem("twisted_spoon")
|
||||
@JvmField
|
||||
@@ -1082,9 +1077,9 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
|
||||
@JvmField
|
||||
val WEAKNESS_POLICY = itemNameBlockItem("weakness_policy", CobblemonBlocks.WEAKNESS_POLICY)
|
||||
@JvmField
|
||||
val WIDE_LENS = heldItem("wide_lens")
|
||||
val WIDE_LENS = itemNameBlockItem("wide_lens", CobblemonBlocks.WIDE_LENS)
|
||||
@JvmField
|
||||
val ZOOM_LENS = heldItem("zoom_lens")
|
||||
val ZOOM_LENS = itemNameBlockItem("zoom_lens", CobblemonBlocks.ZOOM_LENS)
|
||||
@JvmField
|
||||
val MENTAL_HERB = compostableHeldItem("mental_herb", null, 0.85F)
|
||||
@JvmField
|
||||
@@ -1096,19 +1091,19 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
|
||||
@JvmField
|
||||
val WHITE_HERB = compostableHeldItem("white_herb", null, 0.85F)
|
||||
@JvmField
|
||||
val BRIGHT_POWDER = heldItem("bright_powder")
|
||||
val BRIGHT_POWDER = itemNameBlockItem("bright_powder", CobblemonBlocks.BRIGHT_POWDER)
|
||||
@JvmField
|
||||
val METAL_POWDER = heldItem("metal_powder")
|
||||
val METAL_POWDER = itemNameBlockItem("metal_powder", CobblemonBlocks.METAL_POWDER)
|
||||
@JvmField
|
||||
val QUICK_POWDER = heldItem("quick_powder")
|
||||
val QUICK_POWDER = itemNameBlockItem("quick_powder", CobblemonBlocks.QUICK_POWDER)
|
||||
@JvmField
|
||||
val DAMP_ROCK = heldItem("damp_rock")
|
||||
val DAMP_ROCK = itemNameBlockItem("damp_rock", CobblemonBlocks.DAMP_ROCK)
|
||||
@JvmField
|
||||
val HEAT_ROCK = heldItem("heat_rock")
|
||||
val HEAT_ROCK = itemNameBlockItem("heat_rock", CobblemonBlocks.HEAT_ROCK)
|
||||
@JvmField
|
||||
val SMOOTH_ROCK = heldItem("smooth_rock")
|
||||
val SMOOTH_ROCK = itemNameBlockItem("smooth_rock", CobblemonBlocks.SMOOTH_ROCK)
|
||||
@JvmField
|
||||
val ICY_ROCK = heldItem("icy_rock")
|
||||
val ICY_ROCK = itemNameBlockItem("icy_rock", CobblemonBlocks.ICY_ROCK)
|
||||
|
||||
// Mulch
|
||||
@JvmField
|
||||
@@ -1522,6 +1517,87 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
|
||||
@JvmField
|
||||
val BLANK_TM = this.create("blank_tm", CobblemonItem(Item.Properties()))
|
||||
|
||||
@JvmField
|
||||
val COPPER_OVEN = this.create("copper_oven", BlockItem(CobblemonBlocks.COPPER_OVEN, Item.Properties()))
|
||||
@JvmField
|
||||
val EXPOSED_COPPER_OVEN = this.create("exposed_copper_oven", BlockItem(CobblemonBlocks.EXPOSED_COPPER_OVEN, Item.Properties()))
|
||||
@JvmField
|
||||
val WEATHERED_COPPER_OVEN = this.create("weathered_copper_oven", BlockItem(CobblemonBlocks.WEATHERED_COPPER_OVEN, Item.Properties()))
|
||||
@JvmField
|
||||
val OXIDIZED_COPPER_OVEN = this.create("oxidized_copper_oven", BlockItem(CobblemonBlocks.OXIDIZED_COPPER_OVEN, Item.Properties()))
|
||||
@JvmField
|
||||
val WAXED_COPPER_OVEN = this.create("waxed_copper_oven", BlockItem(CobblemonBlocks.WAXED_COPPER_OVEN, Item.Properties()))
|
||||
@JvmField
|
||||
val WAXED_EXPOSED_COPPER_OVEN = this.create("waxed_exposed_copper_oven", BlockItem(CobblemonBlocks.WAXED_EXPOSED_COPPER_OVEN, Item.Properties()))
|
||||
@JvmField
|
||||
val WAXED_WEATHERED_COPPER_OVEN = this.create("waxed_weathered_copper_oven", BlockItem(CobblemonBlocks.WAXED_WEATHERED_COPPER_OVEN, Item.Properties()))
|
||||
@JvmField
|
||||
val WAXED_OXIDIZED_COPPER_OVEN = this.create("waxed_oxidized_copper_oven", BlockItem(CobblemonBlocks.WAXED_OXIDIZED_COPPER_OVEN, Item.Properties()))
|
||||
@JvmField
|
||||
val COPPER_WASHER = this.create("copper_washer", BlockItem(CobblemonBlocks.COPPER_WASHER, Item.Properties()))
|
||||
@JvmField
|
||||
val EXPOSED_COPPER_WASHER = this.create("exposed_copper_washer", BlockItem(CobblemonBlocks.EXPOSED_COPPER_WASHER, Item.Properties()))
|
||||
@JvmField
|
||||
val WEATHERED_COPPER_WASHER = this.create("weathered_copper_washer", BlockItem(CobblemonBlocks.WEATHERED_COPPER_WASHER, Item.Properties()))
|
||||
@JvmField
|
||||
val OXIDIZED_COPPER_WASHER = this.create("oxidized_copper_washer", BlockItem(CobblemonBlocks.OXIDIZED_COPPER_WASHER, Item.Properties()))
|
||||
@JvmField
|
||||
val WAXED_COPPER_WASHER = this.create("waxed_copper_washer", BlockItem(CobblemonBlocks.WAXED_COPPER_WASHER, Item.Properties()))
|
||||
@JvmField
|
||||
val WAXED_EXPOSED_COPPER_WASHER = this.create("waxed_exposed_copper_washer", BlockItem(CobblemonBlocks.WAXED_EXPOSED_COPPER_WASHER, Item.Properties()))
|
||||
@JvmField
|
||||
val WAXED_WEATHERED_COPPER_WASHER = this.create("waxed_weathered_copper_washer", BlockItem(CobblemonBlocks.WAXED_WEATHERED_COPPER_WASHER, Item.Properties()))
|
||||
@JvmField
|
||||
val WAXED_OXIDIZED_COPPER_WASHER = this.create("waxed_oxidized_copper_washer", BlockItem(CobblemonBlocks.WAXED_OXIDIZED_COPPER_WASHER, Item.Properties()))
|
||||
@JvmField
|
||||
val COPPER_FAN = this.create("copper_fan", BlockItem(CobblemonBlocks.COPPER_FAN, Item.Properties()))
|
||||
@JvmField
|
||||
val EXPOSED_COPPER_FAN = this.create("exposed_copper_fan", BlockItem(CobblemonBlocks.EXPOSED_COPPER_FAN, Item.Properties()))
|
||||
@JvmField
|
||||
val WEATHERED_COPPER_FAN = this.create("weathered_copper_fan", BlockItem(CobblemonBlocks.WEATHERED_COPPER_FAN, Item.Properties()))
|
||||
@JvmField
|
||||
val OXIDIZED_COPPER_FAN = this.create("oxidized_copper_fan", BlockItem(CobblemonBlocks.OXIDIZED_COPPER_FAN, Item.Properties()))
|
||||
@JvmField
|
||||
val WAXED_COPPER_FAN = this.create("waxed_copper_fan", BlockItem(CobblemonBlocks.WAXED_COPPER_FAN, Item.Properties()))
|
||||
@JvmField
|
||||
val WAXED_EXPOSED_COPPER_FAN = this.create("waxed_exposed_copper_fan", BlockItem(CobblemonBlocks.WAXED_EXPOSED_COPPER_FAN, Item.Properties()))
|
||||
@JvmField
|
||||
val WAXED_WEATHERED_COPPER_FAN = this.create("waxed_weathered_copper_fan", BlockItem(CobblemonBlocks.WAXED_WEATHERED_COPPER_FAN, Item.Properties()))
|
||||
@JvmField
|
||||
val WAXED_OXIDIZED_COPPER_FAN = this.create("waxed_oxidized_copper_fan", BlockItem(CobblemonBlocks.WAXED_OXIDIZED_COPPER_FAN, Item.Properties()))
|
||||
@JvmField
|
||||
val COPPER_MOWER = this.create("copper_mower", BlockItem(CobblemonBlocks.COPPER_MOWER, Item.Properties()))
|
||||
@JvmField
|
||||
val EXPOSED_COPPER_MOWER = this.create("exposed_copper_mower", BlockItem(CobblemonBlocks.EXPOSED_COPPER_MOWER, Item.Properties()))
|
||||
@JvmField
|
||||
val WEATHERED_COPPER_MOWER = this.create("weathered_copper_mower", BlockItem(CobblemonBlocks.WEATHERED_COPPER_MOWER, Item.Properties()))
|
||||
@JvmField
|
||||
val OXIDIZED_COPPER_MOWER = this.create("oxidized_copper_mower", BlockItem(CobblemonBlocks.OXIDIZED_COPPER_MOWER, Item.Properties()))
|
||||
@JvmField
|
||||
val WAXED_COPPER_MOWER = this.create("waxed_copper_mower", BlockItem(CobblemonBlocks.WAXED_COPPER_MOWER, Item.Properties()))
|
||||
@JvmField
|
||||
val WAXED_EXPOSED_COPPER_MOWER = this.create("waxed_exposed_copper_mower", BlockItem(CobblemonBlocks.WAXED_EXPOSED_COPPER_MOWER, Item.Properties()))
|
||||
@JvmField
|
||||
val WAXED_WEATHERED_COPPER_MOWER = this.create("waxed_weathered_copper_mower", BlockItem(CobblemonBlocks.WAXED_WEATHERED_COPPER_MOWER, Item.Properties()))
|
||||
@JvmField
|
||||
val WAXED_OXIDIZED_COPPER_MOWER = this.create("waxed_oxidized_copper_mower", BlockItem(CobblemonBlocks.WAXED_OXIDIZED_COPPER_MOWER, Item.Properties()))
|
||||
@JvmField
|
||||
val COPPER_FRIDGE = this.create("copper_fridge", BlockItem(CobblemonBlocks.COPPER_FRIDGE, Item.Properties()))
|
||||
@JvmField
|
||||
val EXPOSED_COPPER_FRIDGE = this.create("exposed_copper_fridge", BlockItem(CobblemonBlocks.EXPOSED_COPPER_FRIDGE, Item.Properties()))
|
||||
@JvmField
|
||||
val WEATHERED_COPPER_FRIDGE = this.create("weathered_copper_fridge", BlockItem(CobblemonBlocks.WEATHERED_COPPER_FRIDGE, Item.Properties()))
|
||||
@JvmField
|
||||
val OXIDIZED_COPPER_FRIDGE = this.create("oxidized_copper_fridge", BlockItem(CobblemonBlocks.OXIDIZED_COPPER_FRIDGE, Item.Properties()))
|
||||
@JvmField
|
||||
val WAXED_COPPER_FRIDGE = this.create("waxed_copper_fridge", BlockItem(CobblemonBlocks.WAXED_COPPER_FRIDGE, Item.Properties()))
|
||||
@JvmField
|
||||
val WAXED_EXPOSED_COPPER_FRIDGE = this.create("waxed_exposed_copper_fridge", BlockItem(CobblemonBlocks.WAXED_EXPOSED_COPPER_FRIDGE, Item.Properties()))
|
||||
@JvmField
|
||||
val WAXED_WEATHERED_COPPER_FRIDGE = this.create("waxed_weathered_copper_fridge", BlockItem(CobblemonBlocks.WAXED_WEATHERED_COPPER_FRIDGE, Item.Properties()))
|
||||
@JvmField
|
||||
val WAXED_OXIDIZED_COPPER_FRIDGE = this.create("waxed_oxidized_copper_fridge", BlockItem(CobblemonBlocks.WAXED_OXIDIZED_COPPER_FRIDGE, Item.Properties()))
|
||||
|
||||
// Type Gems
|
||||
@JvmField
|
||||
val NORMAL_GEM = this.create("normal_gem", GemItem(Item.Properties(), CobblemonBlocks.TYPE_GEM_CLUSTER_NORMAL))
|
||||
@@ -1599,7 +1675,16 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
|
||||
|
||||
private fun wearableItem(name: String, heldItemRemappedName: String? = null): CobblemonItem = create(
|
||||
name,
|
||||
WearableItem(name).also {
|
||||
WearableHatItem(name).also {
|
||||
wearables.add(it)
|
||||
if (heldItemRemappedName != null) {
|
||||
CobblemonHeldItemManager.registerRemap(it, heldItemRemappedName)
|
||||
}
|
||||
}
|
||||
)
|
||||
private fun wearableBlockItem(name: String, block: Block, heldItemRemappedName: String? = null): WearableBlockItem = create(
|
||||
name,
|
||||
WearableBlockItem(name, block).also {
|
||||
wearables.add(it)
|
||||
if (heldItemRemappedName != null) {
|
||||
CobblemonHeldItemManager.registerRemap(it, heldItemRemappedName)
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.api.data
|
||||
|
||||
import com.cobblemon.mod.common.util.endsWith
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.reflect.TypeToken
|
||||
import net.minecraft.core.HolderLookup
|
||||
import java.io.BufferedReader
|
||||
import java.io.File
|
||||
import java.util.concurrent.ExecutionException
|
||||
import net.minecraft.resources.ResourceLocation
|
||||
import net.minecraft.server.packs.PackType
|
||||
import net.minecraft.server.packs.resources.ResourceManager
|
||||
|
||||
/**
|
||||
* A [DataRegistry] that consumes JSON files.
|
||||
* Every deserialized instance is attached to an [Identifier].
|
||||
* For example a file under data/mymod/[resourcePath]/entry.json would be backed by the identifier modid:entry.
|
||||
*
|
||||
* @param T The type of the data consumed by this registry.
|
||||
*
|
||||
* @author Licious
|
||||
* @since August 5th, 2022
|
||||
*/
|
||||
interface ServerJsonDataRegistry<T> : DataRegistry {
|
||||
|
||||
/**
|
||||
* The [TypeToken] of type [T].
|
||||
*/
|
||||
val typeToken: TypeToken<T>
|
||||
|
||||
/**
|
||||
* The folder location for the data this registry will consume.
|
||||
*/
|
||||
val resourcePath: String
|
||||
|
||||
override val type: PackType
|
||||
get() = PackType.SERVER_DATA
|
||||
|
||||
override fun reload(manager: ResourceManager) {
|
||||
//NO-OP, handled by reload(manager, registry)
|
||||
}
|
||||
|
||||
fun reload(manager: ResourceManager, registry: HolderLookup.Provider) {
|
||||
val gson = setupParser(registry)
|
||||
val data = hashMapOf<ResourceLocation, T>()
|
||||
manager.listResources(resourcePath) { path -> path.endsWith(JSON_EXTENSION) }.forEach { (identifier, resource) ->
|
||||
if (identifier.namespace == "pixelmon") {
|
||||
return@forEach
|
||||
}
|
||||
|
||||
resource.open().use { stream ->
|
||||
stream.bufferedReader().use { reader ->
|
||||
val resolvedIdentifier = ResourceLocation.fromNamespaceAndPath(identifier.namespace, File(identifier.path).nameWithoutExtension)
|
||||
data[resolvedIdentifier] = parse(reader, resolvedIdentifier, gson)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
reload(data, registry)
|
||||
}
|
||||
|
||||
fun parse(reader: BufferedReader, identifier: ResourceLocation, gson: Gson): T {
|
||||
return try {
|
||||
gson.fromJson(reader, typeToken.type)
|
||||
} catch (exception: Exception) {
|
||||
throw ExecutionException("Error loading JSON for data: $identifier", exception)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows the creation of [Gson] instances which have adapters that are registry-aware, e.g. [com.cobblemon.mod.common.pokemon.evolution.adapters.LegacyItemConditionWrapperAdapter]
|
||||
*/
|
||||
fun setupParser(registry: HolderLookup.Provider): Gson
|
||||
|
||||
/**
|
||||
* Reloads this registry from the deserialized data.
|
||||
*
|
||||
* @param data A map of the data associating an instance to the respective identifier from the [ResourceManager].
|
||||
*/
|
||||
fun reload(data: Map<ResourceLocation, T>, registry: HolderLookup.Provider)
|
||||
|
||||
companion object {
|
||||
const val JSON_EXTENSION = ".json"
|
||||
}
|
||||
}
|
||||
@@ -40,7 +40,7 @@ object Fossils: JsonDataRegistry<Fossil> {
|
||||
.registerTypeAdapter(ResourceLocation::class.java, IdentifierAdapter)
|
||||
.registerTypeAdapter(PokemonProperties::class.java, pokemonPropertiesShortAdapter)
|
||||
.registerTypeAdapter(TypeToken.getParameterized(RegistryLikeCondition::class.java, Item::class.java).type, ItemLikeConditionAdapter)
|
||||
.registerTypeAdapter(ItemPredicate::class.java, LegacyItemConditionWrapperAdapter)
|
||||
.registerTypeAdapter(ItemPredicate::class.java, LegacyItemConditionWrapperAdapter())
|
||||
.create()
|
||||
|
||||
override val typeToken: TypeToken<Fossil> = TypeToken.get(Fossil::class.java)
|
||||
|
||||
+24
-20
@@ -10,7 +10,7 @@ package com.cobblemon.mod.common.api.interaction
|
||||
|
||||
import com.cobblemon.mod.common.Cobblemon
|
||||
import com.cobblemon.mod.common.api.conditional.RegistryLikeCondition
|
||||
import com.cobblemon.mod.common.api.data.JsonDataRegistry
|
||||
import com.cobblemon.mod.common.api.data.ServerJsonDataRegistry
|
||||
import com.cobblemon.mod.common.api.molang.ExpressionLike
|
||||
import com.cobblemon.mod.common.api.pokemon.PokemonProperties
|
||||
import com.cobblemon.mod.common.api.pokemon.requirement.Requirement
|
||||
@@ -26,6 +26,7 @@ import com.google.gson.Gson
|
||||
import com.google.gson.GsonBuilder
|
||||
import com.google.gson.reflect.TypeToken
|
||||
import net.minecraft.advancements.critereon.ItemPredicate
|
||||
import net.minecraft.core.HolderLookup
|
||||
import net.minecraft.resources.ResourceLocation
|
||||
import net.minecraft.server.level.ServerPlayer
|
||||
import net.minecraft.server.packs.PackType
|
||||
@@ -36,28 +37,31 @@ import net.minecraft.world.level.block.Block
|
||||
import net.minecraft.world.level.levelgen.structure.Structure
|
||||
import net.minecraft.world.level.material.Fluid
|
||||
|
||||
object PokemonInteractions : JsonDataRegistry<PokemonInteractionSet> {
|
||||
object PokemonInteractions : ServerJsonDataRegistry<PokemonInteractionSet> {
|
||||
override val id = cobblemonResource("pokemon_interactions")
|
||||
override val type = PackType.SERVER_DATA
|
||||
override fun setupParser(registry: HolderLookup.Provider): Gson {
|
||||
return GsonBuilder()
|
||||
.registerTypeAdapter(ResourceLocation::class.java, IdentifierAdapter)
|
||||
.registerTypeAdapter(PokemonProperties::class.java, pokemonPropertiesShortAdapter)
|
||||
.registerTypeAdapter(ItemPredicate::class.java, LegacyItemConditionWrapperAdapter(registry))
|
||||
.registerTypeAdapter(Requirement::class.java, CobblemonRequirementAdapter)
|
||||
.registerTypeAdapter(InteractionEffect::class.java, InteractionEffectAdapter)
|
||||
.registerTypeAdapter(ExpressionLike::class.java, ExpressionLikeAdapter)
|
||||
.registerTypeAdapter(TypeToken.getParameterized(RegistryLikeCondition::class.java, Biome::class.java).type, BiomeLikeConditionAdapter)
|
||||
.registerTypeAdapter(TypeToken.getParameterized(RegistryLikeCondition::class.java, Block::class.java).type, BlockLikeConditionAdapter)
|
||||
.registerTypeAdapter(TypeToken.getParameterized(RegistryLikeCondition::class.java, Item::class.java).type, ItemLikeConditionAdapter)
|
||||
.registerTypeAdapter(TypeToken.getParameterized(RegistryLikeCondition::class.java, Structure::class.java).type, StructureLikeConditionAdapter)
|
||||
.registerTypeAdapter(TypeToken.getParameterized(RegistryLikeCondition::class.java, Fluid::class.java).type, FluidLikeConditionAdapter)
|
||||
.registerTypeAdapter(IntRange::class.java, IntRangeAdapter)
|
||||
.registerTypeAdapterFactory(LowerCaseEnumTypeAdapterFactory())
|
||||
.setPrettyPrinting()
|
||||
.create()
|
||||
}
|
||||
|
||||
override val observable = SimpleObservable<PokemonInteractions>()
|
||||
override val typeToken: TypeToken<PokemonInteractionSet> = TypeToken.get(PokemonInteractionSet::class.java)
|
||||
override val resourcePath = "pokemon_interactions"
|
||||
override val gson: Gson = GsonBuilder()
|
||||
.registerTypeAdapter(ResourceLocation::class.java, IdentifierAdapter)
|
||||
.registerTypeAdapter(PokemonProperties::class.java, pokemonPropertiesShortAdapter)
|
||||
.registerTypeAdapter(ItemPredicate::class.java, LegacyItemConditionWrapperAdapter)
|
||||
.registerTypeAdapter(Requirement::class.java, CobblemonRequirementAdapter)
|
||||
.registerTypeAdapter(InteractionEffect::class.java, InteractionEffectAdapter)
|
||||
.registerTypeAdapter(ExpressionLike::class.java, ExpressionLikeAdapter)
|
||||
.registerTypeAdapter(TypeToken.getParameterized(RegistryLikeCondition::class.java, Biome::class.java).type, BiomeLikeConditionAdapter)
|
||||
.registerTypeAdapter(TypeToken.getParameterized(RegistryLikeCondition::class.java, Block::class.java).type, BlockLikeConditionAdapter)
|
||||
.registerTypeAdapter(TypeToken.getParameterized(RegistryLikeCondition::class.java, Item::class.java).type, ItemLikeConditionAdapter)
|
||||
.registerTypeAdapter(TypeToken.getParameterized(RegistryLikeCondition::class.java, Structure::class.java).type, StructureLikeConditionAdapter)
|
||||
.registerTypeAdapter(TypeToken.getParameterized(RegistryLikeCondition::class.java, Fluid::class.java).type, FluidLikeConditionAdapter)
|
||||
.registerTypeAdapter(IntRange::class.java, IntRangeAdapter)
|
||||
.registerTypeAdapterFactory(LowerCaseEnumTypeAdapterFactory())
|
||||
.setPrettyPrinting()
|
||||
.create()
|
||||
|
||||
val interactions = mutableListOf<PokemonInteractionSet>()
|
||||
|
||||
@@ -65,7 +69,7 @@ object PokemonInteractions : JsonDataRegistry<PokemonInteractionSet> {
|
||||
PokemonInteractionsSyncPacket(interactions).sendToPlayer(player)
|
||||
}
|
||||
|
||||
override fun reload(data: Map<ResourceLocation, PokemonInteractionSet>) {
|
||||
override fun reload(data: Map<ResourceLocation, PokemonInteractionSet>, registry: HolderLookup.Provider) {
|
||||
interactions.clear()
|
||||
val split = data.entries
|
||||
.partition {
|
||||
@@ -87,4 +91,4 @@ object PokemonInteractions : JsonDataRegistry<PokemonInteractionSet> {
|
||||
.flatMap { it.interactions }
|
||||
.firstOrNull(interactionCheck)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+5
@@ -55,6 +55,11 @@ object GeneralMoLangFunctions {
|
||||
struct.map.remove(variable)
|
||||
DoubleValue.ONE
|
||||
}
|
||||
functions["delete_variables"] = { params ->
|
||||
val struct = params.get<VariableStruct>(0)
|
||||
struct.map.clear()
|
||||
DoubleValue.ONE
|
||||
}
|
||||
functions["get_variable"] = { params ->
|
||||
val struct = params.get<VariableStruct>(0)
|
||||
val variable = params.getString(1)
|
||||
|
||||
+22
@@ -16,6 +16,7 @@ import com.cobblemon.mod.common.api.molang.ObjectValue
|
||||
import com.cobblemon.mod.common.api.pokedex.AbstractPokedexManager
|
||||
import com.cobblemon.mod.common.api.pokedex.CaughtCount
|
||||
import com.cobblemon.mod.common.api.pokedex.CaughtPercent
|
||||
import com.cobblemon.mod.common.api.pokedex.Dexes
|
||||
import com.cobblemon.mod.common.api.pokedex.PokedexEntryProgress
|
||||
import com.cobblemon.mod.common.api.pokedex.PokedexManager
|
||||
import com.cobblemon.mod.common.api.pokedex.SeenCount
|
||||
@@ -74,6 +75,27 @@ object PokedexMoLangFunctions : AbstractMoLangFunctionHolder<AbstractPokedexMana
|
||||
functions["caught_percent"] = { DoubleValue(pokedex.getGlobalCalculatedValue(CaughtPercent)) }
|
||||
functions["seen_percent"] = { DoubleValue(pokedex.getGlobalCalculatedValue(SeenPercent)) }
|
||||
|
||||
functions["dex_caught_count"] = { params ->
|
||||
val dexId = params.getString(0).asIdentifierDefaultingNamespace()
|
||||
if (Dexes.dexEntryMap.containsKey(dexId)) DoubleValue(pokedex.getDexCalculatedValue(dexId, CaughtCount))
|
||||
else DoubleValue.ZERO
|
||||
}
|
||||
functions["dex_seen_count"] = { params ->
|
||||
val dexId = params.getString(0).asIdentifierDefaultingNamespace()
|
||||
if (Dexes.dexEntryMap.containsKey(dexId)) DoubleValue(pokedex.getDexCalculatedValue(dexId, SeenCount))
|
||||
else DoubleValue.ZERO
|
||||
}
|
||||
functions["dex_caught_percent"] = { params ->
|
||||
val dexId = params.getString(0).asIdentifierDefaultingNamespace()
|
||||
if (Dexes.dexEntryMap.containsKey(dexId)) DoubleValue(pokedex.getDexCalculatedValue(dexId, CaughtPercent).toDouble())
|
||||
else DoubleValue.ZERO
|
||||
}
|
||||
functions["dex_seen_percent"] = { params ->
|
||||
val dexId = params.getString(0).asIdentifierDefaultingNamespace()
|
||||
if (Dexes.dexEntryMap.containsKey(dexId)) DoubleValue(pokedex.getDexCalculatedValue(dexId, SeenPercent).toDouble())
|
||||
else DoubleValue.ZERO
|
||||
}
|
||||
|
||||
when (pokedex) {
|
||||
is PokedexManager -> {
|
||||
functions["player_id"] = { StringValue(pokedex.uuid.toString()) }
|
||||
|
||||
+23
-7
@@ -8,8 +8,10 @@
|
||||
|
||||
package com.cobblemon.mod.common.api.orientation
|
||||
|
||||
import com.cobblemon.mod.common.util.math.QuatSpring
|
||||
import com.cobblemon.mod.common.util.math.geometry.toDegrees
|
||||
import com.cobblemon.mod.common.util.math.geometry.toRadians
|
||||
import com.cobblemon.mod.common.util.math.simpleSpringDamperQuat
|
||||
import net.minecraft.client.Minecraft
|
||||
import net.minecraft.util.Mth
|
||||
import net.minecraft.world.entity.LivingEntity
|
||||
@@ -26,6 +28,8 @@ open class OrientationController(val entity: LivingEntity) {
|
||||
val FORWARDS: Vector3f = Vector3f(0.0f, 0.0f, -1.0f)
|
||||
val UP: Vector3f = Vector3f(0.0f, 1.0f, 0.0f)
|
||||
val LEFT: Vector3f = Vector3f(-1.0f, 0.0f, 0.0f)
|
||||
private const val TICK_DT = 1f / 20f // Minecraft server tick rate
|
||||
private const val RENDER_SMOOTH_HALFLIFE = 0.1f // seconds to close ~half the gap
|
||||
}
|
||||
|
||||
open var active: Boolean = false
|
||||
@@ -33,6 +37,8 @@ open class OrientationController(val entity: LivingEntity) {
|
||||
var orientation: Matrix3f? = null
|
||||
private set
|
||||
|
||||
private val renderSpring = QuatSpring()
|
||||
|
||||
private var renderOrientationO: Matrix3f? = null
|
||||
private var renderOrientation: Matrix3f? = null
|
||||
|
||||
@@ -54,6 +60,8 @@ open class OrientationController(val entity: LivingEntity) {
|
||||
orientation = null
|
||||
renderOrientationO = null
|
||||
renderOrientation = null
|
||||
renderSpring.quat.identity()
|
||||
renderSpring.angVel.set(0f, 0f, 0f)
|
||||
active = false
|
||||
}
|
||||
|
||||
@@ -77,18 +85,26 @@ open class OrientationController(val entity: LivingEntity) {
|
||||
return oldQuat
|
||||
}
|
||||
|
||||
/** Every tick move the current render orientation towards the last known true orientation **/
|
||||
fun tick() {
|
||||
if (!active || orientation == null) return
|
||||
renderOrientationO = renderOrientation
|
||||
val current = orientation
|
||||
val renderMatrix = this.renderOrientation ?: current
|
||||
val renderQuat = Quaternionf().setFromUnnormalized(renderMatrix)
|
||||
val targetQuat = Quaternionf().setFromUnnormalized(current)
|
||||
val dampingFactor = 0.66f // Smooth interpolation to reduce jitter of orientations recieved from the server.
|
||||
renderQuat.slerp(targetQuat, dampingFactor)
|
||||
val current = orientation!!
|
||||
val targetQuat = Quaternionf().setFromUnnormalized(current)
|
||||
|
||||
if (renderOrientation == null) {
|
||||
// First tick: snap the spring to the target instead of easing in from identity
|
||||
renderSpring.quat.set(targetQuat)
|
||||
renderSpring.angVel.set(0f, 0f, 0f)
|
||||
}
|
||||
|
||||
// Use a "quat spring" to smoothly move the render orientation towards the goal orientation.
|
||||
// It takes into account the orientations angular velocities and should be much more resilient
|
||||
// to sharp changes in goal orientation or late/missed packets.
|
||||
simpleSpringDamperQuat(renderSpring, targetQuat, 0.15f, TICK_DT)
|
||||
|
||||
val newRenderOrientation = Matrix3f()
|
||||
renderQuat.get(newRenderOrientation)
|
||||
renderSpring.quat.get(newRenderOrientation)
|
||||
renderOrientation = newRenderOrientation
|
||||
}
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ object PokemonSpecies : JsonDataRegistry<Species> {
|
||||
.registerTypeAdapter(TypeToken.getParameterized(RegistryLikeCondition::class.java, Fluid::class.java).type, FluidLikeConditionAdapter)
|
||||
.registerTypeAdapter(EggGroup::class.java, EggGroupAdapter)
|
||||
.registerTypeAdapter(MobEffect::class.java, RegistryElementAdapter<MobEffect>(BuiltInRegistries::MOB_EFFECT))
|
||||
.registerTypeAdapter(ItemPredicate::class.java, LegacyItemConditionWrapperAdapter)
|
||||
.registerTypeAdapter(ItemPredicate::class.java, LegacyItemConditionWrapperAdapter())
|
||||
.registerTypeAdapter(RidingBehaviourSettings::class.java, RidingBehaviourSettingsAdapter)
|
||||
.registerTypeAdapter(RideSoundSettingsList::class.java, RideSoundSettingsListAdapter)
|
||||
.registerTypeAdapter(ObtainableItemCondition::class.java, ObtainableItemConditionAdapter)
|
||||
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.api.riding.util
|
||||
|
||||
import net.minecraft.core.BlockPos
|
||||
import net.minecraft.world.level.BlockGetter
|
||||
import net.minecraft.world.phys.AABB
|
||||
import kotlin.math.floor
|
||||
|
||||
/**
|
||||
* Walks every block position inside [searchBox] and turns each solid block into one
|
||||
* full-cube [FieldPrimitive].
|
||||
*
|
||||
* @author Jackson
|
||||
* @since July 27th, 2026
|
||||
*/
|
||||
|
||||
fun collectPrimitivesFromBlocks(
|
||||
level: BlockGetter,
|
||||
searchBox: AABB,
|
||||
shape: PrimitiveShape,
|
||||
includeFluids: Boolean = false
|
||||
): List<FieldPrimitive> {
|
||||
val primitives = mutableListOf<FieldPrimitive>()
|
||||
|
||||
val minX = floor(searchBox.minX).toInt()
|
||||
val maxX = floor(searchBox.maxX).toInt()
|
||||
val minY = floor(searchBox.minY).toInt()
|
||||
val maxY = floor(searchBox.maxY).toInt()
|
||||
val minZ = floor(searchBox.minZ).toInt()
|
||||
val maxZ = floor(searchBox.maxZ).toInt()
|
||||
|
||||
val pos = BlockPos.MutableBlockPos()
|
||||
for (x in minX..maxX) {
|
||||
for (y in minY..maxY) {
|
||||
for (z in minZ..maxZ) {
|
||||
pos.set(x, y, z)
|
||||
val state = level.getBlockState(pos)
|
||||
|
||||
val isSolid = !state.getCollisionShape(level, pos).isEmpty
|
||||
val isFluid = includeFluids && !state.fluidState.isEmpty
|
||||
if (!isSolid && !isFluid) continue
|
||||
|
||||
primitives.add(
|
||||
FieldPrimitive(
|
||||
shape = shape,
|
||||
centerX = x + 0.5f, centerY = y + 0.5f, centerZ = z + 0.5f,
|
||||
halfWidth = 0.5f, halfHeight = 0.5f, halfDepth = 0.5f
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return primitives
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.api.riding.util
|
||||
|
||||
import net.minecraft.world.phys.Vec3
|
||||
import kotlin.math.abs
|
||||
import kotlin.math.max
|
||||
import kotlin.math.min
|
||||
import kotlin.math.sqrt
|
||||
|
||||
/**
|
||||
* Helpful Functions when working with signed distance fields/functions.
|
||||
* https://iquilezles.org/articles/distfunctions/
|
||||
*
|
||||
* @author Jackson
|
||||
* @since July 27th, 2026
|
||||
*/
|
||||
|
||||
/** Which distance formula a primitive uses. */
|
||||
enum class PrimitiveShape {
|
||||
BOX,
|
||||
ROUNDED_BOX,
|
||||
ELLIPSOID
|
||||
}
|
||||
|
||||
/** Tunable constants for the field. */
|
||||
data class DistanceFieldTuning(
|
||||
val smoothingRange: Float = 0.5f,
|
||||
val roundingRadius: Float = 0.08f
|
||||
)
|
||||
|
||||
/** A single shape in the field - a center position, half-extents, and which formula to use. */
|
||||
data class FieldPrimitive(
|
||||
val shape: PrimitiveShape,
|
||||
val centerX: Float, val centerY: Float, val centerZ: Float,
|
||||
val halfWidth: Float, val halfHeight: Float, val halfDepth: Float
|
||||
)
|
||||
|
||||
/** Fast approximate 1/sqrt(x) - the Quake III trick, cheaper than a real sqrt + divide. */
|
||||
fun fastInverseSqrt(value: Float): Float {
|
||||
var x = value
|
||||
val halfX = 0.5f * x
|
||||
var bits = java.lang.Float.floatToIntBits(x)
|
||||
bits = 0x5f3759df - (bits shr 1)
|
||||
x = java.lang.Float.intBitsToFloat(bits)
|
||||
x *= (1.5f - halfX * x * x)
|
||||
return x
|
||||
}
|
||||
|
||||
/** Exact distance from a point to an axis-aligned box. Inputs are relative to the box's own center. */
|
||||
fun boxDistance(relX: Float, relY: Float, relZ: Float, halfWidth: Float, halfHeight: Float, halfDepth: Float): Float {
|
||||
val qx = abs(relX) - halfWidth
|
||||
val qy = abs(relY) - halfHeight
|
||||
val qz = abs(relZ) - halfDepth
|
||||
val ox = max(qx, 0f)
|
||||
val oy = max(qy, 0f)
|
||||
val oz = max(qz, 0f)
|
||||
val outside = sqrt(ox * ox + oy * oy + oz * oz)
|
||||
val inside = min(max(qx, max(qy, qz)), 0f)
|
||||
return outside + inside
|
||||
}
|
||||
|
||||
/** Same as boxDistance but with rounded corners/edges https://iquilezles.org/articles/distfunctions/ */
|
||||
fun roundedBoxDistance(relX: Float, relY: Float, relZ: Float, halfWidth: Float, halfHeight: Float, halfDepth: Float, roundingRadius: Float): Float =
|
||||
boxDistance(relX, relY, relZ, halfWidth - roundingRadius, halfHeight - roundingRadius, halfDepth - roundingRadius) - roundingRadius
|
||||
|
||||
/** Approximate (lower-bound) distance to an ellipsoid https://iquilezles.org/articles/ellipsoids/. */
|
||||
fun ellipsoidDistance(relX: Float, relY: Float, relZ: Float, halfWidth: Float, halfHeight: Float, halfDepth: Float): Float {
|
||||
val px = relX / halfWidth
|
||||
val py = relY / halfHeight
|
||||
val pz = relZ / halfDepth
|
||||
val inverseMagnitude = fastInverseSqrt(px * px + py * py + pz * pz)
|
||||
val trueDistance = sqrt(relX * relX + relY * relY + relZ * relZ)
|
||||
return trueDistance * (1.0f - inverseMagnitude)
|
||||
}
|
||||
|
||||
/** Distance from a point to one primitive, dispatched by its shape. */
|
||||
fun distanceToPrimitive(primitive: FieldPrimitive, sampleX: Float, sampleY: Float, sampleZ: Float, tuning: DistanceFieldTuning): Float {
|
||||
val relX = sampleX - primitive.centerX
|
||||
val relY = sampleY - primitive.centerY
|
||||
val relZ = sampleZ - primitive.centerZ
|
||||
return when (primitive.shape) {
|
||||
PrimitiveShape.BOX -> boxDistance(relX, relY, relZ, primitive.halfWidth, primitive.halfHeight, primitive.halfDepth)
|
||||
PrimitiveShape.ROUNDED_BOX -> roundedBoxDistance(relX, relY, relZ, primitive.halfWidth, primitive.halfHeight, primitive.halfDepth, tuning.roundingRadius)
|
||||
PrimitiveShape.ELLIPSOID -> ellipsoidDistance(relX, relY, relZ, primitive.halfWidth, primitive.halfHeight, primitive.halfDepth)
|
||||
}
|
||||
}
|
||||
|
||||
///** Normalized quadratic smooth-min https://iquilezles.org/articles/smin/ */
|
||||
//fun smoothMinimum(a: Float, b: Float, smoothingRange: Float): Float {
|
||||
// if (smoothingRange <= 0.001f) return min(a, b)
|
||||
// val k = smoothingRange * 4.0f
|
||||
// val h = (0.5f + 0.5f * (b - a) / k).coerceIn(0f, 1f)
|
||||
// return b + (a - b) * h - k * h * (1f - h)
|
||||
//}
|
||||
//
|
||||
///** Folds every primitive's distance together into one field value at a point. */
|
||||
//fun sampleField(primitives: List<FieldPrimitive>, sampleX: Float, sampleY: Float, sampleZ: Float, tuning: DistanceFieldTuning): Float {
|
||||
// var result = Float.POSITIVE_INFINITY
|
||||
// for (primitive in primitives) {
|
||||
// val distance = distanceToPrimitive(primitive, sampleX, sampleY, sampleZ, tuning)
|
||||
// result = if (result == Float.POSITIVE_INFINITY) distance else smoothMinimum(result, distance, tuning.smoothingRange)
|
||||
// }
|
||||
// return result
|
||||
//}
|
||||
|
||||
/** Normalized quadratic smooth-min https://iquilezles.org/articles/smin/ */
|
||||
fun smoothMinimum(a: Float, b: Float, smoothingRange: Float): Float {
|
||||
if (smoothingRange <= 0.001f) return min(a, b)
|
||||
val k = smoothingRange * 4.0f
|
||||
val h = (0.5f + 0.5f * (b - a) / k).coerceIn(0f, 1f)
|
||||
return b + (a - b) * h - k * h * (1f - h)
|
||||
}
|
||||
|
||||
/** Folds nearby primitive distances together into one field value at a point. */
|
||||
fun sampleField(primitives: List<FieldPrimitive>, sampleX: Float, sampleY: Float, sampleZ: Float, tuning: DistanceFieldTuning): Float {
|
||||
if (primitives.isEmpty()) return Float.POSITIVE_INFINITY
|
||||
|
||||
val distances = FloatArray(primitives.size) { distanceToPrimitive(primitives[it], sampleX, sampleY, sampleZ, tuning) }
|
||||
val minDistance = distances.min()
|
||||
|
||||
if (tuning.smoothingRange <= 0.001f) return minDistance
|
||||
|
||||
// Anything more than a few blend-widths past the closest primitive is cut - its
|
||||
// contribution would be negligible in a correct blend anyway, but left in, it still
|
||||
// drags the chained result down the more of them there are.
|
||||
val cutoff = tuning.smoothingRange * 3f
|
||||
|
||||
var result = Float.POSITIVE_INFINITY
|
||||
for (distance in distances) {
|
||||
if (distance - minDistance > cutoff) continue
|
||||
result = if (result == Float.POSITIVE_INFINITY) distance else smoothMinimum(result, distance, tuning.smoothingRange)
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
/** Finite-difference gradient of the field at a point - points away from the surface, magnitude ~1 for a clean field. */
|
||||
fun estimateGradient(primitives: List<FieldPrimitive>, point: Vec3, tuning: DistanceFieldTuning, epsilon: Float = 0.05f): Vec3 {
|
||||
val px = point.x.toFloat()
|
||||
val py = point.y.toFloat()
|
||||
val pz = point.z.toFloat()
|
||||
|
||||
val dx = sampleField(primitives, px + epsilon, py, pz, tuning) - sampleField(primitives, px - epsilon, py, pz, tuning)
|
||||
val dy = sampleField(primitives, px, py + epsilon, pz, tuning) - sampleField(primitives, px, py - epsilon, pz, tuning)
|
||||
val dz = sampleField(primitives, px, py, pz + epsilon, tuning) - sampleField(primitives, px, py, pz - epsilon, tuning)
|
||||
|
||||
val gradient = Vec3(dx.toDouble(), dy.toDouble(), dz.toDouble())
|
||||
return if (gradient.lengthSqr() > 1e-8) gradient.normalize() else Vec3(0.0, 1.0, 0.0)
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.api.riding.util
|
||||
|
||||
import net.minecraft.core.particles.DustParticleOptions
|
||||
import net.minecraft.server.level.ServerLevel
|
||||
import net.minecraft.world.entity.Entity
|
||||
import net.minecraft.world.phys.AABB
|
||||
import net.minecraft.world.phys.Vec3
|
||||
import org.joml.Vector3f
|
||||
|
||||
/** One shell to draw - a target field value, a color, a particle size. */
|
||||
data class DistanceFieldLayer(
|
||||
val isoValue: Float,
|
||||
val color: Vector3f,
|
||||
val particleSize: Float = 1.0f
|
||||
)
|
||||
|
||||
/**
|
||||
* Marches a grid of vertical columns through the field around [center] and spawns a
|
||||
* particle everywhere it crosses one of [layers]' target values. Server-side only.
|
||||
*/
|
||||
fun visualizeDistanceField(
|
||||
referenceEntity: Entity,
|
||||
center: Vec3,
|
||||
layers: List<DistanceFieldLayer>,
|
||||
shape: PrimitiveShape = PrimitiveShape.BOX,
|
||||
horizontalRadius: Double = 4.0,
|
||||
verticalRange: Double = 4.0,
|
||||
sampleSpacing: Double = 0.5,
|
||||
marchStep: Double = 0.1,
|
||||
tuning: DistanceFieldTuning = DistanceFieldTuning()
|
||||
) {
|
||||
val level = referenceEntity.level()
|
||||
if (level !is ServerLevel) return
|
||||
|
||||
val searchBox = AABB(
|
||||
center.x - horizontalRadius, center.y - verticalRange, center.z - horizontalRadius,
|
||||
center.x + horizontalRadius, center.y, center.z + horizontalRadius
|
||||
)
|
||||
|
||||
val primitives = collectPrimitivesFromBlocks(level, searchBox, shape, includeFluids = true)
|
||||
if (primitives.isEmpty()) return
|
||||
|
||||
var x = -horizontalRadius
|
||||
while (x <= horizontalRadius) {
|
||||
var z = -horizontalRadius
|
||||
while (z <= horizontalRadius) {
|
||||
marchColumn(level, primitives, center, x, z, verticalRange, marchStep, layers, tuning)
|
||||
z += sampleSpacing
|
||||
}
|
||||
x += sampleSpacing
|
||||
}
|
||||
}
|
||||
|
||||
private fun marchColumn(
|
||||
level: ServerLevel,
|
||||
primitives: List<FieldPrimitive>,
|
||||
center: Vec3,
|
||||
offsetX: Double,
|
||||
offsetZ: Double,
|
||||
verticalRange: Double,
|
||||
marchStep: Double,
|
||||
layers: List<DistanceFieldLayer>,
|
||||
tuning: DistanceFieldTuning
|
||||
) {
|
||||
val previousValue = FloatArray(layers.size) { Float.NaN }
|
||||
|
||||
var y = verticalRange
|
||||
while (y >= -verticalRange) {
|
||||
val worldX = (center.x + offsetX).toFloat()
|
||||
val worldY = (center.y + y).toFloat()
|
||||
val worldZ = (center.z + offsetZ).toFloat()
|
||||
val fieldValue = sampleField(primitives, worldX, worldY, worldZ, tuning)
|
||||
|
||||
for (layerIndex in layers.indices) {
|
||||
val layer = layers[layerIndex]
|
||||
val previous = previousValue[layerIndex]
|
||||
|
||||
if (!previous.isNaN() && crossedTarget(previous, fieldValue, layer.isoValue)) {
|
||||
val t = (layer.isoValue - previous) / (fieldValue - previous)
|
||||
val crossingY = (y + marchStep) - marchStep * t
|
||||
spawnLayerParticle(level, center.add(offsetX, crossingY, offsetZ), layer)
|
||||
}
|
||||
|
||||
previousValue[layerIndex] = fieldValue
|
||||
}
|
||||
|
||||
y -= marchStep
|
||||
}
|
||||
}
|
||||
|
||||
private fun crossedTarget(previous: Float, current: Float, target: Float): Boolean =
|
||||
(previous - target) * (current - target) < 0f
|
||||
|
||||
private fun spawnLayerParticle(level: ServerLevel, pos: Vec3, layer: DistanceFieldLayer) {
|
||||
val particle = DustParticleOptions(layer.color, layer.particleSize)
|
||||
level.sendParticles(particle, pos.x, pos.y, pos.z, 1, 0.0, 0.0, 0.0, 0.0)
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.block.decor
|
||||
|
||||
import com.cobblemon.mod.common.util.rotateShape
|
||||
import com.mojang.serialization.MapCodec
|
||||
import com.mojang.serialization.codecs.RecordCodecBuilder
|
||||
import net.minecraft.core.BlockPos
|
||||
import net.minecraft.core.Direction
|
||||
import net.minecraft.util.StringRepresentable
|
||||
import net.minecraft.world.InteractionResult
|
||||
import net.minecraft.world.entity.player.Player
|
||||
import net.minecraft.world.item.context.BlockPlaceContext
|
||||
import net.minecraft.world.level.BlockGetter
|
||||
import net.minecraft.world.level.Level
|
||||
import net.minecraft.world.level.LevelAccessor
|
||||
import net.minecraft.world.level.block.*
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
import net.minecraft.world.level.block.state.StateDefinition
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties.HORIZONTAL_FACING
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties.WATERLOGGED
|
||||
import net.minecraft.world.level.block.state.properties.BooleanProperty
|
||||
import net.minecraft.world.level.gameevent.GameEvent
|
||||
import net.minecraft.world.level.material.FluidState
|
||||
import net.minecraft.world.level.material.Fluids
|
||||
import net.minecraft.world.phys.BlockHitResult
|
||||
import net.minecraft.world.phys.shapes.CollisionContext
|
||||
import net.minecraft.world.phys.shapes.Shapes
|
||||
import net.minecraft.world.phys.shapes.VoxelShape
|
||||
|
||||
class ActivatableDecorationBlock(settings: Properties, val type: ActivatableDecorationBlockType) : HorizontalDirectionalBlock(settings), SimpleWaterloggedBlock {
|
||||
enum class ActivatableDecorationBlockType: StringRepresentable {
|
||||
//For basic use, also ignore camelcase errors, it's just dumb
|
||||
CENTERED_8x,
|
||||
//For specific items
|
||||
METRONOME;
|
||||
|
||||
override fun getSerializedName(): String = this.name.lowercase()
|
||||
|
||||
companion object {
|
||||
val CODEC = StringRepresentable.fromEnum(::values)
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
val CODEC: MapCodec<ActivatableDecorationBlock> = RecordCodecBuilder.mapCodec { it.group(
|
||||
propertiesCodec(),
|
||||
ActivatableDecorationBlockType.CODEC.fieldOf("type").forGetter(ActivatableDecorationBlock::type)
|
||||
).apply(it, ::ActivatableDecorationBlock) }
|
||||
val ACTIVE = BooleanProperty.create("active")
|
||||
|
||||
val CENTERED_8x = Shapes.box(0.25, 0.0, 0.25, 0.75, 0.5, 0.75)
|
||||
val METRONOME_HITBOX = Shapes.box(0.25, 0.0, 0.375, 0.75, 0.8125, 0.75)
|
||||
|
||||
fun getShape(type: ActivatableDecorationBlockType): VoxelShape {
|
||||
return when (type) {
|
||||
ActivatableDecorationBlockType.METRONOME -> METRONOME_HITBOX
|
||||
else -> CENTERED_8x
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
init {
|
||||
registerDefaultState(stateDefinition.any()
|
||||
.setValue(HORIZONTAL_FACING, Direction.NORTH)
|
||||
.setValue(ACTIVE, false)
|
||||
.setValue(WATERLOGGED, false)
|
||||
)
|
||||
}
|
||||
|
||||
override fun codec(): MapCodec<ActivatableDecorationBlock> = CODEC
|
||||
|
||||
override fun createBlockStateDefinition(builder: StateDefinition.Builder<Block, BlockState>) {
|
||||
builder.add(HORIZONTAL_FACING, ACTIVE, WATERLOGGED)
|
||||
}
|
||||
|
||||
override fun getFluidState(blockState: BlockState): FluidState? = if (blockState.getValue(WATERLOGGED)) Fluids.WATER.getSource(false) else super.getFluidState(blockState)
|
||||
|
||||
override fun updateShape(state: BlockState, direction: Direction, neighborState: BlockState, world: LevelAccessor, pos: BlockPos, neighborPos: BlockPos): BlockState {
|
||||
if (state.getValue(WATERLOGGED)) {
|
||||
world.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(world))
|
||||
}
|
||||
return if (state.getValue(HORIZONTAL_FACING).opposite == direction && !state.canSurvive(world, pos)) Blocks.AIR.defaultBlockState()
|
||||
else super.updateShape(state, direction, neighborState, world, pos, neighborPos)
|
||||
}
|
||||
|
||||
override fun getCollisionShape(state: BlockState, level: BlockGetter, pos: BlockPos, context: CollisionContext): VoxelShape {
|
||||
val direction = state.getValue(HORIZONTAL_FACING)
|
||||
return rotateShape(Direction.NORTH, direction, getShape(type))
|
||||
}
|
||||
|
||||
override fun getShape(state: BlockState, level: BlockGetter, pos: BlockPos, context: CollisionContext): VoxelShape {
|
||||
return getCollisionShape(state, level, pos, context).singleEncompassing()
|
||||
}
|
||||
|
||||
override fun getStateForPlacement(context: BlockPlaceContext): BlockState? {
|
||||
val fluidState = context.level.getFluidState(context.clickedPos)
|
||||
return super.getStateForPlacement(context)?.setValue(HORIZONTAL_FACING, context.horizontalDirection.opposite)?.setValue(WATERLOGGED, fluidState.type === Fluids.WATER)
|
||||
}
|
||||
|
||||
override fun useWithoutItem(
|
||||
state: BlockState,
|
||||
level: Level,
|
||||
pos: BlockPos,
|
||||
player: Player,
|
||||
hitResult: BlockHitResult
|
||||
): InteractionResult {
|
||||
if (level.isClientSide) {
|
||||
level.setBlockAndUpdate(pos, state.cycle(ACTIVE))
|
||||
return InteractionResult.SUCCESS
|
||||
} else {
|
||||
this.push(state, level, pos, null as Player?)
|
||||
return InteractionResult.CONSUME
|
||||
}
|
||||
}
|
||||
|
||||
fun push(state: BlockState, level: Level, pos: BlockPos?, player: Player?) {
|
||||
var state = state
|
||||
state = state.cycle(ACTIVE)
|
||||
level.setBlock(pos!!, state, 3)
|
||||
level.gameEvent(player, if (state.getValue(ACTIVE)) GameEvent.BLOCK_ACTIVATE else GameEvent.BLOCK_DEACTIVATE, pos)
|
||||
}
|
||||
|
||||
override fun hasAnalogOutputSignal(state: BlockState): Boolean {
|
||||
return true
|
||||
}
|
||||
//TODO: Replace this forced 4 with a value that can be set by the block, only relevant when more blocks of this class are added.
|
||||
override fun getAnalogOutputSignal(state: BlockState, level: Level, pos: BlockPos): Int {
|
||||
return if (level.getBlockState(pos).getValue(ACTIVE) as Boolean) 4 else 0
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.block
|
||||
|
||||
import com.cobblemon.mod.common.util.rotateShape
|
||||
import com.mojang.serialization.MapCodec
|
||||
import com.mojang.serialization.codecs.RecordCodecBuilder
|
||||
import net.minecraft.core.BlockPos
|
||||
import net.minecraft.core.Direction
|
||||
import net.minecraft.util.StringRepresentable
|
||||
import net.minecraft.world.item.context.BlockPlaceContext
|
||||
import net.minecraft.world.level.BlockGetter
|
||||
import net.minecraft.world.level.LevelAccessor
|
||||
import net.minecraft.world.level.block.Block
|
||||
import net.minecraft.world.level.block.Blocks
|
||||
import net.minecraft.world.level.block.HorizontalDirectionalBlock
|
||||
import net.minecraft.world.level.block.SimpleWaterloggedBlock
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
import net.minecraft.world.level.block.state.StateDefinition
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties.HORIZONTAL_FACING
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties.WATERLOGGED
|
||||
import net.minecraft.world.level.material.FluidState
|
||||
import net.minecraft.world.level.material.Fluids
|
||||
import net.minecraft.world.phys.shapes.CollisionContext
|
||||
import net.minecraft.world.phys.shapes.Shapes
|
||||
import net.minecraft.world.phys.shapes.VoxelShape
|
||||
|
||||
class DecorativeItemBlock(settings: Properties, val type: DecorativeItemBlockType): HorizontalDirectionalBlock(settings), SimpleWaterloggedBlock {
|
||||
|
||||
enum class DecorativeItemBlockType: StringRepresentable {
|
||||
//For basic use, also ignore camelcase errors, it's just dumb
|
||||
CENTERED_8x,
|
||||
CENTERED_6x,
|
||||
FLATTENED_8x6,
|
||||
FLATTENED_8x4,
|
||||
FLATTENED_10x4,
|
||||
//For specific items
|
||||
TEACUP,
|
||||
TEAPOT,
|
||||
KNOT,
|
||||
POUCH,
|
||||
NEVERMELT,
|
||||
SCOPE,
|
||||
WIDE,
|
||||
ZOOM;
|
||||
|
||||
override fun getSerializedName(): String = this.name.lowercase()
|
||||
|
||||
companion object {
|
||||
val CODEC = StringRepresentable.fromEnum(::values)
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
val CODEC: MapCodec<DecorativeItemBlock> = RecordCodecBuilder.mapCodec { it.group(
|
||||
propertiesCodec(),
|
||||
DecorativeItemBlockType.CODEC.fieldOf("type").forGetter(DecorativeItemBlock::type)
|
||||
).apply(it, ::DecorativeItemBlock) }
|
||||
|
||||
val CENTERED_8x = Shapes.box(0.25, 0.0, 0.25, 0.75, 0.5, 0.75)
|
||||
val CENTERED_6x = Shapes.box(0.3125, 0.0, 0.3125, 0.6875, 0.375, 0.6875)
|
||||
val FLAT6_HITBOX = Shapes.box(0.25, 0.0, 0.25, 0.75, 0.375, 0.75)
|
||||
val FLAT4_HITBOX = Shapes.box(0.25, 0.0, 0.25, 0.75, 0.25, 0.75)
|
||||
val SMOOSHED4_HITBOX = Shapes.box(0.1875, 0.0, 0.1875, 0.8125, 0.25, 0.8125)
|
||||
val TEACUP_HITBOX = Shapes.box(0.3125, 0.0, 0.3125, 0.6875, 0.25, 0.6875)
|
||||
val TEAPOT_HITBOX = Shapes.box(0.1875, 0.0, 0.1875, 0.8125, 0.625, 0.8125)
|
||||
val KNOT_HITBOX = Shapes.box(0.375, 0.0, 0.375, 0.75, 0.375, 0.75)
|
||||
val POUCH_HITBOX = Shapes.box(0.3125, 0.0, 0.3125, 0.6875, 0.3125, 0.6875)
|
||||
val NEVERMELT_HITBOX = Shapes.box(0.25, 0.0, 0.3125, 0.6875, 0.25, 0.75)
|
||||
val SCOPE_HITBOX = Shapes.box(0.625, 0.0, 0.4375, 0.9375, 0.125, 0.75)
|
||||
val WIDE_HITBOX = Shapes.box(0.625, 0.0, 0.125, 0.9375, 0.0625, 0.625)
|
||||
val ZOOM_HITBOX = Shapes.box(0.125, 0.0, 0.1875, 0.375, 0.1875, 0.5)
|
||||
|
||||
fun getShape(type: DecorativeItemBlockType): VoxelShape {
|
||||
return when (type) {
|
||||
DecorativeItemBlockType.TEAPOT -> TEAPOT_HITBOX
|
||||
DecorativeItemBlockType.TEACUP -> TEACUP_HITBOX
|
||||
DecorativeItemBlockType.KNOT -> KNOT_HITBOX
|
||||
DecorativeItemBlockType.POUCH -> POUCH_HITBOX
|
||||
DecorativeItemBlockType.NEVERMELT -> NEVERMELT_HITBOX
|
||||
DecorativeItemBlockType.SCOPE -> SCOPE_HITBOX
|
||||
DecorativeItemBlockType.WIDE -> WIDE_HITBOX
|
||||
DecorativeItemBlockType.ZOOM -> ZOOM_HITBOX
|
||||
DecorativeItemBlockType.FLATTENED_10x4 -> SMOOSHED4_HITBOX
|
||||
DecorativeItemBlockType.FLATTENED_8x4 -> FLAT4_HITBOX
|
||||
DecorativeItemBlockType.FLATTENED_8x6 -> FLAT6_HITBOX
|
||||
DecorativeItemBlockType.CENTERED_6x -> CENTERED_6x
|
||||
else -> CENTERED_8x
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
init {
|
||||
registerDefaultState(stateDefinition.any()
|
||||
.setValue(HORIZONTAL_FACING, Direction.NORTH)
|
||||
.setValue(WATERLOGGED, false))
|
||||
}
|
||||
|
||||
override fun codec(): MapCodec<DecorativeItemBlock> = CODEC
|
||||
|
||||
override fun createBlockStateDefinition(builder: StateDefinition.Builder<Block, BlockState>) {
|
||||
builder.add(HORIZONTAL_FACING, WATERLOGGED)
|
||||
}
|
||||
|
||||
override fun getFluidState(blockState: BlockState): FluidState? = if (blockState.getValue(WATERLOGGED)) Fluids.WATER.getSource(false) else super.getFluidState(blockState)
|
||||
|
||||
override fun updateShape(state: BlockState, direction: Direction, neighborState: BlockState, world: LevelAccessor, pos: BlockPos, neighborPos: BlockPos): BlockState {
|
||||
if (state.getValue(WATERLOGGED)) {
|
||||
world.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(world))
|
||||
}
|
||||
return if (state.getValue(HORIZONTAL_FACING).opposite == direction && !state.canSurvive(world, pos)) Blocks.AIR.defaultBlockState()
|
||||
else super.updateShape(state, direction, neighborState, world, pos, neighborPos)
|
||||
}
|
||||
|
||||
override fun getShape(state: BlockState, level: BlockGetter, pos: BlockPos, context: CollisionContext): VoxelShape {
|
||||
val direction = state.getValue(HORIZONTAL_FACING)
|
||||
return rotateShape(Direction.NORTH, direction, getShape(type))
|
||||
}
|
||||
|
||||
override fun getStateForPlacement(context: BlockPlaceContext): BlockState? {
|
||||
val fluidState = context.level.getFluidState(context.clickedPos)
|
||||
return super.getStateForPlacement(context)?.setValue(HORIZONTAL_FACING, context.horizontalDirection.opposite)?.setValue(WATERLOGGED, fluidState.type === Fluids.WATER)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.block
|
||||
|
||||
import com.cobblemon.mod.common.util.rotateShape
|
||||
import net.minecraft.core.BlockPos
|
||||
import net.minecraft.core.Direction
|
||||
import net.minecraft.world.item.context.BlockPlaceContext
|
||||
import net.minecraft.world.level.BlockGetter
|
||||
import net.minecraft.world.level.LevelAccessor
|
||||
import net.minecraft.world.level.LevelReader
|
||||
import net.minecraft.world.level.block.Block
|
||||
import net.minecraft.world.level.block.Blocks
|
||||
import net.minecraft.world.level.block.ButtonBlock
|
||||
import net.minecraft.world.level.block.SimpleWaterloggedBlock
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
import net.minecraft.world.level.block.state.StateDefinition
|
||||
import net.minecraft.world.level.block.state.properties.AttachFace
|
||||
import net.minecraft.world.level.block.state.properties.BlockSetType
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties.WATERLOGGED
|
||||
import net.minecraft.world.level.material.FluidState
|
||||
import net.minecraft.world.level.material.Fluids
|
||||
import net.minecraft.world.phys.shapes.CollisionContext
|
||||
import net.minecraft.world.phys.shapes.Shapes
|
||||
import net.minecraft.world.phys.shapes.VoxelShape
|
||||
|
||||
class EjectButtonBlock(properties: Properties, ticksToStayPressed: Int) : ButtonBlock(BlockSetType.IRON, ticksToStayPressed, properties), SimpleWaterloggedBlock {
|
||||
companion object {
|
||||
val FLOOR_UNPOWERED = Shapes.or(
|
||||
Shapes.box(0.125, 0.0, 0.125, 0.875, 0.1875, 0.875),
|
||||
Shapes.box(0.375, 0.1875, 0.375, 0.625, 0.3125, 0.625) )
|
||||
val FLOOR_POWERED = Shapes.or(
|
||||
Shapes.box(0.125, 0.0, 0.125, 0.875, 0.1875, 0.875),
|
||||
Shapes.box(0.375, 0.1875, 0.375, 0.625, 0.25, 0.625) )
|
||||
val FLOOR_PANEL = Shapes.box(0.125, 0.0, 0.125, 0.875, 0.1875, 0.875)
|
||||
val CEILING_UNPOWERED = Shapes.or(
|
||||
Shapes.box(0.125, 0.8125, 0.125, 0.875, 1.0, 0.875),
|
||||
Shapes.box(0.375, 0.6875, 0.375, 0.625, 0.8125, 0.625) )
|
||||
val CEILING_POWERED = Shapes.or(
|
||||
Shapes.box(0.125, 0.8125, 0.125, 0.875, 1.0, 0.875),
|
||||
Shapes.box(0.375, 0.75, 0.375, 0.625, 0.8125, 0.625) )
|
||||
val CEILING_PANEL = Shapes.box(0.125, 0.8125, 0.125, 0.875, 1.0, 0.875)
|
||||
val WALL_UNPOWERED = Shapes.or(
|
||||
Shapes.box(0.125, 0.125, 0.8125, 0.875, 0.875, 1.0),
|
||||
Shapes.box(0.375, 0.375, 0.6875, 0.625, 0.625, 0.8125) )
|
||||
val WALL_POWERED = Shapes.or(
|
||||
Shapes.box(0.125, 0.125, 0.8125, 0.875, 0.875, 1.0),
|
||||
Shapes.box(0.375, 0.375, 0.75, 0.625, 0.625, 0.8125) )
|
||||
val WALL_PANEL = Shapes.box(0.125, 0.125, 0.8125, 0.875, 0.875, 1.0)
|
||||
}
|
||||
|
||||
init {
|
||||
registerDefaultState(stateDefinition.any()
|
||||
.setValue(FACING, Direction.NORTH)
|
||||
.setValue(FACE, AttachFace.WALL)
|
||||
.setValue(POWERED, false)
|
||||
.setValue(WATERLOGGED, false)
|
||||
)
|
||||
}
|
||||
|
||||
override fun createBlockStateDefinition(builder: StateDefinition.Builder<Block, BlockState>) {
|
||||
builder.add(FACING, FACE, POWERED, WATERLOGGED)
|
||||
}
|
||||
|
||||
override fun getFluidState(blockState: BlockState): FluidState? {
|
||||
return if (blockState.getValue(WATERLOGGED)) Fluids.WATER.getSource(false) else super.getFluidState(blockState);
|
||||
}
|
||||
|
||||
override fun getStateForPlacement(context: BlockPlaceContext): BlockState? {
|
||||
val fluidState = context.level.getFluidState(context.clickedPos)
|
||||
for (direction in context.nearestLookingDirections) {
|
||||
val blockState: BlockState
|
||||
if (direction.getAxis() === Direction.Axis.Y) {
|
||||
blockState = (defaultBlockState()
|
||||
.setValue(FACE, if (direction == Direction.UP) AttachFace.CEILING else AttachFace.FLOOR) as BlockState)
|
||||
.setValue(FACING, context.horizontalDirection.opposite)
|
||||
.setValue(WATERLOGGED, fluidState.type === Fluids.WATER
|
||||
) as BlockState
|
||||
} else {
|
||||
blockState = (defaultBlockState()
|
||||
.setValue(FACE, AttachFace.WALL) as BlockState)
|
||||
.setValue(FACING, direction.opposite)
|
||||
.setValue(WATERLOGGED, fluidState.type === Fluids.WATER
|
||||
) as BlockState
|
||||
}
|
||||
if (blockState.canSurvive(context.getLevel(), context.getClickedPos())) {
|
||||
return blockState
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
override fun getShape(state: BlockState, blockGetter: BlockGetter, pos: BlockPos, collisionContext: CollisionContext): VoxelShape {
|
||||
val direction = state.getValue(FACING)
|
||||
return when (state.getValue(FACE)) {
|
||||
AttachFace.FLOOR -> if (state.getValue(POWERED)) {FLOOR_POWERED} else {FLOOR_UNPOWERED}
|
||||
AttachFace.WALL ->
|
||||
when (direction) {
|
||||
Direction.NORTH, Direction.UP, Direction.DOWN -> if (state.getValue(POWERED)) {WALL_POWERED} else {WALL_UNPOWERED}
|
||||
else -> rotateShape(Direction.NORTH, direction, if (state.getValue(POWERED)) {WALL_POWERED} else {WALL_UNPOWERED})
|
||||
}
|
||||
AttachFace.CEILING -> if (state.getValue(POWERED)) {CEILING_POWERED} else {CEILING_UNPOWERED}
|
||||
}
|
||||
}
|
||||
override fun getCollisionShape(state: BlockState, level: BlockGetter, pos: BlockPos, context: CollisionContext): VoxelShape {
|
||||
val direction = state.getValue(FACING)
|
||||
return when (state.getValue(FACE)) {
|
||||
AttachFace.FLOOR -> FLOOR_PANEL
|
||||
AttachFace.WALL -> when (direction) {
|
||||
Direction.NORTH, Direction.UP, Direction.DOWN -> WALL_PANEL
|
||||
else -> rotateShape(Direction.NORTH, direction, WALL_PANEL)
|
||||
}
|
||||
AttachFace.CEILING -> CEILING_PANEL
|
||||
}
|
||||
}
|
||||
|
||||
override fun updateShape(state: BlockState, direction: Direction, neighborState: BlockState, world: LevelAccessor, pos: BlockPos, neighborPos: BlockPos): BlockState {
|
||||
if (state.getValue(WATERLOGGED)) {
|
||||
world.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(world))
|
||||
}
|
||||
return if (getConnectedDirection(state).opposite == direction && !state.canSurvive(world, pos)) Blocks.AIR.defaultBlockState()
|
||||
else super.updateShape(state, direction, neighborState, world, pos, neighborPos)
|
||||
}
|
||||
|
||||
override fun canSurvive(state: BlockState, level: LevelReader, pos: BlockPos): Boolean {
|
||||
return if (state.getValue(FACE) != AttachFace.WALL) {
|
||||
val direction = getConnectedDirection(state)
|
||||
canSupportCenter(level, pos.relative(direction.opposite), direction)
|
||||
} else {
|
||||
level.getBlockState(pos.relative(state.getValue(FACING).opposite)).isSolid
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.block
|
||||
|
||||
import com.cobblemon.mod.common.util.rotateShape
|
||||
import com.mojang.serialization.MapCodec
|
||||
import com.mojang.serialization.codecs.RecordCodecBuilder
|
||||
import net.minecraft.core.BlockPos
|
||||
import net.minecraft.core.Direction
|
||||
import net.minecraft.world.level.BlockGetter
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
import net.minecraft.world.level.block.state.properties.AttachFace
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties.WATERLOGGED
|
||||
import net.minecraft.world.phys.shapes.CollisionContext
|
||||
import net.minecraft.world.phys.shapes.Shapes
|
||||
import net.minecraft.world.phys.shapes.VoxelShape
|
||||
|
||||
class GalaricaWreathBlock(properties: Properties) : SixFaceRotationalBlock(properties) {
|
||||
companion object {
|
||||
val CODEC: MapCodec<GalaricaWreathBlock> = RecordCodecBuilder.mapCodec {
|
||||
it.group(propertiesCodec()).apply(it, ::GalaricaWreathBlock)
|
||||
}
|
||||
|
||||
val FLOOR_NORTH = Shapes.box(0.125, 0.0, 0.125, 0.875, 0.25, 0.875)
|
||||
val WALL_NORTH = Shapes.box(0.125, 0.125, 0.75, 0.875, 0.875, 1.0)
|
||||
val CEILING_NORTH = Shapes.box(0.125, 0.125, 0.375, 0.875, 0.625, 0.5625)
|
||||
}
|
||||
|
||||
init {
|
||||
registerDefaultState(stateDefinition.any()
|
||||
.setValue(FACING, Direction.NORTH)
|
||||
.setValue(FACE, AttachFace.WALL)
|
||||
.setValue(WATERLOGGED, false)
|
||||
)
|
||||
}
|
||||
|
||||
override fun codec(): MapCodec<GalaricaWreathBlock> = CODEC
|
||||
|
||||
override fun getShape(state: BlockState, blockGetter: BlockGetter, pos: BlockPos, collisionContext: CollisionContext): VoxelShape {
|
||||
val direction = state.getValue(FACING)
|
||||
return when (state.getValue(FACE)) {
|
||||
AttachFace.FLOOR ->
|
||||
if (direction.axis === Direction.Axis.X) {
|
||||
rotateShape(Direction.NORTH, Direction.WEST, FLOOR_NORTH)
|
||||
} else FLOOR_NORTH
|
||||
AttachFace.WALL ->
|
||||
when (direction) {
|
||||
Direction.NORTH, Direction.UP, Direction.DOWN -> WALL_NORTH
|
||||
else -> rotateShape(Direction.NORTH, direction, WALL_NORTH)
|
||||
}
|
||||
AttachFace.CEILING ->
|
||||
if (direction.axis === Direction.Axis.X) {
|
||||
rotateShape(Direction.NORTH, Direction.WEST, CEILING_NORTH)
|
||||
} else CEILING_NORTH
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.block
|
||||
|
||||
import com.cobblemon.mod.common.util.rotateShape
|
||||
import com.mojang.serialization.MapCodec
|
||||
import com.mojang.serialization.codecs.RecordCodecBuilder
|
||||
import net.minecraft.core.BlockPos
|
||||
import net.minecraft.core.Direction
|
||||
import net.minecraft.world.level.BlockGetter
|
||||
import net.minecraft.world.level.LevelReader
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
import net.minecraft.world.level.block.state.properties.AttachFace
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties.WATERLOGGED
|
||||
import net.minecraft.world.phys.shapes.CollisionContext
|
||||
import net.minecraft.world.phys.shapes.Shapes
|
||||
import net.minecraft.world.phys.shapes.VoxelShape
|
||||
|
||||
class MagnetBlock(properties: Properties) : SixFaceRotationalBlock(properties) {
|
||||
companion object {
|
||||
val CODEC: MapCodec<MagnetBlock> = RecordCodecBuilder.mapCodec {
|
||||
it.group(propertiesCodec()).apply(it, ::MagnetBlock)
|
||||
}
|
||||
|
||||
val FLOOR_NORTH = Shapes.box(0.25, 0.0, 0.25, 0.75, 0.1875, 0.75)
|
||||
val WALL_NORTH = Shapes.box(0.25, 0.25, 0.8125, 0.75, 0.75, 1.0)
|
||||
val CEILING_NORTH = Shapes.box(0.25, 0.8125, 0.25, 0.75, 1.0, 0.75)
|
||||
}
|
||||
|
||||
init {
|
||||
registerDefaultState(stateDefinition.any()
|
||||
.setValue(FACING, Direction.NORTH)
|
||||
.setValue(FACE, AttachFace.WALL)
|
||||
.setValue(WATERLOGGED, false)
|
||||
)
|
||||
}
|
||||
|
||||
override fun codec(): MapCodec<MagnetBlock> = CODEC
|
||||
|
||||
override fun getShape(state: BlockState, blockGetter: BlockGetter, pos: BlockPos, collisionContext: CollisionContext): VoxelShape {
|
||||
val direction = state.getValue(FACING)
|
||||
return when (state.getValue(FACE)) {
|
||||
AttachFace.FLOOR ->
|
||||
if (direction.axis === Direction.Axis.X) {
|
||||
rotateShape(Direction.NORTH, Direction.WEST, FLOOR_NORTH)
|
||||
} else FLOOR_NORTH
|
||||
AttachFace.WALL ->
|
||||
when (direction) {
|
||||
Direction.NORTH, Direction.UP, Direction.DOWN -> WALL_NORTH
|
||||
else -> rotateShape(Direction.NORTH, direction, WALL_NORTH)
|
||||
}
|
||||
AttachFace.CEILING ->
|
||||
if (direction.axis === Direction.Axis.X) {
|
||||
rotateShape(Direction.NORTH, Direction.WEST, CEILING_NORTH)
|
||||
} else CEILING_NORTH
|
||||
}
|
||||
}
|
||||
|
||||
override fun canSurvive(state: BlockState, level: LevelReader, pos: BlockPos): Boolean {
|
||||
return true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.block
|
||||
|
||||
import com.cobblemon.mod.common.util.rotateShape
|
||||
import com.mojang.serialization.MapCodec
|
||||
import com.mojang.serialization.codecs.RecordCodecBuilder
|
||||
import net.minecraft.core.BlockPos
|
||||
import net.minecraft.core.Direction
|
||||
import net.minecraft.world.level.BlockGetter
|
||||
import net.minecraft.world.level.LevelReader
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
import net.minecraft.world.level.block.state.properties.AttachFace
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties.WATERLOGGED
|
||||
import net.minecraft.world.phys.shapes.CollisionContext
|
||||
import net.minecraft.world.phys.shapes.Shapes
|
||||
import net.minecraft.world.phys.shapes.VoxelShape
|
||||
|
||||
class OrbBlock(properties: Properties) : SixFaceRotationalBlock(properties) {
|
||||
companion object {
|
||||
val CODEC: MapCodec<OrbBlock> = RecordCodecBuilder.mapCodec {
|
||||
it.group(propertiesCodec()).apply(it, ::OrbBlock)
|
||||
}
|
||||
|
||||
val FLOOR_NORTH = Shapes.box(0.3125, 0.0, 0.3125, 0.6875, 0.375, 0.6875)
|
||||
val WALL_NORTH = Shapes.box(0.3125, 0.3125, 0.625, 0.6875, 0.6875, 1.0)
|
||||
val CEILING_NORTH = Shapes.box(0.3125, 0.625, 0.375, 0.6875, 1.0, 0.6875)
|
||||
}
|
||||
|
||||
init {
|
||||
registerDefaultState(stateDefinition.any()
|
||||
.setValue(FACING, Direction.NORTH)
|
||||
.setValue(FACE, AttachFace.WALL)
|
||||
.setValue(WATERLOGGED, false)
|
||||
)
|
||||
}
|
||||
|
||||
override fun codec(): MapCodec<OrbBlock> = CODEC
|
||||
|
||||
override fun getShape(state: BlockState, blockGetter: BlockGetter, pos: BlockPos, collisionContext: CollisionContext): VoxelShape {
|
||||
val direction = state.getValue(FACING)
|
||||
return when (state.getValue(FACE)) {
|
||||
AttachFace.FLOOR ->
|
||||
if (direction.axis === Direction.Axis.X) {
|
||||
rotateShape(Direction.NORTH, Direction.WEST, FLOOR_NORTH)
|
||||
} else FLOOR_NORTH
|
||||
AttachFace.WALL ->
|
||||
when (direction) {
|
||||
Direction.NORTH, Direction.UP, Direction.DOWN -> WALL_NORTH
|
||||
else -> rotateShape(Direction.NORTH, direction, WALL_NORTH)
|
||||
}
|
||||
AttachFace.CEILING ->
|
||||
if (direction.axis === Direction.Axis.X) {
|
||||
rotateShape(Direction.NORTH, Direction.WEST, CEILING_NORTH)
|
||||
} else CEILING_NORTH
|
||||
}
|
||||
}
|
||||
|
||||
override fun canSurvive(state: BlockState, level: LevelReader, pos: BlockPos): Boolean {
|
||||
return true
|
||||
}
|
||||
}
|
||||
@@ -13,25 +13,15 @@ import com.mojang.serialization.MapCodec
|
||||
import com.mojang.serialization.codecs.RecordCodecBuilder
|
||||
import net.minecraft.core.BlockPos
|
||||
import net.minecraft.core.Direction
|
||||
import net.minecraft.world.item.context.BlockPlaceContext
|
||||
import net.minecraft.world.level.BlockGetter
|
||||
import net.minecraft.world.level.LevelAccessor
|
||||
import net.minecraft.world.level.LevelReader
|
||||
import net.minecraft.world.level.block.Block
|
||||
import net.minecraft.world.level.block.Blocks
|
||||
import net.minecraft.world.level.block.FaceAttachedHorizontalDirectionalBlock
|
||||
import net.minecraft.world.level.block.SimpleWaterloggedBlock
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
import net.minecraft.world.level.block.state.StateDefinition
|
||||
import net.minecraft.world.level.block.state.properties.AttachFace
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties.WATERLOGGED
|
||||
import net.minecraft.world.level.material.FluidState
|
||||
import net.minecraft.world.level.material.Fluids
|
||||
import net.minecraft.world.phys.shapes.CollisionContext
|
||||
import net.minecraft.world.phys.shapes.Shapes
|
||||
import net.minecraft.world.phys.shapes.VoxelShape
|
||||
|
||||
class PlaqueBlock(properties : Properties) : FaceAttachedHorizontalDirectionalBlock(properties), SimpleWaterloggedBlock {
|
||||
class PlaqueBlock(properties : Properties) : SixFaceRotationalBlock(properties) {
|
||||
companion object {
|
||||
val CODEC: MapCodec<PlaqueBlock> = RecordCodecBuilder.mapCodec {
|
||||
it.group(propertiesCodec()).apply(it, ::PlaqueBlock)
|
||||
@@ -54,40 +44,6 @@ class PlaqueBlock(properties : Properties) : FaceAttachedHorizontalDirectionalBl
|
||||
)
|
||||
}
|
||||
|
||||
override fun createBlockStateDefinition(builder: StateDefinition.Builder<Block, BlockState>) {
|
||||
builder.add(FACING, FACE, WATERLOGGED)
|
||||
}
|
||||
|
||||
override fun getFluidState(blockState: BlockState): FluidState? {
|
||||
return if (blockState.getValue(WATERLOGGED)) Fluids.WATER.getSource(false) else super.getFluidState(blockState);
|
||||
}
|
||||
|
||||
override fun getStateForPlacement(context: BlockPlaceContext): BlockState? {
|
||||
val fluidState = context.level.getFluidState(context.clickedPos)
|
||||
for (direction in context.nearestLookingDirections) {
|
||||
val blockState: BlockState
|
||||
if (direction.getAxis() === Direction.Axis.Y) {
|
||||
blockState = (defaultBlockState()
|
||||
.setValue(FACE, if (direction == Direction.UP) AttachFace.CEILING else AttachFace.FLOOR) as BlockState)
|
||||
.setValue(FACING, context.horizontalDirection.opposite)
|
||||
.setValue(WATERLOGGED, fluidState.type === Fluids.WATER
|
||||
) as BlockState
|
||||
} else {
|
||||
blockState = (defaultBlockState()
|
||||
.setValue(FACE, AttachFace.WALL) as BlockState)
|
||||
.setValue(FACING, direction.opposite)
|
||||
.setValue(WATERLOGGED, fluidState.type === Fluids.WATER
|
||||
) as BlockState
|
||||
|
||||
}
|
||||
|
||||
if (blockState.canSurvive(context.getLevel(), context.getClickedPos())) {
|
||||
return blockState
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
override fun codec(): MapCodec<PlaqueBlock> = CODEC
|
||||
|
||||
override fun getShape(state: BlockState, blockGetter: BlockGetter, pos: BlockPos, collisionContext: CollisionContext): VoxelShape {
|
||||
@@ -108,21 +64,4 @@ class PlaqueBlock(properties : Properties) : FaceAttachedHorizontalDirectionalBl
|
||||
} else CEILING_NORTH
|
||||
}
|
||||
}
|
||||
|
||||
override fun updateShape(state: BlockState, direction: Direction, neighborState: BlockState, world: LevelAccessor, pos: BlockPos, neighborPos: BlockPos): BlockState {
|
||||
if (state.getValue(WATERLOGGED)) {
|
||||
world.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(world))
|
||||
}
|
||||
return if (getConnectedDirection(state).opposite == direction && !state.canSurvive(world, pos)) Blocks.AIR.defaultBlockState()
|
||||
else super.updateShape(state, direction, neighborState, world, pos, neighborPos)
|
||||
}
|
||||
|
||||
override fun canSurvive(state: BlockState, level: LevelReader, pos: BlockPos): Boolean {
|
||||
return if (state.getValue(FACE) == AttachFace.CEILING) {
|
||||
val direction = getConnectedDirection(state)
|
||||
canSupportCenter(level, pos.relative(direction.opposite), direction)
|
||||
} else {
|
||||
super.canSurvive(state, level, pos)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.block.decor
|
||||
|
||||
import com.mojang.serialization.MapCodec
|
||||
import com.mojang.serialization.codecs.RecordCodecBuilder
|
||||
import net.minecraft.core.BlockPos
|
||||
import net.minecraft.core.Direction
|
||||
import net.minecraft.world.item.context.BlockPlaceContext
|
||||
import net.minecraft.world.level.BlockGetter
|
||||
import net.minecraft.world.level.LevelAccessor
|
||||
import net.minecraft.world.level.LevelReader
|
||||
import net.minecraft.world.level.block.*
|
||||
import net.minecraft.world.level.block.HorizontalDirectionalBlock.FACING
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
import net.minecraft.world.level.block.state.StateDefinition
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties.WATERLOGGED
|
||||
import net.minecraft.world.level.block.state.properties.Property
|
||||
import net.minecraft.world.level.material.FluidState
|
||||
import net.minecraft.world.level.material.Fluids
|
||||
import net.minecraft.world.phys.shapes.CollisionContext
|
||||
import net.minecraft.world.phys.shapes.Shapes
|
||||
import net.minecraft.world.phys.shapes.VoxelShape
|
||||
|
||||
class RingTargetBlock(settings: Properties) : TargetBlock(settings), SimpleWaterloggedBlock {
|
||||
init {
|
||||
registerDefaultState(stateDefinition.any()
|
||||
.setValue(FACING, Direction.NORTH)
|
||||
.setValue(WATERLOGGED, false)
|
||||
.setValue(OUTPUT_POWER, 0))
|
||||
}
|
||||
|
||||
override fun getStateForPlacement(ctx: BlockPlaceContext): BlockState? {
|
||||
var blockState = defaultBlockState()
|
||||
.setValue(WATERLOGGED, ctx.level.getFluidState(ctx.clickedPos).type == Fluids.WATER)
|
||||
val worldView = ctx.level
|
||||
val blockPos = ctx.clickedPos
|
||||
ctx.nearestLookingDirections.forEach { direction ->
|
||||
if (direction.axis.isHorizontal) {
|
||||
blockState = blockState.setValue(FACING, direction.opposite) as BlockState
|
||||
if (blockState.canSurvive(worldView, blockPos)) {
|
||||
return blockState
|
||||
}
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
override fun getFluidState(blockState: BlockState): FluidState? {
|
||||
return if (blockState.getValue(WATERLOGGED)) Fluids.WATER.getSource(false) else super.getFluidState(blockState)
|
||||
}
|
||||
|
||||
override fun createBlockStateDefinition(builder: StateDefinition.Builder<Block, BlockState>) {
|
||||
builder.add(FACING)
|
||||
builder.add(WATERLOGGED)
|
||||
builder.add(*arrayOf<Property<*>>(OUTPUT_POWER))
|
||||
}
|
||||
|
||||
override fun getShape(
|
||||
state: BlockState,
|
||||
blockGetter: BlockGetter,
|
||||
pos: BlockPos,
|
||||
collisionContext: CollisionContext
|
||||
): VoxelShape {
|
||||
return when (state.getValue(FACING)) {
|
||||
Direction.SOUTH -> FULL_PLANE_SOUTH
|
||||
Direction.WEST -> FULL_PLANE_WEST
|
||||
Direction.EAST -> FULL_PLANE_EAST
|
||||
else -> FULL_PLANE_NORTH
|
||||
}
|
||||
}
|
||||
|
||||
override fun updateShape(
|
||||
state: BlockState,
|
||||
direction: Direction,
|
||||
neighborState: BlockState,
|
||||
world: LevelAccessor,
|
||||
pos: BlockPos,
|
||||
neighborPos: BlockPos
|
||||
): BlockState {
|
||||
if (state.getValue(WATERLOGGED)) {
|
||||
world.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(world))
|
||||
}
|
||||
return if (direction.opposite == state.getValue(FACING) && !state.canSurvive(world, pos)) Blocks.AIR.defaultBlockState()
|
||||
else super.updateShape(state, direction, neighborState, world, pos, neighborPos)
|
||||
}
|
||||
|
||||
override fun rotate(state: BlockState, rotation: Rotation): BlockState {
|
||||
return state.setValue(FACING, rotation.rotate(state.getValue(FACING)))
|
||||
}
|
||||
|
||||
override fun canSurvive(state: BlockState, level: LevelReader, pos: BlockPos): Boolean {
|
||||
return level.getBlockState(pos.relative(state.getValue(FACING).opposite)).isSolid
|
||||
}
|
||||
|
||||
companion object {
|
||||
val CODEC: MapCodec<RingTargetBlock> = RecordCodecBuilder.mapCodec {
|
||||
it.group(
|
||||
propertiesCodec()
|
||||
).apply(it, ::RingTargetBlock) }
|
||||
|
||||
val OUTPUT_POWER = BlockStateProperties.POWER;
|
||||
|
||||
val FULL_PLANE_NORTH = Shapes.box(0.0, 0.0, 0.925, 1.0, 1.0, 1.0)
|
||||
val FULL_PLANE_WEST = Shapes.box(0.925, 0.0, 0.0, 1.0, 1.0, 1.0)
|
||||
val FULL_PLANE_SOUTH = Shapes.box(0.0, 0.0, 0.0, 1.0, 1.0, 0.075)
|
||||
val FULL_PLANE_EAST = Shapes.box(0.0, 0.0, 0.0, 0.075, 1.0, 1.0)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.block
|
||||
|
||||
import com.mojang.serialization.MapCodec
|
||||
import net.minecraft.core.BlockPos
|
||||
import net.minecraft.core.Direction
|
||||
import net.minecraft.world.item.context.BlockPlaceContext
|
||||
import net.minecraft.world.level.LevelAccessor
|
||||
import net.minecraft.world.level.LevelReader
|
||||
import net.minecraft.world.level.block.Block
|
||||
import net.minecraft.world.level.block.Blocks
|
||||
import net.minecraft.world.level.block.FaceAttachedHorizontalDirectionalBlock
|
||||
import net.minecraft.world.level.block.SimpleWaterloggedBlock
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
import net.minecraft.world.level.block.state.StateDefinition
|
||||
import net.minecraft.world.level.block.state.properties.AttachFace
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties.WATERLOGGED
|
||||
import net.minecraft.world.level.material.FluidState
|
||||
import net.minecraft.world.level.material.Fluids
|
||||
|
||||
open class SixFaceRotationalBlock(properties : Properties) : FaceAttachedHorizontalDirectionalBlock(properties), SimpleWaterloggedBlock {
|
||||
companion object {
|
||||
val CODEC = simpleCodec(::SixFaceRotationalBlock)
|
||||
}
|
||||
|
||||
override fun codec(): MapCodec<out SixFaceRotationalBlock> = CODEC
|
||||
|
||||
override fun createBlockStateDefinition(builder: StateDefinition.Builder<Block, BlockState>) {
|
||||
builder.add(FACING, FACE, WATERLOGGED)
|
||||
}
|
||||
|
||||
override fun getFluidState(blockState: BlockState): FluidState? {
|
||||
return if (blockState.getValue(WATERLOGGED)) Fluids.WATER.getSource(false) else super.getFluidState(blockState);
|
||||
}
|
||||
|
||||
override fun getStateForPlacement(context: BlockPlaceContext): BlockState? {
|
||||
val fluidState = context.level.getFluidState(context.clickedPos)
|
||||
for (direction in context.nearestLookingDirections) {
|
||||
val blockState: BlockState
|
||||
if (direction.getAxis() === Direction.Axis.Y) {
|
||||
blockState = (defaultBlockState()
|
||||
.setValue(FACE, if (direction == Direction.UP) AttachFace.CEILING else AttachFace.FLOOR) as BlockState)
|
||||
.setValue(FACING, context.horizontalDirection.opposite)
|
||||
.setValue(WATERLOGGED, fluidState.type === Fluids.WATER
|
||||
) as BlockState
|
||||
} else {
|
||||
blockState = (defaultBlockState()
|
||||
.setValue(FACE, AttachFace.WALL) as BlockState)
|
||||
.setValue(FACING, direction.opposite)
|
||||
.setValue(WATERLOGGED, fluidState.type === Fluids.WATER
|
||||
) as BlockState
|
||||
|
||||
}
|
||||
|
||||
if (blockState.canSurvive(context.getLevel(), context.getClickedPos())) {
|
||||
return blockState
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
override fun updateShape(state: BlockState, direction: Direction, neighborState: BlockState, world: LevelAccessor, pos: BlockPos, neighborPos: BlockPos): BlockState {
|
||||
if (state.getValue(WATERLOGGED)) {
|
||||
world.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(world))
|
||||
}
|
||||
return if (getConnectedDirection(state).opposite == direction && !state.canSurvive(world, pos)) Blocks.AIR.defaultBlockState()
|
||||
else super.updateShape(state, direction, neighborState, world, pos, neighborPos)
|
||||
}
|
||||
|
||||
override fun canSurvive(state: BlockState, level: LevelReader, pos: BlockPos): Boolean {
|
||||
return if (state.getValue(FACE) == AttachFace.CEILING) {
|
||||
val direction = getConnectedDirection(state)
|
||||
canSupportCenter(level, pos.relative(direction.opposite), direction)
|
||||
} else if (state.getValue(FACE) == AttachFace.WALL) {
|
||||
level.getBlockState(pos.relative(state.getValue(FACING).opposite)).isSolid
|
||||
} else {
|
||||
super.canSurvive(state, level, pos)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -39,7 +39,13 @@ class StackableItemBlock(settings: Properties, val type: StackableItemBlockType)
|
||||
ETHER,
|
||||
MAX_POTION,
|
||||
POTION,
|
||||
STATUS_RESTORE;
|
||||
STATUS_RESTORE,
|
||||
VITAMIN,
|
||||
METAL_COAT,
|
||||
IRON_BALL,
|
||||
THROAT_SPRAY,
|
||||
UPGRADE,
|
||||
DICE;
|
||||
|
||||
override fun getSerializedName(): String = this.name.lowercase()
|
||||
|
||||
@@ -57,98 +63,78 @@ class StackableItemBlock(settings: Properties, val type: StackableItemBlockType)
|
||||
StackableItemBlockType.CODEC.fieldOf("type").forGetter(StackableItemBlock::type)
|
||||
).apply(it, ::StackableItemBlock) }
|
||||
|
||||
val northShapeMap: Map<StackableItemBlockType, List<VoxelShape>> = mapOf(
|
||||
StackableItemBlockType.BATTLE_ITEM to listOf(
|
||||
Shapes.box(0.34375, 0.0, 0.34375, 0.65625, 0.4375, 0.65625),
|
||||
Shapes.or(
|
||||
Shapes.box(0.09375, 0.0, 0.34375, 0.40625, 0.4375, 0.65625),
|
||||
Shapes.box(0.59375, 0.0, 0.40625, 0.90625, 0.4375, 0.71875)
|
||||
val northShapeMap: Map<StackableItemBlockType, List<VoxelShape>>
|
||||
get() = mapOf(
|
||||
StackableItemBlockType.BATTLE_ITEM to listOf(
|
||||
Shapes.box(0.34375, 0.0, 0.34375, 0.65625, 0.4375, 0.65625),
|
||||
Shapes.box(0.09375, 0.0, 0.34375, 0.90625, 0.4375, 0.71875),
|
||||
Shapes.box(0.09375, 0.0, 0.09375, 0.90625, 0.4375, 0.90625),
|
||||
Shapes.box(0.09375, 0.0, 0.09375, 0.96875, 0.4375, 0.90625)
|
||||
),
|
||||
Shapes.or(
|
||||
Shapes.box(0.59375, 0.0, 0.59375, 0.90625, 0.4375, 0.90625),
|
||||
Shapes.box(0.09375, 0.0, 0.53125, 0.40625, 0.4375, 0.84375),
|
||||
Shapes.box(0.34375, 0.0, 0.09375, 0.65625, 0.4375, 0.40625)
|
||||
StackableItemBlockType.ETHER to listOf(
|
||||
Shapes.box(0.375, 0.0, 0.3125, 0.625, 0.5, 0.6875),
|
||||
Shapes.box(0.125, 0.0, 0.3125, 0.875, 0.5, 0.75),
|
||||
Shapes.box(0.125, 0.0, 0.125, 0.875, 0.5, 1.0),
|
||||
Shapes.box(0.125, 0.0, 0.0625, 0.9375, 0.5, 1.0)
|
||||
),
|
||||
Shapes.or(
|
||||
Shapes.box(0.09375, 0.0, 0.09375, 0.40625, 0.4375, 0.40625),
|
||||
Shapes.box(0.59375, 0.0, 0.15625, 0.90625, 0.4375, 0.46875),
|
||||
Shapes.box(0.65625, 0.0, 0.59375, 0.96875, 0.4375, 0.90625),
|
||||
Shapes.box(0.15625, 0.0, 0.53125, 0.46875, 0.4375, 0.84375)
|
||||
)
|
||||
),
|
||||
StackableItemBlockType.ETHER to listOf(
|
||||
Shapes.box(0.375, 0.0, 0.3125, 0.625, 0.5, 0.6875),
|
||||
Shapes.or(
|
||||
Shapes.box(0.625, 0.0, 0.375, 0.875, 0.5, 0.75),
|
||||
Shapes.box(0.125, 0.0, 0.3125, 0.375, 0.5, 0.6875)
|
||||
StackableItemBlockType.MAX_POTION to listOf(
|
||||
Shapes.box(0.34375, 0.0, 0.3125, 0.65625, 0.5, 0.6875),
|
||||
Shapes.box(0.09375, 0.0, 0.3125, 0.90625, 0.5, 0.75),
|
||||
Shapes.box(0.09375, 0.0, 0.0625, 0.90625, 0.5, 1.0),
|
||||
Shapes.box(0.09375, 0.0, 0.0625, 0.96875, 0.5, 1.0)
|
||||
),
|
||||
Shapes.or(
|
||||
Shapes.box(0.375, 0.0, 0.125, 0.625, 0.5, 0.5),
|
||||
Shapes.box(0.125, 0.0, 0.5625, 0.375, 0.5, 0.9375),
|
||||
Shapes.box(0.625, 0.0, 0.625, 0.875, 0.5, 1.0)
|
||||
StackableItemBlockType.POTION to listOf(
|
||||
Shapes.box(0.375, 0.0, 0.3125, 0.625, 0.5625, 0.75),
|
||||
Shapes.box(0.125, 0.0, 0.3125, 0.875, 0.5625, 0.8125),
|
||||
Shapes.box(0.125, 0.0, 0.0625, 0.875, 0.5625, 1.0),
|
||||
Shapes.box(0.125, 0.0, 0.0, 0.9375, 0.5625, 1.0)
|
||||
),
|
||||
Shapes.or(
|
||||
Shapes.box(0.125, 0.0, 0.0625, 0.375, 0.5, 0.4375),
|
||||
Shapes.box(0.625, 0.0, 0.125, 0.875, 0.5, 0.5),
|
||||
Shapes.box(0.6875, 0.0, 0.625, 0.9375, 0.5, 1.0),
|
||||
Shapes.box(0.1875, 0.0, 0.5625, 0.4375, 0.5, 0.9375)
|
||||
)
|
||||
),
|
||||
StackableItemBlockType.MAX_POTION to listOf(
|
||||
Shapes.box(0.34375, 0.0, 0.3125, 0.65625, 0.5, 0.6875),
|
||||
Shapes.or(
|
||||
Shapes.box(0.09375, 0.0, 0.3125, 0.40625, 0.5, 0.6875),
|
||||
Shapes.box(0.59375, 0.0, 0.375, 0.90625, 0.5, 0.75)
|
||||
StackableItemBlockType.STATUS_RESTORE to listOf(
|
||||
Shapes.box(0.375, 0.0, 0.3125, 0.625, 0.4375, 0.6875),
|
||||
Shapes.box(0.125, 0.0, 0.3125, 0.875, 0.4375, 0.75),
|
||||
Shapes.box(0.125, 0.0, 0.0625, 0.875, 0.4375, 0.9375),
|
||||
Shapes.box(0.125, 0.0, 0.0, 0.9375, 0.4375, 0.9375)
|
||||
),
|
||||
Shapes.or(
|
||||
Shapes.box(0.34375, 0.0, 0.0625, 0.65625, 0.5, 0.4375),
|
||||
Shapes.box(0.09375, 0.0, 0.5625, 0.40625, 0.5, 0.9375),
|
||||
Shapes.box(0.59375, 0.0, 0.625, 0.90625, 0.5, 1.0)
|
||||
StackableItemBlockType.METAL_COAT to listOf(
|
||||
Shapes.box(0.3125, 0.0, 0.3125, 0.6875, 0.375, 0.6875),
|
||||
Shapes.box(0.125, 0.0, 0.125, 0.875, 0.375, 0.875),
|
||||
Shapes.box(0.125, 0.0, 0.0625, 0.9375, 0.375, 0.875),
|
||||
Shapes.box(0.0625, 0.0, 0.0625, 0.9375, 0.375, 0.9375)
|
||||
),
|
||||
Shapes.or(
|
||||
Shapes.box(0.09375, 0.0, 0.0625, 0.40625, 0.5, 0.4375),
|
||||
Shapes.box(0.15625, 0.0, 0.5625, 0.46875, 0.5, 0.9375),
|
||||
Shapes.box(0.65625, 0.0, 0.625, 0.96875, 0.5, 1.0),
|
||||
Shapes.box(0.59375, 0.0, 0.125, 0.90625, 0.5, 0.5)
|
||||
).singleEncompassing()
|
||||
),
|
||||
StackableItemBlockType.POTION to listOf(
|
||||
Shapes.box(0.375, 0.0, 0.3125, 0.625, 0.5625, 0.75),
|
||||
Shapes.or(
|
||||
Shapes.box(0.125, 0.0, 0.3125, 0.375, 0.5625, 0.75),
|
||||
Shapes.box(0.625, 0.0, 0.375, 0.875, 0.5625, 0.8125)
|
||||
StackableItemBlockType.VITAMIN to listOf(
|
||||
Shapes.box(0.375, 0.0, 0.375, 0.625, 0.4375, 0.625),
|
||||
Shapes.box(0.1875, 0.0, 0.3125, 0.8125, 0.4375, 0.6875),
|
||||
Shapes.box(0.1875, 0.0, 0.1875, 0.8125, 0.4375, 0.8125),
|
||||
Shapes.box(0.125, 0.0, 0.125, 0.875, 0.4375, 0.875)
|
||||
),
|
||||
Shapes.or(
|
||||
Shapes.box(0.375, 0.0, 0.0625, 0.625, 0.5625, 0.5),
|
||||
Shapes.box(0.625, 0.0, 0.5625, 0.875, 0.5625, 1.0),
|
||||
Shapes.box(0.125, 0.0, 0.5, 0.375, 0.5625, 0.9375)
|
||||
StackableItemBlockType.IRON_BALL to listOf(
|
||||
Shapes.box(0.25, 0.0, 0.25, 0.75, 0.4375, 0.75),
|
||||
Shapes.box(0.0, 0.0, 0.1875, 1.0, 0.4375, 0.8125),
|
||||
Shapes.box(0.0, 0.0, 0.0, 1.0, 0.4375, 1.0),
|
||||
Shapes.or(
|
||||
Shapes.box(0.0, 0.0, 0.0, 1.0, 0.4375, 1.0),
|
||||
Shapes.box(0.25, 0.4375, 0.3125, 0.6875, 0.875, 0.75)
|
||||
)
|
||||
),
|
||||
Shapes.or(
|
||||
Shapes.box(0.125, 0.0, 0.0, 0.375, 0.5625, 0.4375),
|
||||
Shapes.box(0.625, 0.0, 0.0625, 0.875, 0.5625, 0.5),
|
||||
Shapes.box(0.6875, 0.0, 0.5625, 0.9375, 0.5625, 1.0),
|
||||
Shapes.box(0.1875, 0.0, 0.5, 0.4375, 0.5625, 0.9375)
|
||||
)
|
||||
),
|
||||
StackableItemBlockType.STATUS_RESTORE to listOf(
|
||||
Shapes.box(0.375, 0.0, 0.3125, 0.625, 0.4375, 0.6875),
|
||||
Shapes.or(
|
||||
Shapes.box(0.125, 0.0, 0.3125, 0.375, 0.4375, 0.75),
|
||||
Shapes.box(0.625, 0.0, 0.375, 0.875, 0.4375, 0.75)
|
||||
StackableItemBlockType.THROAT_SPRAY to listOf(
|
||||
Shapes.box(0.375, 0.0, 0.1875, 0.625, 0.5625, 0.75),
|
||||
Shapes.box(0.125, 0.0, 0.1875, 0.875, 0.5625, 0.8125),
|
||||
Shapes.box(0.125, 0.0, 0.0, 0.875, 0.5625, 1.0),
|
||||
Shapes.box(0.075, 0.0, 0.0, 0.9375, 0.5625, 1.0)
|
||||
),
|
||||
Shapes.or(
|
||||
Shapes.box(0.125, 0.0, 0.5, 0.375, 0.4375, 0.875),
|
||||
Shapes.box(0.625, 0.0, 0.5625, 0.875, 0.4375, 0.9375),
|
||||
Shapes.box(0.375, 0.0, 0.0625, 0.625, 0.4375, 0.4375)
|
||||
StackableItemBlockType.UPGRADE to listOf(
|
||||
Shapes.box(0.3125, 0.0, 0.3125, 0.6875, 0.125, 0.6875),
|
||||
Shapes.box(0.3125, 0.0, 0.3125, 0.6875, 0.25, 0.6875),
|
||||
Shapes.box(0.3125, 0.0, 0.3125, 0.6875, 0.375, 0.6875),
|
||||
Shapes.box(0.3125, 0.0, 0.3125, 0.6875, 0.5, 0.6875)
|
||||
),
|
||||
Shapes.or(
|
||||
Shapes.box(0.1875, 0.0, 0.5, 0.4375, 0.4375, 0.875),
|
||||
Shapes.box(0.125, 0.0, 0.0, 0.375, 0.4375, 0.375),
|
||||
Shapes.box(0.625, 0.0, 0.0625, 0.875, 0.4375, 0.4375),
|
||||
Shapes.box(0.6875, 0.0, 0.5625, 0.9375, 0.4375, 0.9375)
|
||||
StackableItemBlockType.DICE to listOf(
|
||||
Shapes.box(0.125, 0.0, 0.6875, 0.3125, 0.1875, 0.875),
|
||||
Shapes.box(0.125, 0.0, 0.625, 0.5625, 0.1875, 0.875),
|
||||
Shapes.box(0.125, 0.0, 0.4375, 0.5625, 0.1875, 0.875),
|
||||
Shapes.box(0.125, 0.0, 0.4375, 0.5625, 0.375, 0.875)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
fun getShape(type: StackableItemBlockType, count: Int): VoxelShape = northShapeMap[type]?.let { list -> list[(count - 1).coerceIn(0, list.lastIndex)] } ?: Shapes.block()
|
||||
fun getMaxAmount(type: StackableItemBlockType): Int = min(northShapeMap[type]?.size ?: 1 , MAX_AMOUNT)
|
||||
@@ -184,7 +170,7 @@ class StackableItemBlock(settings: Properties, val type: StackableItemBlockType)
|
||||
}
|
||||
|
||||
override fun getShape(state: BlockState, level: BlockGetter, pos: BlockPos, context: CollisionContext): VoxelShape {
|
||||
return getCollisionShape(state, level, pos, context).singleEncompassing()
|
||||
return getCollisionShape(state, level, pos, context)
|
||||
}
|
||||
|
||||
override fun getStateForPlacement(context: BlockPlaceContext): BlockState? {
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.block.appliances
|
||||
|
||||
import com.cobblemon.mod.common.util.rotateShape
|
||||
import com.mojang.serialization.MapCodec
|
||||
import com.mojang.serialization.codecs.RecordCodecBuilder
|
||||
import net.minecraft.core.BlockPos
|
||||
import net.minecraft.core.Direction
|
||||
import net.minecraft.world.item.context.BlockPlaceContext
|
||||
import net.minecraft.world.level.BlockGetter
|
||||
import net.minecraft.world.level.LevelAccessor
|
||||
import net.minecraft.world.level.block.*
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
import net.minecraft.world.level.block.state.StateDefinition
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties.HORIZONTAL_FACING
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties.WATERLOGGED
|
||||
import net.minecraft.world.level.block.state.properties.BooleanProperty
|
||||
import net.minecraft.world.level.material.FluidState
|
||||
import net.minecraft.world.level.material.Fluids
|
||||
import net.minecraft.world.phys.shapes.CollisionContext
|
||||
import net.minecraft.world.phys.shapes.Shapes
|
||||
import net.minecraft.world.phys.shapes.VoxelShape
|
||||
//TODO: All the Fan appliance stuff
|
||||
//TODO: Able to place the Fan on Walls, models and hitbox are there (blockstate would need edits to support it)
|
||||
open class CopperFanBlock(settings: Properties) : HorizontalDirectionalBlock(settings), SimpleWaterloggedBlock {
|
||||
|
||||
companion object {
|
||||
val CODEC: MapCodec<CopperFanBlock> = RecordCodecBuilder.mapCodec {
|
||||
it.group(propertiesCodec()).apply(it, ::CopperFanBlock) }
|
||||
//val FACE = //TODO: Floor/Wall
|
||||
val POWER = BlockStateProperties.POWER;
|
||||
val PUSH = BooleanProperty.create("push")
|
||||
|
||||
val FLOOR_HITBOX = Shapes.or(
|
||||
Shapes.box(0.0625, 0.125, 0.4375, 0.9375, 1.0, 0.5625),
|
||||
Shapes.box(0.375, 0.0, 0.375, 0.625, 0.125, 0.625))
|
||||
val WALL_HITBOX = Shapes.box(0.0625, 0.0625, 0.875, 0.9375, 0.9375, 1.0)
|
||||
}
|
||||
|
||||
init {
|
||||
registerDefaultState(stateDefinition.any()
|
||||
.setValue(HORIZONTAL_FACING, Direction.NORTH)
|
||||
.setValue(WATERLOGGED, false)
|
||||
//.setValue(FACE, AttachFace.FLOOR)
|
||||
.setValue(POWER, 0)
|
||||
.setValue(PUSH, true) //If True, fan pushes entities, If False, fan is cosmetic only
|
||||
)
|
||||
}
|
||||
|
||||
override fun codec(): MapCodec<CopperFanBlock> = CODEC
|
||||
|
||||
override fun createBlockStateDefinition(builder: StateDefinition.Builder<Block, BlockState>) {
|
||||
builder.add(HORIZONTAL_FACING, WATERLOGGED, /*FACE,*/ POWER, PUSH)
|
||||
}
|
||||
|
||||
override fun getFluidState(blockState: BlockState): FluidState? = if (blockState.getValue(WATERLOGGED)) Fluids.WATER.getSource(false) else super.getFluidState(blockState)
|
||||
|
||||
override fun updateShape(state: BlockState, direction: Direction, neighborState: BlockState, world: LevelAccessor, pos: BlockPos, neighborPos: BlockPos): BlockState {
|
||||
if (state.getValue(WATERLOGGED)) {
|
||||
world.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(world))
|
||||
}
|
||||
return if (state.getValue(HORIZONTAL_FACING).opposite == direction && !state.canSurvive(world, pos)) Blocks.AIR.defaultBlockState()
|
||||
else super.updateShape(state, direction, neighborState, world, pos, neighborPos)
|
||||
}
|
||||
|
||||
override fun getCollisionShape(state: BlockState, level: BlockGetter, pos: BlockPos, context: CollisionContext): VoxelShape {
|
||||
val direction = state.getValue(HORIZONTAL_FACING)
|
||||
return rotateShape(Direction.NORTH, direction, FLOOR_HITBOX)
|
||||
}
|
||||
|
||||
override fun getShape(state: BlockState, level: BlockGetter, pos: BlockPos, context: CollisionContext): VoxelShape {
|
||||
return getCollisionShape(state, level, pos, context)
|
||||
}
|
||||
|
||||
override fun getStateForPlacement(context: BlockPlaceContext): BlockState? {
|
||||
val fluidState = context.level.getFluidState(context.clickedPos)
|
||||
return super.getStateForPlacement(context)?.setValue(HORIZONTAL_FACING, context.horizontalDirection.opposite)?.setValue(WATERLOGGED, fluidState.type === Fluids.WATER)
|
||||
}
|
||||
}
|
||||
+153
@@ -0,0 +1,153 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.block.appliances
|
||||
|
||||
import com.cobblemon.mod.common.util.rotateShape
|
||||
import com.mojang.serialization.MapCodec
|
||||
import com.mojang.serialization.codecs.RecordCodecBuilder
|
||||
import net.minecraft.core.BlockPos
|
||||
import net.minecraft.core.Direction
|
||||
import net.minecraft.util.StringRepresentable
|
||||
import net.minecraft.world.entity.LivingEntity
|
||||
import net.minecraft.world.entity.player.Player
|
||||
import net.minecraft.world.item.ItemStack
|
||||
import net.minecraft.world.item.context.BlockPlaceContext
|
||||
import net.minecraft.world.level.BlockGetter
|
||||
import net.minecraft.world.level.Level
|
||||
import net.minecraft.world.level.LevelAccessor
|
||||
import net.minecraft.world.level.LevelReader
|
||||
import net.minecraft.world.level.block.*
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
import net.minecraft.world.level.block.state.StateDefinition
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties.HORIZONTAL_FACING
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties.WATERLOGGED
|
||||
import net.minecraft.world.level.block.state.properties.BooleanProperty
|
||||
import net.minecraft.world.level.block.state.properties.DoubleBlockHalf
|
||||
import net.minecraft.world.level.block.state.properties.EnumProperty
|
||||
import net.minecraft.world.level.material.FluidState
|
||||
import net.minecraft.world.level.material.Fluids
|
||||
import net.minecraft.world.phys.shapes.CollisionContext
|
||||
import net.minecraft.world.phys.shapes.Shapes
|
||||
import net.minecraft.world.phys.shapes.VoxelShape
|
||||
//TODO: Oxidation/Waxing/Scraping not breaking the blocks
|
||||
//TODO: All the Fridge appliance stuff
|
||||
open class CopperFridgeBlock(settings: Properties) : HorizontalDirectionalBlock(settings), SimpleWaterloggedBlock {
|
||||
|
||||
companion object {
|
||||
val CODEC: MapCodec<CopperFridgeBlock> = RecordCodecBuilder.mapCodec {
|
||||
it.group(propertiesCodec()).apply(it, ::CopperFridgeBlock) }
|
||||
val HALF: EnumProperty<DoubleBlockHalf> = BlockStateProperties.DOUBLE_BLOCK_HALF
|
||||
val POWERED = BooleanProperty.create("powered")
|
||||
|
||||
val LOWER_HITBOX = Shapes.or(
|
||||
Shapes.box(0.0625, 0.0, 0.125, 0.9375, 0.0625, 0.9375),
|
||||
Shapes.box(0.0, 0.0625, 0.0625, 1.0, 1.0, 1.0))
|
||||
val UPPER_HITBOX = Shapes.or(
|
||||
Shapes.box(0.0, 0.0, 0.0625, 1.0, 1.0, 1.0),
|
||||
Shapes.box(0.25, 0.125, 0.0, 0.375, 0.3125, 0.0625),
|
||||
Shapes.box(0.625, 0.125, 0.0, 0.75, 0.3125, 0.0625))
|
||||
val UPPER_COLLISSIONBOX = Shapes.box(0.0, 0.0, 0.0625, 1.0, 1.0, 1.0)
|
||||
//The handles get ignored by entity collission, because it feels nicer, but still count as part of the hitbox
|
||||
}
|
||||
|
||||
init {
|
||||
registerDefaultState(stateDefinition.any()
|
||||
.setValue(HORIZONTAL_FACING, Direction.NORTH)
|
||||
.setValue(HALF, DoubleBlockHalf.LOWER)
|
||||
.setValue(WATERLOGGED, false)
|
||||
.setValue(POWERED, false)
|
||||
)
|
||||
}
|
||||
|
||||
override fun codec(): MapCodec<CopperFridgeBlock> = CODEC
|
||||
|
||||
override fun createBlockStateDefinition(builder: StateDefinition.Builder<Block, BlockState>) {
|
||||
builder.add(HORIZONTAL_FACING, HALF, WATERLOGGED, POWERED)
|
||||
}
|
||||
|
||||
override fun getFluidState(blockState: BlockState): FluidState? = if (blockState.getValue(WATERLOGGED)) Fluids.WATER.getSource(false) else super.getFluidState(blockState)
|
||||
|
||||
override fun updateShape(state: BlockState, direction: Direction, neighborState: BlockState, world: LevelAccessor, pos: BlockPos, neighborPos: BlockPos): BlockState {
|
||||
if (state.getValue(WATERLOGGED)) {
|
||||
world.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(world))
|
||||
}
|
||||
|
||||
val isFridge = neighborState.`is`(this)
|
||||
val half = state.getValue(HALF)
|
||||
if (!isFridge && half == DoubleBlockHalf.UPPER && neighborPos == pos.below()) {
|
||||
return Blocks.AIR.defaultBlockState()
|
||||
} else if (!isFridge && half == DoubleBlockHalf.LOWER && neighborPos == pos.above()) {
|
||||
return Blocks.AIR.defaultBlockState()
|
||||
}
|
||||
return state
|
||||
}
|
||||
|
||||
override fun getCollisionShape(state: BlockState, level: BlockGetter, pos: BlockPos, context: CollisionContext): VoxelShape {
|
||||
val direction = state.getValue(HORIZONTAL_FACING)
|
||||
return if (state.getValue(HALF) == DoubleBlockHalf.LOWER) {
|
||||
rotateShape(Direction.NORTH, direction, LOWER_HITBOX)
|
||||
} else {
|
||||
rotateShape(Direction.NORTH, direction, UPPER_COLLISSIONBOX)
|
||||
}
|
||||
}
|
||||
|
||||
override fun getShape(state: BlockState, level: BlockGetter, pos: BlockPos, context: CollisionContext): VoxelShape {
|
||||
val direction = state.getValue(HORIZONTAL_FACING)
|
||||
return if (state.getValue(HALF) == DoubleBlockHalf.LOWER) {
|
||||
rotateShape(Direction.NORTH, direction, LOWER_HITBOX)
|
||||
} else {
|
||||
rotateShape(Direction.NORTH, direction, UPPER_HITBOX)
|
||||
}
|
||||
}
|
||||
|
||||
override fun setPlacedBy(world: Level, pos: BlockPos, state: BlockState, placer: LivingEntity?, itemStack: ItemStack) {
|
||||
world.setBlock(pos.above(),
|
||||
state
|
||||
.setValue(HALF, DoubleBlockHalf.UPPER)
|
||||
.setValue(WATERLOGGED, world.getFluidState((pos.above())).type == Fluids.WATER)
|
||||
, 3)
|
||||
world.blockUpdated(pos, Blocks.AIR)
|
||||
state.updateNeighbourShapes(world, pos, 3)
|
||||
}
|
||||
|
||||
override fun getStateForPlacement(blockPlaceContext: BlockPlaceContext): BlockState? {
|
||||
val abovePosition = blockPlaceContext.clickedPos.above()
|
||||
val world = blockPlaceContext.level
|
||||
if (world.getBlockState(abovePosition).canBeReplaced(blockPlaceContext) && !world.isOutsideBuildHeight(abovePosition)) {
|
||||
return defaultBlockState()
|
||||
.setValue(FACING, blockPlaceContext.horizontalDirection.opposite)
|
||||
.setValue(HALF, DoubleBlockHalf.LOWER)
|
||||
.setValue(WATERLOGGED, blockPlaceContext.level.getFluidState(blockPlaceContext.clickedPos).type == Fluids.WATER)
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
override fun canSurvive(state: BlockState, world: LevelReader, pos: BlockPos): Boolean {
|
||||
val blockPos = pos.below()
|
||||
val blockState = world.getBlockState(blockPos)
|
||||
return if (state.getValue(HALF) == DoubleBlockHalf.LOWER) blockState.isFaceSturdy(world, blockPos, Direction.UP) else blockState.`is`(this)
|
||||
}
|
||||
|
||||
override fun playerWillDestroy(world: Level, pos: BlockPos, state: BlockState, player: Player): BlockState {
|
||||
if (!world.isClientSide && player.isCreative) {
|
||||
var blockPos: BlockPos = BlockPos.ZERO
|
||||
var blockState: BlockState = state
|
||||
val half = state.getValue(HALF)
|
||||
if (half == DoubleBlockHalf.UPPER && world.getBlockState(pos.below().also { blockPos = it }).also { blockState = it }.`is`(state.block) && blockState.getValue(
|
||||
HALF
|
||||
) == DoubleBlockHalf.LOWER) {
|
||||
val blockState2 = if (blockState.fluidState.`is`(Fluids.WATER)) Blocks.WATER.defaultBlockState() else Blocks.AIR.defaultBlockState()
|
||||
world.setBlock(blockPos, blockState2, UPDATE_ALL or UPDATE_SUPPRESS_DROPS)
|
||||
world.levelEvent(player, LevelEvent.PARTICLES_DESTROY_BLOCK, blockPos, getId(blockState))
|
||||
}
|
||||
}
|
||||
return super.playerWillDestroy(world, pos, state, player)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.block.appliances
|
||||
|
||||
import com.cobblemon.mod.common.util.rotateShape
|
||||
import com.mojang.serialization.MapCodec
|
||||
import com.mojang.serialization.codecs.RecordCodecBuilder
|
||||
import net.minecraft.core.BlockPos
|
||||
import net.minecraft.core.Direction
|
||||
import net.minecraft.world.item.context.BlockPlaceContext
|
||||
import net.minecraft.world.level.BlockGetter
|
||||
import net.minecraft.world.level.LevelAccessor
|
||||
import net.minecraft.world.level.block.*
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
import net.minecraft.world.level.block.state.StateDefinition
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties.HORIZONTAL_FACING
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties.WATERLOGGED
|
||||
import net.minecraft.world.level.block.state.properties.BooleanProperty
|
||||
import net.minecraft.world.level.material.FluidState
|
||||
import net.minecraft.world.level.material.Fluids
|
||||
import net.minecraft.world.phys.shapes.CollisionContext
|
||||
import net.minecraft.world.phys.shapes.Shapes
|
||||
import net.minecraft.world.phys.shapes.VoxelShape
|
||||
//TODO: All the Mower appliance stuff
|
||||
open class CopperMowerBlock(settings: Properties) : HorizontalDirectionalBlock(settings), SimpleWaterloggedBlock {
|
||||
|
||||
companion object {
|
||||
val CODEC: MapCodec<CopperMowerBlock> = RecordCodecBuilder.mapCodec {
|
||||
it.group(propertiesCodec()).apply(it, ::CopperMowerBlock) }
|
||||
val TRIGGERED = BooleanProperty.create("triggered")
|
||||
|
||||
val COLLISIONBOX = Shapes.or(
|
||||
Shapes.box(0.1875, 0.0, 0.0, 0.8125, 0.375, 0.625),
|
||||
Shapes.box(0.0625, 0.0, 0.625, 0.9375, 0.625, 1.0),
|
||||
Shapes.box(0.125, 0.0, 0.1875, 0.875, 0.3125, 0.5),
|
||||
//The next three lines are just so the handle does have collision, it feels awkward without it but it looks bad as hitbox
|
||||
Shapes.box(0.375, 0.375, 0.375, 0.625, 0.625, 0.5625),
|
||||
Shapes.box(0.4375, 0.5625, 0.5, 0.5625, 0.875, 0.625),
|
||||
Shapes.box(0.25, 0.875, 0.5625, 0.75, 1.0, 0.6875)
|
||||
)
|
||||
val HITBOX = Shapes.or(
|
||||
Shapes.box(0.1875, 0.0, 0.0, 0.8125, 0.375, 0.625),
|
||||
Shapes.box(0.0625, 0.0, 0.625, 0.9375, 0.625, 1.0),
|
||||
Shapes.box(0.125, 0.0, 0.1875, 0.875, 0.3125, 0.5)
|
||||
)
|
||||
}
|
||||
|
||||
init {
|
||||
registerDefaultState(stateDefinition.any()
|
||||
.setValue(HORIZONTAL_FACING, Direction.NORTH)
|
||||
.setValue(WATERLOGGED, false)
|
||||
.setValue(TRIGGERED, false)
|
||||
)
|
||||
}
|
||||
|
||||
override fun codec(): MapCodec<CopperMowerBlock> = CODEC
|
||||
|
||||
override fun createBlockStateDefinition(builder: StateDefinition.Builder<Block, BlockState>) {
|
||||
builder.add(HORIZONTAL_FACING, WATERLOGGED, TRIGGERED)
|
||||
}
|
||||
|
||||
override fun getFluidState(blockState: BlockState): FluidState? = if (blockState.getValue(WATERLOGGED)) Fluids.WATER.getSource(false) else super.getFluidState(blockState)
|
||||
|
||||
override fun updateShape(state: BlockState, direction: Direction, neighborState: BlockState, world: LevelAccessor, pos: BlockPos, neighborPos: BlockPos): BlockState {
|
||||
if (state.getValue(WATERLOGGED)) {
|
||||
world.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(world))
|
||||
}
|
||||
return if (state.getValue(HORIZONTAL_FACING).opposite == direction && !state.canSurvive(world, pos)) Blocks.AIR.defaultBlockState()
|
||||
else super.updateShape(state, direction, neighborState, world, pos, neighborPos)
|
||||
}
|
||||
|
||||
override fun getCollisionShape(state: BlockState, level: BlockGetter, pos: BlockPos, context: CollisionContext): VoxelShape {
|
||||
val direction = state.getValue(HORIZONTAL_FACING)
|
||||
return rotateShape(Direction.NORTH, direction, COLLISIONBOX)
|
||||
}
|
||||
|
||||
override fun getShape(state: BlockState, level: BlockGetter, pos: BlockPos, context: CollisionContext): VoxelShape {
|
||||
val direction = state.getValue(HORIZONTAL_FACING)
|
||||
return rotateShape(Direction.NORTH, direction, HITBOX)
|
||||
}
|
||||
|
||||
override fun getStateForPlacement(context: BlockPlaceContext): BlockState? {
|
||||
val fluidState = context.level.getFluidState(context.clickedPos)
|
||||
return super.getStateForPlacement(context)?.setValue(HORIZONTAL_FACING, context.horizontalDirection)?.setValue(WATERLOGGED, fluidState.type === Fluids.WATER)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.block.appliances
|
||||
|
||||
import com.cobblemon.mod.common.util.rotateShape
|
||||
import com.mojang.serialization.MapCodec
|
||||
import com.mojang.serialization.codecs.RecordCodecBuilder
|
||||
import net.minecraft.core.BlockPos
|
||||
import net.minecraft.core.Direction
|
||||
import net.minecraft.util.StringRepresentable
|
||||
import net.minecraft.world.item.context.BlockPlaceContext
|
||||
import net.minecraft.world.level.BlockGetter
|
||||
import net.minecraft.world.level.LevelAccessor
|
||||
import net.minecraft.world.level.block.*
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
import net.minecraft.world.level.block.state.StateDefinition
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties.HORIZONTAL_FACING
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties.WATERLOGGED
|
||||
import net.minecraft.world.level.block.state.properties.BooleanProperty
|
||||
import net.minecraft.world.level.block.state.properties.EnumProperty
|
||||
import net.minecraft.world.level.material.FluidState
|
||||
import net.minecraft.world.level.material.Fluids
|
||||
import net.minecraft.world.phys.shapes.CollisionContext
|
||||
import net.minecraft.world.phys.shapes.Shapes
|
||||
import net.minecraft.world.phys.shapes.VoxelShape
|
||||
//TODO: All the Oven appliance stuff - Good Luck Coders
|
||||
open class CopperOvenBlock(settings: Properties) : HorizontalDirectionalBlock(settings), SimpleWaterloggedBlock {
|
||||
|
||||
companion object {
|
||||
val CODEC: MapCodec<CopperOvenBlock> = RecordCodecBuilder.mapCodec {
|
||||
it.group(propertiesCodec()).apply(it, ::CopperOvenBlock) }
|
||||
val EJECTING = BooleanProperty.create("ejecting")
|
||||
val COOKING = EnumProperty.create("cooking", CookingState::class.java)
|
||||
|
||||
val HITBOX = Shapes.box(0.0625, 0.0, 0.3125, 0.9375, 0.625, 0.9375)
|
||||
}
|
||||
|
||||
init {
|
||||
registerDefaultState(stateDefinition.any()
|
||||
.setValue(HORIZONTAL_FACING, Direction.NORTH)
|
||||
.setValue(WATERLOGGED, false)
|
||||
.setValue(COOKING, CookingState.CLOSED)
|
||||
.setValue(EJECTING, false)
|
||||
)
|
||||
}
|
||||
enum class CookingState : StringRepresentable {
|
||||
CLOSED, //Door is closed
|
||||
OPEN, //Door is open
|
||||
COOKING; //Door is locked closed and the light level is cranked up, as long as the block is powered by redstone. Acts as closed lid in the original Campfire Pot
|
||||
override fun getSerializedName(): String = this.name.lowercase()
|
||||
}
|
||||
|
||||
override fun codec(): MapCodec<CopperOvenBlock> = CODEC
|
||||
|
||||
override fun createBlockStateDefinition(builder: StateDefinition.Builder<Block, BlockState>) {
|
||||
builder.add(HORIZONTAL_FACING, WATERLOGGED, COOKING, EJECTING)
|
||||
}
|
||||
|
||||
override fun getFluidState(blockState: BlockState): FluidState? = if (blockState.getValue(WATERLOGGED)) Fluids.WATER.getSource(false) else super.getFluidState(blockState)
|
||||
|
||||
override fun updateShape(state: BlockState, direction: Direction, neighborState: BlockState, world: LevelAccessor, pos: BlockPos, neighborPos: BlockPos): BlockState {
|
||||
if (state.getValue(WATERLOGGED)) {
|
||||
world.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(world))
|
||||
}
|
||||
return if (state.getValue(HORIZONTAL_FACING).opposite == direction && !state.canSurvive(world, pos)) Blocks.AIR.defaultBlockState()
|
||||
else super.updateShape(state, direction, neighborState, world, pos, neighborPos)
|
||||
}
|
||||
|
||||
override fun getCollisionShape(state: BlockState, level: BlockGetter, pos: BlockPos, context: CollisionContext): VoxelShape {
|
||||
val direction = state.getValue(HORIZONTAL_FACING)
|
||||
return rotateShape(Direction.NORTH, direction, HITBOX)
|
||||
}
|
||||
|
||||
override fun getShape(state: BlockState, level: BlockGetter, pos: BlockPos, context: CollisionContext): VoxelShape {
|
||||
return getCollisionShape(state, level, pos, context).singleEncompassing()
|
||||
}
|
||||
|
||||
override fun getStateForPlacement(context: BlockPlaceContext): BlockState? {
|
||||
val fluidState = context.level.getFluidState(context.clickedPos)
|
||||
return super.getStateForPlacement(context)?.setValue(HORIZONTAL_FACING, context.horizontalDirection.opposite)?.setValue(WATERLOGGED, fluidState.type === Fluids.WATER)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.block.appliances
|
||||
|
||||
import com.cobblemon.mod.common.util.rotateShape
|
||||
import com.mojang.serialization.MapCodec
|
||||
import com.mojang.serialization.codecs.RecordCodecBuilder
|
||||
import net.minecraft.core.BlockPos
|
||||
import net.minecraft.core.Direction
|
||||
import net.minecraft.world.item.context.BlockPlaceContext
|
||||
import net.minecraft.world.level.BlockGetter
|
||||
import net.minecraft.world.level.LevelAccessor
|
||||
import net.minecraft.world.level.block.*
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
import net.minecraft.world.level.block.state.StateDefinition
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties.HORIZONTAL_FACING
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties.WATERLOGGED
|
||||
import net.minecraft.world.level.block.state.properties.BooleanProperty
|
||||
import net.minecraft.world.level.material.FluidState
|
||||
import net.minecraft.world.level.material.Fluids
|
||||
import net.minecraft.world.phys.shapes.CollisionContext
|
||||
import net.minecraft.world.phys.shapes.Shapes
|
||||
import net.minecraft.world.phys.shapes.VoxelShape
|
||||
|
||||
open class CopperWasherBlock(settings: Properties) : HorizontalDirectionalBlock(settings), SimpleWaterloggedBlock {
|
||||
|
||||
companion object {
|
||||
val CODEC: MapCodec<CopperWasherBlock> = RecordCodecBuilder.mapCodec {
|
||||
it.group(propertiesCodec()).apply(it, ::CopperWasherBlock) }
|
||||
val POWERED = BooleanProperty.create("powered")
|
||||
|
||||
val HITBOX = Shapes.box(0.0625, 0.0, 0.125, 0.9375, 1.0, 1.0)
|
||||
}
|
||||
|
||||
init {
|
||||
registerDefaultState(stateDefinition.any()
|
||||
.setValue(HORIZONTAL_FACING, Direction.NORTH)
|
||||
.setValue(WATERLOGGED, false)
|
||||
.setValue(POWERED, false)
|
||||
)
|
||||
}
|
||||
|
||||
override fun codec(): MapCodec<CopperWasherBlock> = CODEC
|
||||
|
||||
override fun createBlockStateDefinition(builder: StateDefinition.Builder<Block, BlockState>) {
|
||||
builder.add(HORIZONTAL_FACING, WATERLOGGED, POWERED)
|
||||
}
|
||||
|
||||
override fun getFluidState(blockState: BlockState): FluidState? = if (blockState.getValue(WATERLOGGED)) Fluids.WATER.getSource(false) else super.getFluidState(blockState)
|
||||
|
||||
override fun updateShape(state: BlockState, direction: Direction, neighborState: BlockState, world: LevelAccessor, pos: BlockPos, neighborPos: BlockPos): BlockState {
|
||||
if (state.getValue(WATERLOGGED)) {
|
||||
world.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(world))
|
||||
}
|
||||
return if (state.getValue(HORIZONTAL_FACING).opposite == direction && !state.canSurvive(world, pos)) Blocks.AIR.defaultBlockState()
|
||||
else super.updateShape(state, direction, neighborState, world, pos, neighborPos)
|
||||
}
|
||||
|
||||
override fun getCollisionShape(state: BlockState, level: BlockGetter, pos: BlockPos, context: CollisionContext): VoxelShape {
|
||||
val direction = state.getValue(HORIZONTAL_FACING)
|
||||
return rotateShape(Direction.NORTH, direction, HITBOX)
|
||||
}
|
||||
|
||||
override fun getShape(state: BlockState, level: BlockGetter, pos: BlockPos, context: CollisionContext): VoxelShape {
|
||||
return getCollisionShape(state, level, pos, context).singleEncompassing()
|
||||
}
|
||||
|
||||
override fun getStateForPlacement(context: BlockPlaceContext): BlockState? {
|
||||
val fluidState = context.level.getFluidState(context.clickedPos)
|
||||
return super.getStateForPlacement(context)?.setValue(HORIZONTAL_FACING, context.horizontalDirection.opposite)?.setValue(WATERLOGGED, fluidState.type === Fluids.WATER)
|
||||
}
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.block.appliances
|
||||
|
||||
import net.minecraft.core.BlockPos
|
||||
import net.minecraft.server.level.ServerLevel
|
||||
import net.minecraft.util.RandomSource
|
||||
import net.minecraft.world.level.block.WeatheringCopper
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
|
||||
class WeatheringCopperFanBlock(val weatherState: WeatheringCopper.WeatherState, properties: Properties) :
|
||||
CopperFanBlock(properties), WeatheringCopper {
|
||||
|
||||
override fun randomTick(state: BlockState?, level: ServerLevel?, pos: BlockPos?, random: RandomSource?) {
|
||||
this.changeOverTime(state, level, pos, random)
|
||||
}
|
||||
|
||||
override fun isRandomlyTicking(state: BlockState): Boolean {
|
||||
return WeatheringCopper.getNext(state.getBlock()).isPresent()
|
||||
}
|
||||
|
||||
override fun getAge(): WeatheringCopper.WeatherState {
|
||||
return this.weatherState
|
||||
}
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.block.appliances
|
||||
|
||||
import net.minecraft.core.BlockPos
|
||||
import net.minecraft.server.level.ServerLevel
|
||||
import net.minecraft.util.RandomSource
|
||||
import net.minecraft.world.level.block.WeatheringCopper
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
import net.minecraft.world.level.block.state.properties.DoubleBlockHalf
|
||||
|
||||
class WeatheringCopperFridgeBlock(val weatherState: WeatheringCopper.WeatherState, properties: Properties) :
|
||||
CopperFridgeBlock(properties), WeatheringCopper {
|
||||
|
||||
override fun randomTick(state: BlockState, level: ServerLevel?, pos: BlockPos?, random: RandomSource?) {
|
||||
if (state.getValue(HALF) == DoubleBlockHalf.LOWER) {
|
||||
this.changeOverTime(state, level, pos, random)
|
||||
}
|
||||
}
|
||||
|
||||
override fun isRandomlyTicking(state: BlockState): Boolean {
|
||||
return WeatheringCopper.getNext(state.getBlock()).isPresent()
|
||||
}
|
||||
|
||||
override fun getAge(): WeatheringCopper.WeatherState {
|
||||
return this.weatherState
|
||||
}
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.block.appliances
|
||||
|
||||
import net.minecraft.core.BlockPos
|
||||
import net.minecraft.server.level.ServerLevel
|
||||
import net.minecraft.util.RandomSource
|
||||
import net.minecraft.world.level.block.WeatheringCopper
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
|
||||
class WeatheringCopperMowerBlock(val weatherState: WeatheringCopper.WeatherState, properties: Properties) :
|
||||
CopperMowerBlock(properties), WeatheringCopper {
|
||||
|
||||
override fun randomTick(state: BlockState?, level: ServerLevel?, pos: BlockPos?, random: RandomSource?) {
|
||||
this.changeOverTime(state, level, pos, random)
|
||||
}
|
||||
|
||||
override fun isRandomlyTicking(state: BlockState): Boolean {
|
||||
return WeatheringCopper.getNext(state.getBlock()).isPresent()
|
||||
}
|
||||
|
||||
override fun getAge(): WeatheringCopper.WeatherState {
|
||||
return this.weatherState
|
||||
}
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.block.appliances
|
||||
|
||||
import net.minecraft.core.BlockPos
|
||||
import net.minecraft.server.level.ServerLevel
|
||||
import net.minecraft.util.RandomSource
|
||||
import net.minecraft.world.level.block.WeatheringCopper
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
|
||||
class WeatheringCopperOvenBlock(val weatherState: WeatheringCopper.WeatherState, properties: Properties) :
|
||||
CopperOvenBlock(properties), WeatheringCopper {
|
||||
|
||||
override fun randomTick(state: BlockState?, level: ServerLevel?, pos: BlockPos?, random: RandomSource?) {
|
||||
this.changeOverTime(state, level, pos, random)
|
||||
}
|
||||
|
||||
override fun isRandomlyTicking(state: BlockState): Boolean {
|
||||
return WeatheringCopper.getNext(state.getBlock()).isPresent()
|
||||
}
|
||||
|
||||
override fun getAge(): WeatheringCopper.WeatherState {
|
||||
return this.weatherState
|
||||
}
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.block.appliances
|
||||
|
||||
import net.minecraft.core.BlockPos
|
||||
import net.minecraft.server.level.ServerLevel
|
||||
import net.minecraft.util.RandomSource
|
||||
import net.minecraft.world.level.block.WeatheringCopper
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
|
||||
class WeatheringCopperWasherBlock(val weatherState: WeatheringCopper.WeatherState, properties: Properties) :
|
||||
CopperWasherBlock(properties), WeatheringCopper {
|
||||
|
||||
override fun randomTick(state: BlockState?, level: ServerLevel?, pos: BlockPos?, random: RandomSource?) {
|
||||
this.changeOverTime(state, level, pos, random)
|
||||
}
|
||||
|
||||
override fun isRandomlyTicking(state: BlockState): Boolean {
|
||||
return WeatheringCopper.getNext(state.getBlock()).isPresent()
|
||||
}
|
||||
|
||||
override fun getAge(): WeatheringCopper.WeatherState {
|
||||
return this.weatherState
|
||||
}
|
||||
}
|
||||
@@ -128,6 +128,7 @@ class DiscShelfBlockEntity(pos: BlockPos, state: BlockState) : BlockEntity(Cobbl
|
||||
|
||||
fun isValidItem(stack: ItemStack): Boolean {
|
||||
return stack.item is TechnicalMachineItem
|
||||
|| stack.item == CobblemonItems.BLANK_TM
|
||||
|| stack.item == CobblemonItems.UPGRADE
|
||||
|| stack.item == CobblemonItems.DUBIOUS_DISC
|
||||
|| stack.has(DataComponents.JUKEBOX_PLAYABLE)
|
||||
|
||||
+2
@@ -31,6 +31,7 @@ import com.cobblemon.mod.common.client.sound.instances.CancellableSoundInstance
|
||||
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
|
||||
import com.cobblemon.mod.common.item.PokeBallItem
|
||||
import com.cobblemon.mod.common.pokemon.Pokemon
|
||||
import com.cobblemon.mod.common.pokemon.activestate.SentOutState
|
||||
import com.cobblemon.mod.common.util.DataKeys
|
||||
import com.cobblemon.mod.common.util.giveOrDropItemStack
|
||||
import com.cobblemon.mod.common.util.lang
|
||||
@@ -235,6 +236,7 @@ class FossilMultiblockStructure (
|
||||
entity.setPos(fixedPosition.center.subtract(0.0, 0.5, 0.0))
|
||||
// TODO: Find a correct way to set the new entity's Yaw rotation. (Face away from the machine)
|
||||
if (world.addFreshEntity(entity)) {
|
||||
pokemon.state = SentOutState(entity)
|
||||
CobblemonEvents.FOSSIL_REVIVED.post(FossilRevivedEvent(pokemon, null))
|
||||
return true
|
||||
} else {
|
||||
|
||||
@@ -22,6 +22,7 @@ import com.cobblemon.mod.common.api.storage.player.client.ClientPokedexManager
|
||||
import com.cobblemon.mod.common.api.storage.player.client.ClientTMMoveManager
|
||||
import com.cobblemon.mod.common.api.tags.CobblemonItemTags
|
||||
import com.cobblemon.mod.common.block.entity.TintBlockEntity
|
||||
import com.cobblemon.mod.common.block.sign.CobblemonSignBlock
|
||||
import com.cobblemon.mod.common.client.battle.ClientBattle
|
||||
import com.cobblemon.mod.common.client.gui.PartyOverlay
|
||||
import com.cobblemon.mod.common.client.gui.PartyOverlayDataControl
|
||||
@@ -238,6 +239,12 @@ object CobblemonClient {
|
||||
CobblemonBlocks.POKE_CAKE
|
||||
)
|
||||
|
||||
this.implementation.registerBlockRenderType(
|
||||
RenderType.translucent(),
|
||||
CobblemonBlocks.UPGRADE,
|
||||
CobblemonBlocks.DUBIOUS_DISC
|
||||
)
|
||||
|
||||
this.implementation.registerBlockRenderType(
|
||||
RenderType.cutout(),
|
||||
CobblemonBlocks.GILDED_CHEST,
|
||||
@@ -383,7 +390,40 @@ object CobblemonClient {
|
||||
CobblemonBlocks.X_SP_ATK,
|
||||
CobblemonBlocks.X_SP_DEF,
|
||||
CobblemonBlocks.X_SPEED,
|
||||
CobblemonBlocks.TM_MACHINE
|
||||
CobblemonBlocks.TM_MACHINE,
|
||||
|
||||
CobblemonBlocks.GALARICA_CUFF,
|
||||
CobblemonBlocks.GALARICA_WREATH,
|
||||
CobblemonBlocks.CHIPPED_POT,
|
||||
CobblemonBlocks.CRACKED_POT,
|
||||
CobblemonBlocks.UNREMARKABLE_TEACUP,
|
||||
CobblemonBlocks.MASTERPIECE_TEACUP,
|
||||
CobblemonBlocks.LUMINOUS_MOSS,
|
||||
CobblemonBlocks.ICY_ROCK,
|
||||
CobblemonBlocks.HEAT_ROCK,
|
||||
CobblemonBlocks.SMOOTH_ROCK,
|
||||
CobblemonBlocks.DAMP_ROCK,
|
||||
CobblemonBlocks.DESTINY_KNOT,
|
||||
CobblemonBlocks.METRONOME,
|
||||
CobblemonBlocks.KINGS_ROCK,
|
||||
CobblemonBlocks.FLAME_ORB,
|
||||
CobblemonBlocks.LIFE_ORB,
|
||||
CobblemonBlocks.TOXIC_ORB,
|
||||
CobblemonBlocks.LIGHT_BALL,
|
||||
CobblemonBlocks.SMOKE_BALL,
|
||||
CobblemonBlocks.NEVER_MELT_ICE,
|
||||
CobblemonBlocks.WIDE_LENS,
|
||||
CobblemonBlocks.ZOOM_LENS,
|
||||
CobblemonBlocks.SCOPE_LENS,
|
||||
|
||||
CobblemonBlocks.COPPER_FAN,
|
||||
CobblemonBlocks.EXPOSED_COPPER_FAN,
|
||||
CobblemonBlocks.WEATHERED_COPPER_FAN,
|
||||
CobblemonBlocks.OXIDIZED_COPPER_FAN,
|
||||
CobblemonBlocks.WAXED_COPPER_FAN,
|
||||
CobblemonBlocks.WAXED_EXPOSED_COPPER_FAN,
|
||||
CobblemonBlocks.WAXED_WEATHERED_COPPER_FAN,
|
||||
CobblemonBlocks.WAXED_OXIDIZED_COPPER_FAN
|
||||
)
|
||||
|
||||
this.createBoatModelLayers()
|
||||
|
||||
+1
-1
@@ -71,7 +71,7 @@ open class VariableObjectSelectionList(x: Int, y: Int, width: Int, height: Int):
|
||||
var stackHeight = -scrollAmount.toInt()
|
||||
guiGraphics.enableScissor(x, y, x + width, y + height)
|
||||
children.forEachIndexed { index, entry ->
|
||||
if (stackHeight in 1..<height || stackHeight + entry.height in 1..<height) {
|
||||
if (stackHeight < height && stackHeight + entry.height > 0) {
|
||||
entry.render(guiGraphics, index, x, y + stackHeight, mouseX, mouseY, partialTick)
|
||||
}
|
||||
stackHeight += entry.height
|
||||
|
||||
+4
-6
@@ -8,12 +8,10 @@
|
||||
|
||||
package com.cobblemon.mod.common.client.gui.startselection.widgets
|
||||
|
||||
import com.cobblemon.mod.common.Cobblemon
|
||||
import com.cobblemon.mod.common.CobblemonSounds
|
||||
import com.cobblemon.mod.common.api.gui.blitk
|
||||
import com.cobblemon.mod.common.api.text.bold
|
||||
import com.cobblemon.mod.common.client.gui.CobblemonRenderable
|
||||
import com.cobblemon.mod.common.client.gui.PokemonGUIAnimationStyle
|
||||
import com.cobblemon.mod.common.client.gui.VariableObjectSelectionList
|
||||
import com.cobblemon.mod.common.client.gui.drawProfilePokemon
|
||||
import com.cobblemon.mod.common.client.gui.startselection.StarterSelectionScreen
|
||||
@@ -29,12 +27,11 @@ import org.joml.Quaternionf
|
||||
import org.joml.Vector3f
|
||||
|
||||
class CategoryList(
|
||||
private val paneWidth: Int,
|
||||
private val paneHeight: Int,
|
||||
paneWidth: Int,
|
||||
paneHeight: Int,
|
||||
private val categories: List<RenderableStarterCategory>,
|
||||
val listX: Int,
|
||||
val listY: Int,
|
||||
private val minecraft: Minecraft = Minecraft.getInstance(),
|
||||
private val starterSelectionScreen: StarterSelectionScreen
|
||||
) : VariableObjectSelectionList(
|
||||
listX,
|
||||
@@ -70,7 +67,8 @@ class CategoryList(
|
||||
}
|
||||
|
||||
private fun createEntries() = categories.map { category ->
|
||||
val rows = (category.pokemon.size - 1) / 3 + 1
|
||||
val pokemonCount = category.pokemon.size - if (category.randomStarter) 0 else 1
|
||||
val rows = pokemonCount / 3 + 1
|
||||
val height = CONTAINER_BUTTON_SIZE * rows + BUTTON_SEPERATION * (rows + 1) + HEADER_HEIGHT + 3
|
||||
Category(category, height)
|
||||
}
|
||||
|
||||
+14
-28
@@ -8,9 +8,9 @@
|
||||
|
||||
package com.cobblemon.mod.common.client.render.block
|
||||
|
||||
import com.cobblemon.mod.common.CobblemonItemComponents
|
||||
import com.cobblemon.mod.common.block.entity.DiscShelfBlockEntity
|
||||
import com.cobblemon.mod.common.CobblemonItems
|
||||
import com.cobblemon.mod.common.client.render.color.TechnicalMachineItemColorProvider
|
||||
import com.cobblemon.mod.common.util.cobblemonResource
|
||||
import com.mojang.blaze3d.vertex.PoseStack
|
||||
import com.mojang.blaze3d.vertex.VertexConsumer
|
||||
@@ -37,15 +37,15 @@ class DiscShelfBlockEntityRenderer(ctx: BlockEntityRendererProvider.Context) :
|
||||
private val slotHeightPixels = 2
|
||||
private val textureSize = 16f
|
||||
|
||||
private val slotUMax = slotWidthPixels / textureSize
|
||||
private val slotVMax = slotHeightPixels / textureSize
|
||||
|
||||
private val leftMargin = 1f
|
||||
private val rightMargin = 1f
|
||||
private val topMargin = 1f
|
||||
private val interRowSpacing = 0f
|
||||
private val tmOverlayDepthOffset = -0.0002f
|
||||
private val slotBrightnessMultiplier = 0.65f
|
||||
|
||||
private val tmBaseTexture = cobblemonResource("textures/block/disc_shelf/technical_machine_base.png")
|
||||
private val tmOverlayTexture = cobblemonResource("textures/block/disc_shelf/technical_machine_overlay.png")
|
||||
private val musicDiscUnknownTexture = cobblemonResource("textures/block/disc_shelf/music_disc_unknown.png")
|
||||
|
||||
override fun render(
|
||||
@@ -98,35 +98,19 @@ class DiscShelfBlockEntityRenderer(ctx: BlockEntityRendererProvider.Context) :
|
||||
poseStack.translate(posX, posY, -0.001f)
|
||||
|
||||
if (item.item == CobblemonItems.TECHNICAL_MACHINE) {
|
||||
val baseColor = TechnicalMachineItemColorProvider.getColor(item, 0)
|
||||
val overlayColor = TechnicalMachineItemColorProvider.getColor(item, 1)
|
||||
|
||||
val elementId = item.components.get(CobblemonItemComponents.TM_MOVE)!!.move.elementalType.showdownId
|
||||
val texture = cobblemonResource("textures/block/disc_shelf/${elementId}_tm.png")
|
||||
renderSlotQuad(
|
||||
poseStack,
|
||||
buffer,
|
||||
tmBaseTexture,
|
||||
baseColor,
|
||||
texture,
|
||||
0xFFFFFF,
|
||||
packedLight,
|
||||
slotWidth,
|
||||
slotHeight,
|
||||
tint = true,
|
||||
useTextRenderType = true
|
||||
)
|
||||
|
||||
poseStack.pushPose()
|
||||
poseStack.translate(0.0, 0.0, tmOverlayDepthOffset.toDouble())
|
||||
renderSlotQuad(
|
||||
poseStack,
|
||||
buffer,
|
||||
tmOverlayTexture,
|
||||
overlayColor,
|
||||
packedLight,
|
||||
slotWidth,
|
||||
slotHeight,
|
||||
tint = true,
|
||||
useTextRenderType = true
|
||||
)
|
||||
poseStack.popPose()
|
||||
} else {
|
||||
val tex = getItemTexture(item)
|
||||
renderSlotQuad(
|
||||
@@ -176,13 +160,15 @@ class DiscShelfBlockEntityRenderer(ctx: BlockEntityRendererProvider.Context) :
|
||||
val g = (gBase * slotBrightnessMultiplier).coerceIn(0f, 1f)
|
||||
val b = (bBase * slotBrightnessMultiplier).coerceIn(0f, 1f)
|
||||
|
||||
consumer.addVertex(matrix, 0f, 0f, 0f).setColor(r, g, b, a).setUv(0f, 1f)
|
||||
// The quad faces -Z, so a viewer looking at it sees +X on their left.
|
||||
// U runs from slotUMax at x = 0 to 0 at x = width so the art is not mirrored.
|
||||
consumer.addVertex(matrix, 0f, 0f, 0f).setColor(r, g, b, a).setUv(slotUMax, slotVMax)
|
||||
.setUv1(0, 0).setUv2(light and 0xFFFF, light shr 16).setNormal(0f, 0f, -1f)
|
||||
consumer.addVertex(matrix, 0f, height, 0f).setColor(r, g, b, a).setUv(0f, 0f)
|
||||
consumer.addVertex(matrix, 0f, height, 0f).setColor(r, g, b, a).setUv(slotUMax, 0f)
|
||||
.setUv1(0, 0).setUv2(light and 0xFFFF, light shr 16).setNormal(0f, 0f, -1f)
|
||||
consumer.addVertex(matrix, width, height, 0f).setColor(r, g, b, a).setUv(1f, 0f)
|
||||
consumer.addVertex(matrix, width, height, 0f).setColor(r, g, b, a).setUv(0f, 0f)
|
||||
.setUv1(0, 0).setUv2(light and 0xFFFF, light shr 16).setNormal(0f, 0f, -1f)
|
||||
consumer.addVertex(matrix, width, 0f, 0f).setColor(r, g, b, a).setUv(1f, 1f)
|
||||
consumer.addVertex(matrix, width, 0f, 0f).setColor(r, g, b, a).setUv(0f, slotVMax)
|
||||
.setUv1(0, 0).setUv2(light and 0xFFFF, light shr 16).setNormal(0f, 0f, -1f)
|
||||
}
|
||||
|
||||
|
||||
-27
@@ -1,27 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.client.render.color
|
||||
|
||||
import com.cobblemon.mod.common.api.types.ElementalTypes
|
||||
import com.cobblemon.mod.common.item.components.TMMoveComponent.Companion.getTMMove
|
||||
import net.minecraft.client.color.item.ItemColor
|
||||
import net.minecraft.util.FastColor
|
||||
import net.minecraft.world.item.ItemStack
|
||||
|
||||
object TechnicalMachineItemColorProvider : ItemColor {
|
||||
override fun getColor(itemStack: ItemStack, layer: Int): Int {
|
||||
val moveType = getTMMove(itemStack)?.elementalType ?: ElementalTypes.NORMAL
|
||||
val color = when (layer) {
|
||||
0 -> moveType.primaryColor
|
||||
1 -> moveType.secondaryColor
|
||||
else -> 0xFFFFFF
|
||||
}
|
||||
return FastColor.ARGB32.opaque(color)
|
||||
}
|
||||
}
|
||||
-63
@@ -1,63 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen5
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.animation.QuadrupedWalkAnimation
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.QuadrupedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.Pose
|
||||
import com.cobblemon.mod.common.entity.PoseType
|
||||
import net.minecraft.client.model.geom.ModelPart
|
||||
import net.minecraft.world.phys.Vec3
|
||||
|
||||
class DeerlingModel(root: ModelPart) : PokemonPosableModel(root), HeadedFrame, QuadrupedFrame {
|
||||
override val rootPart = root.registerChildWithAllChildren("deerling")
|
||||
override val head = getPart("head")
|
||||
|
||||
override var portraitScale = 3.5F
|
||||
override var portraitTranslation = Vec3(-0.55, -1.1, 0.0)
|
||||
|
||||
override var profileScale = 1.0F
|
||||
override var profileTranslation = Vec3(0.0, 0.25, 0.0)
|
||||
|
||||
override val foreLeftLeg= getPart("leg_front_left")
|
||||
override val foreRightLeg = getPart("leg_front_right")
|
||||
override val hindLeftLeg = getPart("leg_back_left")
|
||||
override val hindRightLeg = getPart("leg_back_right")
|
||||
|
||||
lateinit var standing: Pose
|
||||
lateinit var walk: Pose
|
||||
|
||||
override fun registerPoses() {
|
||||
standing = registerPose(
|
||||
poseName = "standing",
|
||||
poseTypes = PoseType.STATIONARY_POSES + PoseType.UI_POSES,
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
// bedrock("deerling", "ground_idle")
|
||||
)
|
||||
)
|
||||
|
||||
walk = registerPose(
|
||||
poseName = "walk",
|
||||
poseTypes = PoseType.MOVING_POSES,
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
QuadrupedWalkAnimation(this, periodMultiplier = 0.8F, amplitudeMultiplier = 0.8F)
|
||||
// bedrock("deerling", "ground_walk")
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
// override fun getFaintAnimation(
|
||||
// pokemonEntity: PokemonEntity,
|
||||
// state: PosableState<PokemonEntity>
|
||||
// ) = if (state.isPosedIn(standing, walk)) bedrockStateful("deerling", "faint") else null
|
||||
}
|
||||
-63
@@ -1,63 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen5
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.animation.QuadrupedWalkAnimation
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.QuadrupedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.Pose
|
||||
import com.cobblemon.mod.common.entity.PoseType
|
||||
import net.minecraft.client.model.geom.ModelPart
|
||||
import net.minecraft.world.phys.Vec3
|
||||
|
||||
class SawsbuckModel(root: ModelPart) : PokemonPosableModel(root), HeadedFrame, QuadrupedFrame {
|
||||
override val rootPart = root.registerChildWithAllChildren("sawsbuck")
|
||||
override val head = getPart("head")
|
||||
|
||||
override var portraitScale = 2.0F
|
||||
override var portraitTranslation = Vec3(-0.5, 1.1, 0.0)
|
||||
|
||||
override var profileScale = 0.65F
|
||||
override var profileTranslation = Vec3(0.0, 0.75, 0.0)
|
||||
|
||||
override val foreLeftLeg= getPart("leg_front_left")
|
||||
override val foreRightLeg = getPart("leg_front_right")
|
||||
override val hindLeftLeg = getPart("leg_back_left")
|
||||
override val hindRightLeg = getPart("leg_back_right")
|
||||
|
||||
lateinit var standing: Pose
|
||||
lateinit var walk: Pose
|
||||
|
||||
override fun registerPoses() {
|
||||
standing = registerPose(
|
||||
poseName = "standing",
|
||||
poseTypes = PoseType.STATIONARY_POSES + PoseType.UI_POSES,
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
// bedrock("sawsbuck", "ground_idle")
|
||||
)
|
||||
)
|
||||
|
||||
walk = registerPose(
|
||||
poseName = "walk",
|
||||
poseTypes = PoseType.MOVING_POSES,
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
QuadrupedWalkAnimation(this, periodMultiplier = 0.9F, amplitudeMultiplier = 0.9F)
|
||||
// bedrock("sawsbuck", "ground_walk")
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
// override fun getFaintAnimation(
|
||||
// pokemonEntity: PokemonEntity,
|
||||
// state: PosableState<PokemonEntity>
|
||||
// ) = if (state.isPosedIn(standing, walk)) bedrockStateful("sawsbuck", "faint") else null
|
||||
}
|
||||
-90
@@ -1,90 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen9
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.PosableState
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.createTransformation
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.CryProvider
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.ModelPartTransformation
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.Pose
|
||||
import com.cobblemon.mod.common.entity.PoseType
|
||||
import net.minecraft.client.model.geom.ModelPart
|
||||
import net.minecraft.world.phys.Vec3
|
||||
|
||||
class GlimmetModel (root: ModelPart) : PokemonPosableModel(root) {
|
||||
override val rootPart = root.registerChildWithAllChildren("glimmet")
|
||||
|
||||
override var portraitScale = 2.0F
|
||||
override var portraitTranslation = Vec3(-0.5, 1.3, 0.0)
|
||||
|
||||
override var profileScale = 0.7F
|
||||
override var profileTranslation = Vec3(0.0, 0.8, 0.0)
|
||||
|
||||
lateinit var standing: Pose
|
||||
lateinit var walk: Pose
|
||||
lateinit var sleep: Pose
|
||||
lateinit var shoulderLeft: Pose
|
||||
lateinit var shoulderRight: Pose
|
||||
|
||||
val shoulderOffset = 8
|
||||
|
||||
override val cryAnimation = CryProvider { bedrockStateful("glimmet", "cry") }
|
||||
|
||||
override fun registerPoses() {
|
||||
val blink = quirk { bedrockStateful("glimmet", "blink") }
|
||||
sleep = registerPose(
|
||||
poseType = PoseType.SLEEP,
|
||||
animations = arrayOf(bedrock("glimmet", "sleep"))
|
||||
)
|
||||
|
||||
standing = registerPose(
|
||||
poseName = "standing",
|
||||
poseTypes = PoseType.STATIONARY_POSES + PoseType.UI_POSES,
|
||||
transformTicks = 10,
|
||||
quirks = arrayOf(blink),
|
||||
animations = arrayOf(
|
||||
bedrock("glimmet", "ground_idle")
|
||||
)
|
||||
)
|
||||
|
||||
walk = registerPose(
|
||||
poseName = "walk",
|
||||
poseTypes = PoseType.MOVING_POSES,
|
||||
transformTicks = 10,
|
||||
quirks = arrayOf(blink),
|
||||
animations = arrayOf(
|
||||
bedrock("glimmet", "ground_walk")
|
||||
)
|
||||
)
|
||||
|
||||
shoulderLeft = registerPose(
|
||||
poseType = PoseType.SHOULDER_LEFT,
|
||||
quirks = arrayOf(blink),
|
||||
animations = arrayOf(
|
||||
bedrock("glimmet", "ground_idle")
|
||||
),
|
||||
transformedParts = arrayOf(
|
||||
rootPart.createTransformation().addPosition(ModelPartTransformation.X_AXIS, shoulderOffset)
|
||||
)
|
||||
)
|
||||
|
||||
shoulderRight = registerPose(
|
||||
poseType = PoseType.SHOULDER_RIGHT,
|
||||
quirks = arrayOf(blink),
|
||||
animations = arrayOf(
|
||||
bedrock("glimmet", "ground_idle")
|
||||
),
|
||||
transformedParts = arrayOf(
|
||||
rootPart.createTransformation().addPosition(ModelPartTransformation.X_AXIS, -shoulderOffset)
|
||||
)
|
||||
)
|
||||
}
|
||||
override fun getFaintAnimation(state: PosableState) = if (state.isPosedIn(standing, walk)) bedrockStateful("glimmet", "faint") else null
|
||||
}
|
||||
-79
@@ -1,79 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen9
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.PosableState
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.CryProvider
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.Pose
|
||||
import com.cobblemon.mod.common.entity.PoseType
|
||||
import com.cobblemon.mod.common.util.isBattling
|
||||
import net.minecraft.client.model.geom.ModelPart
|
||||
import net.minecraft.world.phys.Vec3
|
||||
|
||||
class GlimmoraModel (root: ModelPart) : PokemonPosableModel(root) {
|
||||
override val rootPart = root.registerChildWithAllChildren("glimmora")
|
||||
|
||||
override var portraitScale = 2.0F
|
||||
override var portraitTranslation = Vec3(-0.6, -0.1, 0.0)
|
||||
|
||||
override var profileScale = 0.7F
|
||||
override var profileTranslation = Vec3(0.0, 0.8, 0.0)
|
||||
|
||||
lateinit var standing: Pose
|
||||
lateinit var walk: Pose
|
||||
lateinit var sleep: Pose
|
||||
lateinit var battleidle: Pose
|
||||
|
||||
override val cryAnimation = CryProvider { bedrockStateful("glimmora", "cry") }
|
||||
|
||||
override fun registerPoses() {
|
||||
val blink = quirk { bedrockStateful("glimmora", "blink") }
|
||||
sleep = registerPose(
|
||||
poseType = PoseType.SLEEP,
|
||||
animations = arrayOf(bedrock("glimmora", "sleep"))
|
||||
)
|
||||
|
||||
standing = registerPose(
|
||||
poseName = "standing",
|
||||
poseTypes = PoseType.STATIONARY_POSES + PoseType.UI_POSES,
|
||||
transformTicks = 10,
|
||||
condition = { !it.isBattling },
|
||||
quirks = arrayOf(blink),
|
||||
animations = arrayOf(
|
||||
bedrock("glimmora", "ground_idle")
|
||||
)
|
||||
)
|
||||
|
||||
walk = registerPose(
|
||||
poseName = "walk",
|
||||
poseTypes = PoseType.MOVING_POSES,
|
||||
transformTicks = 10,
|
||||
quirks = arrayOf(blink),
|
||||
animations = arrayOf(
|
||||
bedrock("glimmora", "ground_walk")
|
||||
)
|
||||
)
|
||||
|
||||
battleidle = registerPose(
|
||||
poseName = "battle_idle",
|
||||
poseTypes = PoseType.STATIONARY_POSES,
|
||||
transformTicks = 10,
|
||||
quirks = arrayOf(blink),
|
||||
condition = { it.isBattling },
|
||||
animations = arrayOf(
|
||||
bedrock("glimmora", "battle_idle")
|
||||
)
|
||||
|
||||
)
|
||||
}
|
||||
override fun getFaintAnimation(state: PosableState) = if (state.isPosedIn(standing, walk, sleep)) bedrockStateful("glimmora", "faint") else
|
||||
if (state.isPosedIn(battleidle)) bedrockStateful("glimmora", "faint2")
|
||||
else null
|
||||
}
|
||||
-4
@@ -304,8 +304,6 @@ object VaryingModelRepository {
|
||||
inbuilt("sizzlipede", ::SizzlipedeModel)
|
||||
inbuilt("kleavor", ::KleavorModel)
|
||||
inbuilt("pyukumuku", ::PyukumukuModel)
|
||||
inbuilt("deerling", ::DeerlingModel)
|
||||
inbuilt("sawsbuck", ::SawsbuckModel)
|
||||
inbuilt("natu", ::NatuModel)
|
||||
inbuilt("xatu", ::XatuModel)
|
||||
inbuilt("milcery", :: MilceryModel)
|
||||
@@ -399,8 +397,6 @@ object VaryingModelRepository {
|
||||
inbuilt("sirfetchd", ::SirfetchdModel)
|
||||
inbuilt("duskull", ::DuskullModel)
|
||||
inbuilt("dusclops", ::DusclopsModel)
|
||||
inbuilt("glimmet", ::GlimmetModel)
|
||||
inbuilt("glimmora", ::GlimmoraModel)
|
||||
inbuilt("bonsly", ::BonslyModel)
|
||||
inbuilt("sudowoodo", ::SudowoodoModel)
|
||||
inbuilt("cetoddle", ::CetoddleModel)
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
package com.cobblemon.mod.common.command
|
||||
|
||||
import com.cobblemon.mod.common.api.permission.CobblemonPermissions
|
||||
import com.cobblemon.mod.common.api.pokemon.PokemonPropertyExtractor
|
||||
import com.cobblemon.mod.common.command.argument.PokemonPropertiesArgumentType
|
||||
import com.cobblemon.mod.common.util.party
|
||||
import com.cobblemon.mod.common.util.permission
|
||||
@@ -45,7 +44,7 @@ object TestPartySlotCommand {
|
||||
val player = context.player(PLAYER)
|
||||
val slot = IntegerArgumentType.getInteger(context, SLOT)
|
||||
val properties = PokemonPropertiesArgumentType.getPokemonProperties(context, PROPERTIES)
|
||||
return if (player.party().get(slot - 1)?.createPokemonProperties(PokemonPropertyExtractor.ALL)
|
||||
?.let { properties.isSubSetOf(it) } == true) Command.SINGLE_SUCCESS else NO_SUCCESS
|
||||
val target = player.party().get(slot - 1) ?: return NO_SUCCESS
|
||||
return if (properties.matches(target)) Command.SINGLE_SUCCESS else NO_SUCCESS
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@ import com.cobblemon.mod.common.api.berry.Berries
|
||||
import com.cobblemon.mod.common.api.cooking.Seasonings
|
||||
import com.cobblemon.mod.common.api.data.DataProvider
|
||||
import com.cobblemon.mod.common.api.data.DataRegistry
|
||||
import com.cobblemon.mod.common.api.data.ServerJsonDataRegistry
|
||||
import com.cobblemon.mod.common.api.dialogue.Dialogues
|
||||
import com.cobblemon.mod.common.api.events.CobblemonEvents
|
||||
import com.cobblemon.mod.common.api.fishing.PokeRods
|
||||
@@ -51,12 +52,15 @@ import com.cobblemon.mod.common.pokemon.properties.PropertiesCompletionProvider
|
||||
import com.cobblemon.mod.common.util.cobblemonResource
|
||||
import com.cobblemon.mod.common.util.ifClient
|
||||
import com.cobblemon.mod.common.util.server
|
||||
import net.minecraft.core.HolderLookup
|
||||
import java.util.UUID
|
||||
import net.minecraft.resources.ResourceLocation
|
||||
import net.minecraft.server.level.ServerPlayer
|
||||
import net.minecraft.server.packs.PackType
|
||||
import net.minecraft.server.packs.resources.PreparableReloadListener
|
||||
import net.minecraft.server.packs.resources.ResourceManager
|
||||
import net.minecraft.server.packs.resources.ResourceManagerReloadListener
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
|
||||
object CobblemonDataProvider : DataProvider {
|
||||
|
||||
@@ -67,6 +71,10 @@ object CobblemonDataProvider : DataProvider {
|
||||
|
||||
private val scheduledActions = mutableMapOf<UUID, MutableList<() -> Unit>>()
|
||||
|
||||
// client is public only so we can use it cross-module. maybe a more elegant solution exists, but this works
|
||||
@ApiStatus.Internal
|
||||
val clientResourceReloader: PreparableReloadListener = ClientResourceReloader()
|
||||
|
||||
fun registerDefaults() {
|
||||
this.register(CobblemonScripts, reloadable = true)
|
||||
this.register(SpeciesFeatures, reloadable = false)
|
||||
@@ -119,9 +127,9 @@ object CobblemonDataProvider : DataProvider {
|
||||
}
|
||||
|
||||
ifClient {
|
||||
Cobblemon.implementation.registerResourceReloader(cobblemonResource("client_resources"), SimpleResourceReloader(PackType.CLIENT_RESOURCES), PackType.CLIENT_RESOURCES, emptyList())
|
||||
Cobblemon.implementation.registerResourceReloader(cobblemonResource("client_resources"), PackType.CLIENT_RESOURCES, emptyList()) { clientResourceReloader }
|
||||
}
|
||||
Cobblemon.implementation.registerResourceReloader(cobblemonResource("data_resources"), SimpleResourceReloader(PackType.SERVER_DATA), PackType.SERVER_DATA, emptyList())
|
||||
Cobblemon.implementation.registerResourceReloader(cobblemonResource("data_resources"), PackType.SERVER_DATA, emptyList()) { ServerResourceReloader(it) }
|
||||
}
|
||||
|
||||
override fun <T : DataRegistry> register(registry: T, reloadable: Boolean): T {
|
||||
@@ -160,12 +168,25 @@ object CobblemonDataProvider : DataProvider {
|
||||
}
|
||||
}
|
||||
|
||||
private class SimpleResourceReloader(private val type: PackType) : ResourceManagerReloadListener {
|
||||
private class ClientResourceReloader : ResourceManagerReloadListener {
|
||||
override fun onResourceManagerReload(manager: ResourceManager) {
|
||||
registries.filter { it.type == PackType.CLIENT_RESOURCES }.forEach { it.reload(manager) }
|
||||
}
|
||||
}
|
||||
|
||||
private class ServerResourceReloader(private val registryAccess: HolderLookup.Provider) : ResourceManagerReloadListener {
|
||||
override fun onResourceManagerReload(manager: ResourceManager) {
|
||||
// Check for a server running, this is due to the create a world screen triggering datapack reloads, these are fine to happen as many times as needed as players may be in the process of adding their datapacks.
|
||||
val reloadAllowed = server()?.isReady != true
|
||||
registries.filter { it.type == this.type && (reloadAllowed || it in reloadableRegistries) }
|
||||
.forEach { it.reload(manager) }
|
||||
registries
|
||||
.filter { it.type == PackType.SERVER_DATA && (reloadAllowed || it in reloadableRegistries) }
|
||||
.forEach {
|
||||
if (it is ServerJsonDataRegistry<*>) {
|
||||
it.reload(manager, registryAccess)
|
||||
} else {
|
||||
it.reload(manager)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ import com.cobblemon.mod.common.item.TumblestoneItem
|
||||
import net.minecraft.world.item.BlockItem
|
||||
import com.cobblemon.mod.common.platform.events.ServerPlayerEvent
|
||||
import com.cobblemon.mod.common.api.storage.player.PlayerInstancedDataStoreTypes
|
||||
import com.cobblemon.mod.common.item.GemItem
|
||||
import com.cobblemon.mod.common.platform.events.PlatformEvents
|
||||
import com.cobblemon.mod.common.util.effectiveName
|
||||
import com.cobblemon.mod.common.util.getPlayer
|
||||
@@ -40,6 +41,7 @@ object AdvancementHandler : EventHandler {
|
||||
override fun registerListeners() {
|
||||
PlatformEvents.RIGHT_CLICK_BLOCK.subscribe(Priority.LOWEST, ::onTumbleStonePlaced)
|
||||
PlatformEvents.RIGHT_CLICK_BLOCK.subscribe(Priority.LOWEST, ::onTypeGemClusterPlaced)
|
||||
PlatformEvents.RIGHT_CLICK_BLOCK.subscribe(Priority.LOWEST, ::onTypeGemItemPlaced)
|
||||
POKEMON_CAPTURED.subscribe(Priority.LOWEST, ::onCapture)
|
||||
BATTLE_VICTORY.subscribe(Priority.LOWEST, ::onWinBattle)
|
||||
EVOLUTION_COMPLETE.subscribe(Priority.LOWEST, ::onEvolve)
|
||||
@@ -206,6 +208,12 @@ object AdvancementHandler : EventHandler {
|
||||
CobblemonCriteria.PLANT_TYPE_GEM.trigger(event.player, PlantTypeGemContext(event.pos, block))
|
||||
}
|
||||
|
||||
fun onTypeGemItemPlaced(event: ServerPlayerEvent.RightClickBlock){
|
||||
val item = event.player.getItemInHand(event.hand).item as? GemItem ?: return
|
||||
val block = item.block as? TypeGemClusterBlock ?: return
|
||||
CobblemonCriteria.PLANT_TYPE_GEM.trigger(event.player, PlantTypeGemContext(event.pos, block))
|
||||
}
|
||||
|
||||
fun startRiding(event: RidePokemonEvent.Post) {
|
||||
CobblemonCriteria.RIDING_STAT_BOOST.trigger(event.player, RidingStatBoostContext(event.pokemon))
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.item
|
||||
|
||||
import net.minecraft.world.item.ItemNameBlockItem
|
||||
import net.minecraft.world.level.block.Block
|
||||
|
||||
class WearableBlockItem(override val name: String, block: Block): ItemNameBlockItem(block, Properties()), WearableItem{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.item
|
||||
|
||||
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
|
||||
import com.cobblemon.mod.common.util.traceFirstEntityCollision
|
||||
import net.minecraft.world.InteractionHand
|
||||
import net.minecraft.world.InteractionResultHolder
|
||||
import net.minecraft.world.entity.player.Player
|
||||
import net.minecraft.world.item.ItemStack
|
||||
import net.minecraft.world.level.Level
|
||||
|
||||
|
||||
class WearableHatItem(override val name: String): CobblemonItem(Properties()), WearableItem {
|
||||
override fun use(level: Level, player: Player, usedHand: InteractionHand): InteractionResultHolder<ItemStack> {
|
||||
val itemStack = player.getItemInHand(usedHand)
|
||||
val hitPokemon = player.traceFirstEntityCollision(
|
||||
entityClass = PokemonEntity::class.java,
|
||||
maxDistance = player.entityInteractionRange().toFloat()
|
||||
)
|
||||
// If the player is looking at a Pokémon within range, block the ability to swap the item onto their head
|
||||
return if (player.isCrouching && hitPokemon != null && hitPokemon.isOwnedBy(player)) {
|
||||
InteractionResultHolder.fail(itemStack)
|
||||
} else this.swapWithEquipmentSlot(this, level, player, usedHand)
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,9 @@ import net.minecraft.resources.ResourceLocation
|
||||
import net.minecraft.world.entity.EquipmentSlot
|
||||
import net.minecraft.world.item.Equipable
|
||||
|
||||
class WearableItem(val name: String): CobblemonItem(Properties()), Equipable {
|
||||
interface WearableItem: Equipable {
|
||||
val name: String
|
||||
|
||||
companion object {
|
||||
const val MODEL_PATH = "item/wearable"
|
||||
}
|
||||
|
||||
@@ -487,6 +487,47 @@ object CobblemonItemGroups {
|
||||
entries.accept(CobblemonItems.PINK_PLAQUE)
|
||||
|
||||
CobblemonItems.campfire_pots.forEach(entries::accept)
|
||||
|
||||
entries.accept(CobblemonItems.COPPER_OVEN)
|
||||
entries.accept(CobblemonItems.COPPER_WASHER)
|
||||
entries.accept(CobblemonItems.COPPER_FAN)
|
||||
entries.accept(CobblemonItems.COPPER_MOWER)
|
||||
entries.accept(CobblemonItems.COPPER_FRIDGE)
|
||||
entries.accept(CobblemonItems.EXPOSED_COPPER_OVEN)
|
||||
entries.accept(CobblemonItems.EXPOSED_COPPER_WASHER)
|
||||
entries.accept(CobblemonItems.EXPOSED_COPPER_FAN)
|
||||
entries.accept(CobblemonItems.EXPOSED_COPPER_MOWER)
|
||||
entries.accept(CobblemonItems.EXPOSED_COPPER_FRIDGE)
|
||||
entries.accept(CobblemonItems.WEATHERED_COPPER_OVEN)
|
||||
entries.accept(CobblemonItems.WEATHERED_COPPER_WASHER)
|
||||
entries.accept(CobblemonItems.WEATHERED_COPPER_FAN)
|
||||
entries.accept(CobblemonItems.WEATHERED_COPPER_MOWER)
|
||||
entries.accept(CobblemonItems.WEATHERED_COPPER_FRIDGE)
|
||||
entries.accept(CobblemonItems.OXIDIZED_COPPER_OVEN)
|
||||
entries.accept(CobblemonItems.OXIDIZED_COPPER_WASHER)
|
||||
entries.accept(CobblemonItems.OXIDIZED_COPPER_FAN)
|
||||
entries.accept(CobblemonItems.OXIDIZED_COPPER_MOWER)
|
||||
entries.accept(CobblemonItems.OXIDIZED_COPPER_FRIDGE)
|
||||
entries.accept(CobblemonItems.WAXED_COPPER_OVEN)
|
||||
entries.accept(CobblemonItems.WAXED_COPPER_WASHER)
|
||||
entries.accept(CobblemonItems.WAXED_COPPER_FAN)
|
||||
entries.accept(CobblemonItems.WAXED_COPPER_MOWER)
|
||||
entries.accept(CobblemonItems.WAXED_COPPER_FRIDGE)
|
||||
entries.accept(CobblemonItems.WAXED_EXPOSED_COPPER_OVEN)
|
||||
entries.accept(CobblemonItems.WAXED_EXPOSED_COPPER_WASHER)
|
||||
entries.accept(CobblemonItems.WAXED_EXPOSED_COPPER_FAN)
|
||||
entries.accept(CobblemonItems.WAXED_EXPOSED_COPPER_MOWER)
|
||||
entries.accept(CobblemonItems.WAXED_EXPOSED_COPPER_FRIDGE)
|
||||
entries.accept(CobblemonItems.WAXED_WEATHERED_COPPER_OVEN)
|
||||
entries.accept(CobblemonItems.WAXED_WEATHERED_COPPER_WASHER)
|
||||
entries.accept(CobblemonItems.WAXED_WEATHERED_COPPER_FAN)
|
||||
entries.accept(CobblemonItems.WAXED_WEATHERED_COPPER_MOWER)
|
||||
entries.accept(CobblemonItems.WAXED_WEATHERED_COPPER_FRIDGE)
|
||||
entries.accept(CobblemonItems.WAXED_OXIDIZED_COPPER_OVEN)
|
||||
entries.accept(CobblemonItems.WAXED_OXIDIZED_COPPER_WASHER)
|
||||
entries.accept(CobblemonItems.WAXED_OXIDIZED_COPPER_FAN)
|
||||
entries.accept(CobblemonItems.WAXED_OXIDIZED_COPPER_MOWER)
|
||||
entries.accept(CobblemonItems.WAXED_OXIDIZED_COPPER_FRIDGE)
|
||||
}
|
||||
|
||||
private fun consumableEntries(displayContext: ItemDisplayParameters, entries: Output) {
|
||||
|
||||
+10
-22
@@ -11,29 +11,26 @@ package com.cobblemon.mod.common.item.interactive
|
||||
import com.cobblemon.mod.common.api.item.PokemonSelectingItem
|
||||
import com.cobblemon.mod.common.api.pokemon.stats.ItemEvSource
|
||||
import com.cobblemon.mod.common.api.pokemon.stats.Stat
|
||||
import com.cobblemon.mod.common.item.CobblemonItem
|
||||
import com.cobblemon.mod.common.item.battle.BagItem
|
||||
import com.cobblemon.mod.common.pokemon.EVs
|
||||
import com.cobblemon.mod.common.pokemon.Pokemon
|
||||
import com.cobblemon.mod.common.util.giveOrDropItemStack
|
||||
import net.minecraft.server.level.ServerPlayer
|
||||
import net.minecraft.sounds.SoundEvent
|
||||
import net.minecraft.world.InteractionHand
|
||||
import net.minecraft.world.InteractionResultHolder
|
||||
import net.minecraft.world.entity.player.Player
|
||||
import net.minecraft.world.item.ItemStack
|
||||
import net.minecraft.world.item.Items
|
||||
import net.minecraft.world.level.Level
|
||||
|
||||
abstract class EVIncreaseItem(
|
||||
val stat: Stat,
|
||||
val evIncreaseAmount: Int,
|
||||
) : CobblemonItem(Properties()), PokemonSelectingItem {
|
||||
override val bagItem = null
|
||||
interface EVIncreaseItem: PokemonSelectingItem {
|
||||
val stat: Stat
|
||||
val evIncreaseAmount: Int
|
||||
|
||||
override val bagItem: BagItem?
|
||||
get() = null
|
||||
|
||||
override fun canUseOnPokemon(stack: ItemStack, pokemon: Pokemon) = pokemon.evs.getOrDefault(stat) < EVs.MAX_STAT_VALUE &&
|
||||
super.canUseOnPokemon(stack, pokemon)
|
||||
|
||||
abstract val sound: SoundEvent
|
||||
|
||||
override fun applyToPokemon(
|
||||
player: ServerPlayer,
|
||||
stack: ItemStack,
|
||||
@@ -41,21 +38,12 @@ abstract class EVIncreaseItem(
|
||||
): InteractionResultHolder<ItemStack> {
|
||||
val evsGained = pokemon.evs.add(stat, evIncreaseAmount, ItemEvSource(player, stack, pokemon))
|
||||
return if (evsGained > 0) {
|
||||
pokemon.entity?.playSound(sound, 1F, 1F)
|
||||
stack.consume(1, player)
|
||||
if (!player.hasInfiniteMaterials()) {
|
||||
player.giveOrDropItemStack(ItemStack(Items.GLASS_BOTTLE))
|
||||
}
|
||||
onSuccessfulApply(player, stack, pokemon)
|
||||
InteractionResultHolder.success(stack)
|
||||
} else {
|
||||
InteractionResultHolder.fail(stack)
|
||||
}
|
||||
}
|
||||
|
||||
override fun use(world: Level, user: Player, hand: InteractionHand): InteractionResultHolder<ItemStack> {
|
||||
if (user is ServerPlayer) {
|
||||
return use(user, user.getItemInHand(hand))
|
||||
}
|
||||
return InteractionResultHolder.success(user.getItemInHand(hand))
|
||||
}
|
||||
fun onSuccessfulApply(player: ServerPlayer, stack: ItemStack, pokemon: Pokemon)
|
||||
}
|
||||
@@ -10,8 +10,27 @@ package com.cobblemon.mod.common.item.interactive
|
||||
|
||||
import com.cobblemon.mod.common.CobblemonSounds
|
||||
import com.cobblemon.mod.common.api.pokemon.stats.Stat
|
||||
import net.minecraft.sounds.SoundEvent
|
||||
import com.cobblemon.mod.common.item.CobblemonItem
|
||||
import com.cobblemon.mod.common.pokemon.Pokemon
|
||||
import net.minecraft.server.level.ServerPlayer
|
||||
import net.minecraft.world.InteractionHand
|
||||
import net.minecraft.world.InteractionResultHolder
|
||||
import net.minecraft.world.entity.player.Player
|
||||
import net.minecraft.world.item.ItemStack
|
||||
import net.minecraft.world.level.Level
|
||||
|
||||
class FeatherItem(stat: Stat) : EVIncreaseItem(stat, 1) {
|
||||
override val sound: SoundEvent = CobblemonSounds.MEDICINE_FEATHER_USE
|
||||
class FeatherItem(override val stat: Stat): CobblemonItem(Properties()), EVIncreaseItem {
|
||||
override val evIncreaseAmount: Int = 1
|
||||
|
||||
override fun use(world: Level, user: Player, hand: InteractionHand): InteractionResultHolder<ItemStack> {
|
||||
if (user is ServerPlayer) {
|
||||
return use(user, user.getItemInHand(hand))
|
||||
}
|
||||
return InteractionResultHolder.success(user.getItemInHand(hand))
|
||||
}
|
||||
|
||||
override fun onSuccessfulApply(player: ServerPlayer, stack: ItemStack, pokemon: Pokemon) {
|
||||
pokemon.entity?.playSound(CobblemonSounds.MEDICINE_FEATHER_USE)
|
||||
stack.consume(1, player)
|
||||
}
|
||||
}
|
||||
@@ -9,15 +9,18 @@
|
||||
package com.cobblemon.mod.common.item.interactive
|
||||
|
||||
import com.cobblemon.mod.common.CobblemonSounds
|
||||
import com.cobblemon.mod.common.api.pokemon.stats.Stats
|
||||
import com.cobblemon.mod.common.api.pokemon.stats.Stat
|
||||
import com.cobblemon.mod.common.item.CobblemonItem
|
||||
import com.cobblemon.mod.common.pokemon.Pokemon
|
||||
import net.minecraft.server.level.ServerPlayer
|
||||
import net.minecraft.sounds.SoundEvent
|
||||
import net.minecraft.world.InteractionHand
|
||||
import net.minecraft.world.InteractionResultHolder
|
||||
import net.minecraft.world.entity.player.Player
|
||||
import net.minecraft.world.item.ItemStack
|
||||
import net.minecraft.world.level.Level
|
||||
|
||||
class MochiItem(stat: Stats): EVIncreaseItem(stat, 4) {
|
||||
override val sound: SoundEvent = CobblemonSounds.MOCHI_USE
|
||||
class MochiItem(override val stat: Stat): CobblemonItem(Properties()), EVIncreaseItem {
|
||||
override val evIncreaseAmount: Int = 4
|
||||
|
||||
override fun applyToPokemon(player: ServerPlayer, stack: ItemStack, pokemon: Pokemon): InteractionResultHolder<ItemStack> {
|
||||
if (!canUseOnPokemon(stack, pokemon)) {
|
||||
@@ -28,4 +31,16 @@ class MochiItem(stat: Stats): EVIncreaseItem(stat, 4) {
|
||||
|
||||
return super.applyToPokemon(player, stack, pokemon)
|
||||
}
|
||||
|
||||
override fun use(world: Level, user: Player, hand: InteractionHand): InteractionResultHolder<ItemStack> {
|
||||
if (user is ServerPlayer) {
|
||||
return use(user, user.getItemInHand(hand))
|
||||
}
|
||||
return InteractionResultHolder.success(user.getItemInHand(hand))
|
||||
}
|
||||
|
||||
override fun onSuccessfulApply(player: ServerPlayer, stack: ItemStack, pokemon: Pokemon) {
|
||||
pokemon.entity?.playSound(CobblemonSounds.MOCHI_USE)
|
||||
stack.consume(1, player)
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,6 @@ package com.cobblemon.mod.common.item.interactive
|
||||
import com.cobblemon.mod.common.CobblemonSounds
|
||||
import com.cobblemon.mod.common.api.item.PokemonAndMoveSelectingItem
|
||||
import com.cobblemon.mod.common.api.moves.Move
|
||||
import com.cobblemon.mod.common.item.CobblemonItem
|
||||
import com.cobblemon.mod.common.pokemon.Pokemon
|
||||
import com.cobblemon.mod.common.util.giveOrDropItemStack
|
||||
import net.minecraft.world.entity.player.Player
|
||||
@@ -19,13 +18,15 @@ import net.minecraft.world.item.ItemStack
|
||||
import net.minecraft.server.level.ServerPlayer
|
||||
import net.minecraft.world.InteractionHand
|
||||
import net.minecraft.world.InteractionResultHolder
|
||||
import net.minecraft.world.item.ItemNameBlockItem
|
||||
import net.minecraft.world.item.Items
|
||||
import net.minecraft.world.item.Rarity
|
||||
import net.minecraft.world.level.Level
|
||||
import net.minecraft.world.level.block.Block
|
||||
|
||||
class PPUpItem(
|
||||
val amount: Int
|
||||
) : CobblemonItem(Properties().apply {
|
||||
val amount: Int, block: Block
|
||||
) : ItemNameBlockItem(block, Properties().apply {
|
||||
if (amount>1) rarity(Rarity.UNCOMMON)
|
||||
}), PokemonAndMoveSelectingItem {
|
||||
|
||||
|
||||
@@ -9,9 +9,34 @@
|
||||
package com.cobblemon.mod.common.item.interactive
|
||||
|
||||
import com.cobblemon.mod.common.CobblemonSounds
|
||||
import com.cobblemon.mod.common.api.pokemon.stats.Stats
|
||||
import net.minecraft.sounds.SoundEvent
|
||||
import com.cobblemon.mod.common.api.pokemon.stats.Stat
|
||||
import com.cobblemon.mod.common.pokemon.Pokemon
|
||||
import com.cobblemon.mod.common.util.giveOrDropItemStack
|
||||
import net.minecraft.server.level.ServerPlayer
|
||||
import net.minecraft.world.InteractionHand
|
||||
import net.minecraft.world.InteractionResultHolder
|
||||
import net.minecraft.world.entity.player.Player
|
||||
import net.minecraft.world.item.ItemNameBlockItem
|
||||
import net.minecraft.world.item.ItemStack
|
||||
import net.minecraft.world.item.Items
|
||||
import net.minecraft.world.level.Level
|
||||
import net.minecraft.world.level.block.Block
|
||||
|
||||
class VitaminItem(stat: Stats) : EVIncreaseItem(stat, 10) {
|
||||
override val sound: SoundEvent = CobblemonSounds.MEDICINE_PILLS_USE
|
||||
class VitaminItem(override val stat: Stat, block: Block): ItemNameBlockItem(block, Properties()), EVIncreaseItem {
|
||||
override val evIncreaseAmount: Int = 10
|
||||
|
||||
override fun use(world: Level, user: Player, hand: InteractionHand): InteractionResultHolder<ItemStack> {
|
||||
if (user is ServerPlayer) {
|
||||
return use(user, user.getItemInHand(hand))
|
||||
}
|
||||
return InteractionResultHolder.success(user.getItemInHand(hand))
|
||||
}
|
||||
|
||||
override fun onSuccessfulApply(player: ServerPlayer, stack: ItemStack, pokemon: Pokemon) {
|
||||
pokemon.entity?.playSound(CobblemonSounds.MEDICINE_PILLS_USE)
|
||||
stack.consume(1, player)
|
||||
if (!player.hasInfiniteMaterials()) {
|
||||
player.giveOrDropItemStack(Items.GLASS_BOTTLE.defaultInstance)
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
@@ -68,6 +68,7 @@ object CobblemonRequirementAdapter : RequirementAdapter {
|
||||
this.registerType(AdvancementRequirement.ADAPTER_VARIANT, AdvancementRequirement::class)
|
||||
this.registerType(OwnerHoldsItemRequirement.ADAPTER_VARIANT, OwnerHoldsItemRequirement::class)
|
||||
this.registerType(ChanceRequirement.ADAPTER_VARIANT, ChanceRequirement::class)
|
||||
this.registerType(NegateRequirement.ADAPTER_VARIANT, NegateRequirement::class)
|
||||
}
|
||||
|
||||
val gson: Gson by lazy {
|
||||
|
||||
+14
-7
@@ -9,6 +9,7 @@
|
||||
package com.cobblemon.mod.common.pokemon.evolution.adapters
|
||||
|
||||
import com.cobblemon.mod.common.util.adapters.CodecBackedAdapter
|
||||
import com.cobblemon.mod.common.util.adapters.RegistryAccessResolver
|
||||
import com.google.gson.JsonDeserializationContext
|
||||
import com.google.gson.JsonDeserializer
|
||||
import com.google.gson.JsonElement
|
||||
@@ -19,6 +20,7 @@ import net.minecraft.advancements.critereon.ItemCustomDataPredicate
|
||||
import net.minecraft.advancements.critereon.ItemPredicate
|
||||
import net.minecraft.advancements.critereon.ItemSubPredicates
|
||||
import net.minecraft.advancements.critereon.NbtPredicate
|
||||
import net.minecraft.core.HolderLookup
|
||||
import net.minecraft.core.registries.BuiltInRegistries
|
||||
import net.minecraft.core.registries.Registries
|
||||
import net.minecraft.resources.ResourceLocation
|
||||
@@ -26,13 +28,16 @@ import net.minecraft.tags.TagKey
|
||||
import java.lang.reflect.Type
|
||||
|
||||
// This is an ugly adapter because breaking changes are scary and people would ;(
|
||||
object LegacyItemConditionWrapperAdapter : JsonDeserializer<ItemPredicate>, JsonSerializer<ItemPredicate> {
|
||||
class LegacyItemConditionWrapperAdapter(val registryAccess: HolderLookup.Provider = RegistryAccessResolver.getAccess())
|
||||
: JsonDeserializer<ItemPredicate>, JsonSerializer<ItemPredicate> {
|
||||
|
||||
private const val TAG_PREFIX = "#"
|
||||
private const val LEGACY_ITEM = "item"
|
||||
private const val LEGACY_NBT = "nbt"
|
||||
companion object {
|
||||
private const val TAG_PREFIX = "#"
|
||||
private const val LEGACY_ITEM = "item"
|
||||
private const val LEGACY_NBT = "nbt"
|
||||
}
|
||||
|
||||
private val codecAdapter = CodecBackedAdapter(ItemPredicate.CODEC)
|
||||
private val codecAdapter = CodecBackedAdapter(ItemPredicate.CODEC, registryAccess)
|
||||
|
||||
override fun deserialize(json: JsonElement, typeOfT: Type, context: JsonDeserializationContext): ItemPredicate {
|
||||
if (json.isJsonPrimitive) {
|
||||
@@ -64,7 +69,9 @@ object LegacyItemConditionWrapperAdapter : JsonDeserializer<ItemPredicate>, Json
|
||||
{ id ->
|
||||
if (isTag) {
|
||||
val tag = TagKey.create(Registries.ITEM, id)
|
||||
builder.of(tag)
|
||||
registryAccess.lookup(Registries.ITEM)
|
||||
.map { builder.of(tag) }
|
||||
.orElseGet { builder }
|
||||
} else {
|
||||
BuiltInRegistries.ITEM.getOptional(id)
|
||||
.map { builder.of(it) }
|
||||
@@ -75,4 +82,4 @@ object LegacyItemConditionWrapperAdapter : JsonDeserializer<ItemPredicate>, Json
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.pokemon.requirements
|
||||
|
||||
import com.cobblemon.mod.common.api.pokemon.requirement.Requirement
|
||||
import com.cobblemon.mod.common.pokemon.Pokemon
|
||||
|
||||
class NegateRequirement(val inner: Requirement) : Requirement {
|
||||
|
||||
override fun check(pokemon: Pokemon) = !inner.check(pokemon)
|
||||
|
||||
companion object {
|
||||
const val ADAPTER_VARIANT = "negate"
|
||||
}
|
||||
}
|
||||
@@ -10,16 +10,19 @@ package com.cobblemon.mod.common.util.adapters
|
||||
|
||||
import com.google.gson.*
|
||||
import com.mojang.serialization.Codec
|
||||
import com.mojang.serialization.JsonOps
|
||||
import net.minecraft.core.HolderLookup
|
||||
import net.minecraft.resources.RegistryOps
|
||||
import java.lang.reflect.Type
|
||||
|
||||
class CodecBackedAdapter<T>(val codec: Codec<T>) : JsonDeserializer<T>, JsonSerializer<T> {
|
||||
class CodecBackedAdapter<T>(val codec: Codec<T>, val registryAccess: HolderLookup.Provider = RegistryAccessResolver.getAccess()) : JsonDeserializer<T>, JsonSerializer<T> {
|
||||
|
||||
override fun deserialize(
|
||||
jElement: JsonElement,
|
||||
typeOfT: Type,
|
||||
context: JsonDeserializationContext
|
||||
): T {
|
||||
val ops = RegistryOpsProvider.getOpsWithDefaultFallback()
|
||||
val ops = RegistryOps.create(JsonOps.INSTANCE, registryAccess)
|
||||
val result = ops.withDecoder(codec).apply(jElement)
|
||||
return result.result().orElseThrow {
|
||||
IllegalStateException("Failed to deserialize $jElement: ${result.error().orElse(null)}")
|
||||
@@ -31,7 +34,7 @@ class CodecBackedAdapter<T>(val codec: Codec<T>) : JsonDeserializer<T>, JsonSeri
|
||||
typeOfSrc: Type?,
|
||||
context: JsonSerializationContext?
|
||||
): JsonElement {
|
||||
val ops = RegistryOpsProvider.getOpsWithDefaultFallback()
|
||||
val ops = RegistryOps.create(JsonOps.INSTANCE, registryAccess)
|
||||
val result = ops.withEncoder(codec).apply(src)
|
||||
return result.result().orElseThrow {
|
||||
IllegalStateException("Failed to serialize $src: ${result.error().orElse(null)}")
|
||||
|
||||
+13
-7
@@ -15,27 +15,33 @@ import com.google.gson.JsonElement
|
||||
import com.mojang.serialization.DynamicOps
|
||||
import com.mojang.serialization.JsonOps
|
||||
import net.minecraft.client.Minecraft
|
||||
import net.minecraft.core.RegistryAccess
|
||||
import net.minecraft.resources.RegistryOps
|
||||
|
||||
/**
|
||||
* Utility for obtaining RegistryOps with the correct client/server registry access.
|
||||
* Used when manually encoding/decoding registry-backed values (e.g., items, predicates).
|
||||
* Utility for getting RegistryAccess with the correct client/server registry access.
|
||||
* Used when as a fallback when manually encoding/decoding registry-backed values (e.g., items, predicates).
|
||||
*/
|
||||
object RegistryOpsProvider {
|
||||
fun getOpsWithDefaultFallback(): DynamicOps<JsonElement> {
|
||||
object RegistryAccessResolver {
|
||||
fun getAccess(): RegistryAccess {
|
||||
try {
|
||||
Cobblemon.implementation
|
||||
} catch (e: UninitializedPropertyAccessException) {
|
||||
return RegistryAccess.EMPTY
|
||||
}
|
||||
if (Cobblemon.implementation.environment() == Environment.CLIENT) {
|
||||
val minecraft = Minecraft.getInstance()
|
||||
if (minecraft != null && minecraft.level != null)
|
||||
return RegistryOps.create(JsonOps.INSTANCE, minecraft.level!!.registryAccess())
|
||||
return minecraft.level!!.registryAccess()
|
||||
}
|
||||
|
||||
|
||||
if (Cobblemon.implementation.environment() == Environment.SERVER) {
|
||||
val server = server()
|
||||
if (server != null)
|
||||
return RegistryOps.create(JsonOps.INSTANCE, server.registryAccess())
|
||||
return server.registryAccess()
|
||||
}
|
||||
|
||||
return JsonOps.INSTANCE
|
||||
return RegistryAccess.EMPTY
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ import com.cobblemon.mod.common.api.abilities.Abilities
|
||||
import com.cobblemon.mod.common.api.abilities.Ability
|
||||
import com.cobblemon.mod.common.api.moves.BenchedMoves
|
||||
import com.cobblemon.mod.common.api.moves.MoveSet
|
||||
import com.cobblemon.mod.common.api.pokemon.feature.SpeciesFeatures
|
||||
import com.cobblemon.mod.common.pokemon.EVs
|
||||
import com.cobblemon.mod.common.pokemon.FormData
|
||||
import com.cobblemon.mod.common.pokemon.Gender
|
||||
@@ -21,20 +22,22 @@ import com.cobblemon.mod.common.pokemon.Pokemon
|
||||
import com.cobblemon.mod.common.pokemon.Species
|
||||
import com.cobblemon.mod.common.util.DataKeys
|
||||
import com.cobblemon.mod.common.util.codec.CodecUtils
|
||||
import com.cobblemon.mod.common.util.codec.internal.ClientPokemonP1.Companion.FEATURES
|
||||
import com.cobblemon.mod.common.util.codec.internal.ClientPokemonP1.Companion.FEATURE_ID
|
||||
import com.mojang.serialization.Codec
|
||||
import com.mojang.serialization.MapCodec
|
||||
import com.mojang.serialization.codecs.RecordCodecBuilder
|
||||
import java.util.Optional
|
||||
import java.util.UUID
|
||||
import net.minecraft.core.UUIDUtil
|
||||
import net.minecraft.network.chat.Component
|
||||
import net.minecraft.network.chat.ComponentSerialization
|
||||
import net.minecraft.nbt.CompoundTag
|
||||
import net.minecraft.nbt.StringTag
|
||||
import net.minecraft.nbt.Tag
|
||||
|
||||
internal class PokemonP1(
|
||||
val uuid: UUID,
|
||||
val species: Species,
|
||||
val form: FormData,
|
||||
val nickname: Optional<Component>,
|
||||
val features: List<CompoundTag>,
|
||||
val level: Int,
|
||||
val experience: Int,
|
||||
val friendship: Int,
|
||||
@@ -55,7 +58,22 @@ internal class PokemonP1(
|
||||
other.ability = this.ability
|
||||
other.species = this.species
|
||||
other.form = this.form
|
||||
this.nickname.ifPresent { other.nickname = it.copy() }
|
||||
this.features.forEach { featureNbt ->
|
||||
val featureId = featureNbt.getString(FEATURE_ID)
|
||||
if (featureId.isEmpty()) {
|
||||
return@forEach
|
||||
}
|
||||
val speciesFeatureProviders = SpeciesFeatures.getFeaturesFor(other.species)
|
||||
val feature = speciesFeatureProviders.firstNotNullOfOrNull { provider -> provider(featureNbt) } ?: return@forEach
|
||||
if (
|
||||
featureNbt.contains("keys", Tag.TAG_STRING.toInt()) &&
|
||||
!featureNbt.getList("keys", Tag.TAG_STRING.toInt()).contains(StringTag.valueOf(featureId))
|
||||
) {
|
||||
return@forEach
|
||||
}
|
||||
other.features.removeIf { it.name == feature.name }
|
||||
other.features.add(feature)
|
||||
}
|
||||
other.level = this.level
|
||||
other.experience = this.experience
|
||||
other.setFriendship(this.friendship)
|
||||
@@ -91,7 +109,7 @@ internal class PokemonP1(
|
||||
UUIDUtil.LENIENT_CODEC.fieldOf(DataKeys.POKEMON_UUID).forGetter(PokemonP1::uuid),
|
||||
Species.BY_IDENTIFIER_CODEC.fieldOf(DataKeys.POKEMON_SPECIES_IDENTIFIER).forGetter(PokemonP1::species),
|
||||
Codec.STRING.fieldOf(DataKeys.POKEMON_FORM_ID).forGetter { pokemon -> pokemon.form.formOnlyShowdownId() },
|
||||
ComponentSerialization.CODEC.optionalFieldOf(DataKeys.POKEMON_NICKNAME).forGetter(PokemonP1::nickname),
|
||||
Codec.list(CompoundTag.CODEC).optionalFieldOf(FEATURES, emptyList()).forGetter(PokemonP1::features),
|
||||
CodecUtils.dynamicIntRange(1) { Cobblemon.config.maxPokemonLevel }.fieldOf(DataKeys.POKEMON_LEVEL).forGetter(PokemonP1::level),
|
||||
Codec.intRange(0, Int.MAX_VALUE).fieldOf(DataKeys.POKEMON_EXPERIENCE).forGetter(PokemonP1::experience),
|
||||
CodecUtils.dynamicIntRange(0) { Cobblemon.config.maxPokemonFriendship }.fieldOf(DataKeys.POKEMON_FRIENDSHIP).forGetter(PokemonP1::friendship),
|
||||
@@ -104,9 +122,9 @@ internal class PokemonP1(
|
||||
Codec.FLOAT.fieldOf(DataKeys.POKEMON_SCALE_MODIFIER).forGetter(PokemonP1::scaleModifier),
|
||||
Codec.BOOL.fieldOf(DataKeys.POKEMON_SHINY).forGetter(PokemonP1::shiny),
|
||||
Ability.CODEC.fieldOf(DataKeys.POKEMON_ABILITY).forGetter(PokemonP1::ability)
|
||||
).apply(instance) { uuid, species, formId, nickname, level, experience, friendship, currentHealth, gender, ivs, evs, moveSet, benchedMoves, scaleModifier, shiny, ability ->
|
||||
).apply(instance) { uuid, species, formId, features, level, experience, friendship, currentHealth, gender, ivs, evs, moveSet, benchedMoves, scaleModifier, shiny, ability ->
|
||||
val form = species.forms.firstOrNull { it.formOnlyShowdownId() == formId } ?: species.standardForm
|
||||
PokemonP1(uuid, species, form, nickname, level, experience, friendship, currentHealth, gender, ivs, evs, moveSet, benchedMoves, scaleModifier, shiny, ability)
|
||||
PokemonP1(uuid, species, form, features, level, experience, friendship, currentHealth, gender, ivs, evs, moveSet, benchedMoves, scaleModifier, shiny, ability)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,7 +132,11 @@ internal class PokemonP1(
|
||||
pokemon.uuid,
|
||||
pokemon.species,
|
||||
pokemon.form,
|
||||
Optional.ofNullable(pokemon.nickname),
|
||||
pokemon.features.map { feature ->
|
||||
val nbt = CompoundTag()
|
||||
nbt.putString(FEATURE_ID, feature.name)
|
||||
feature.saveToNBT(nbt)
|
||||
},
|
||||
pokemon.level,
|
||||
pokemon.experience,
|
||||
pokemon.friendship,
|
||||
|
||||
@@ -14,15 +14,12 @@ import com.cobblemon.mod.common.api.riding.stats.RidingStat
|
||||
import com.cobblemon.mod.common.pokemon.OriginalTrainerType
|
||||
import com.cobblemon.mod.common.pokemon.Pokemon
|
||||
import com.cobblemon.mod.common.util.DataKeys
|
||||
import com.cobblemon.mod.common.util.codec.internal.ClientPokemonP1.Companion.FEATURES
|
||||
import com.cobblemon.mod.common.util.codec.internal.ClientPokemonP1.Companion.FEATURE_ID
|
||||
import com.cobblemon.mod.common.util.codec.optionalFieldOfWithDefault
|
||||
import com.mojang.serialization.Codec
|
||||
import com.mojang.serialization.MapCodec
|
||||
import com.mojang.serialization.codecs.RecordCodecBuilder
|
||||
import net.minecraft.nbt.CompoundTag
|
||||
import net.minecraft.nbt.StringTag
|
||||
import net.minecraft.nbt.Tag
|
||||
import net.minecraft.network.chat.Component
|
||||
import net.minecraft.network.chat.ComponentSerialization
|
||||
import net.minecraft.resources.ResourceLocation
|
||||
import net.minecraft.world.item.ItemStack
|
||||
import java.util.*
|
||||
@@ -31,7 +28,7 @@ internal data class PokemonP3(
|
||||
val originalTrainerType: OriginalTrainerType,
|
||||
val originalTrainer: Optional<String>,
|
||||
val forcedAspects: Set<String>,
|
||||
val features: List<CompoundTag>,
|
||||
val nickname: Optional<Component>,
|
||||
val heldItemVisible: Optional<Boolean>,
|
||||
val canDropHeldItem: Optional<Boolean>,
|
||||
val cosmeticItem: ItemStack,
|
||||
@@ -51,22 +48,7 @@ internal data class PokemonP3(
|
||||
this.originalTrainer.ifPresent { other.originalTrainer = it }
|
||||
other.refreshOriginalTrainer()
|
||||
other.forcedAspects = this.forcedAspects
|
||||
this.features.forEach { featureNbt ->
|
||||
val featureId = featureNbt.getString(FEATURE_ID)
|
||||
if (featureId.isEmpty()) {
|
||||
return@forEach
|
||||
}
|
||||
val speciesFeatureProviders = SpeciesFeatures.getFeaturesFor(other.species)
|
||||
val feature = speciesFeatureProviders.firstNotNullOfOrNull { provider -> provider(featureNbt) } ?: return@forEach
|
||||
if (
|
||||
featureNbt.contains("keys", Tag.TAG_STRING.toInt()) &&
|
||||
!featureNbt.getList("keys", Tag.TAG_STRING.toInt()).contains(StringTag.valueOf(featureId))
|
||||
) {
|
||||
return@forEach
|
||||
}
|
||||
other.features.removeIf { it.name == feature.name }
|
||||
other.features.add(feature)
|
||||
}
|
||||
this.nickname.ifPresent { other.nickname = it.copy() }
|
||||
this.heldItemVisible.ifPresent { other.heldItemVisible = it }
|
||||
this.canDropHeldItem.ifPresent { other.canDropHeldItem = it }
|
||||
this.cosmeticItem.let { other.cosmeticItem = it }
|
||||
@@ -92,7 +74,7 @@ internal data class PokemonP3(
|
||||
OriginalTrainerType.CODEC.optionalFieldOfWithDefault(DataKeys.POKEMON_ORIGINAL_TRAINER_TYPE, OriginalTrainerType.NONE).forGetter(PokemonP3::originalTrainerType),
|
||||
Codec.STRING.optionalFieldOf(DataKeys.POKEMON_ORIGINAL_TRAINER).forGetter(PokemonP3::originalTrainer),
|
||||
Codec.list(Codec.STRING).optionalFieldOf(DataKeys.POKEMON_FORCED_ASPECTS, emptyList()).forGetter { it.forcedAspects.toMutableList() },
|
||||
Codec.list(CompoundTag.CODEC).optionalFieldOf(FEATURES, emptyList()).forGetter(PokemonP3::features),
|
||||
ComponentSerialization.CODEC.optionalFieldOf(DataKeys.POKEMON_NICKNAME).forGetter(PokemonP3::nickname),
|
||||
Codec.BOOL.optionalFieldOf(DataKeys.HELD_ITEM_VISIBLE).forGetter(PokemonP3::heldItemVisible),
|
||||
Codec.BOOL.optionalFieldOf(DataKeys.HELD_ITEM_AI_DROPPABLE).forGetter(PokemonP3::canDropHeldItem),
|
||||
ItemStack.CODEC.optionalFieldOf(DataKeys.POKEMON_COSMETIC_ITEM).forGetter { Optional.ofNullable(it.cosmeticItem.takeIf { !it.isEmpty }) },
|
||||
@@ -109,7 +91,7 @@ internal data class PokemonP3(
|
||||
originalTrainerType,
|
||||
originalTrainer,
|
||||
forcedAspects,
|
||||
features,
|
||||
nickname,
|
||||
heldItemVisible,
|
||||
canDropHeldItem,
|
||||
cosmeticItem,
|
||||
@@ -125,7 +107,7 @@ internal data class PokemonP3(
|
||||
originalTrainerType,
|
||||
originalTrainer,
|
||||
forcedAspects.toSet(),
|
||||
features,
|
||||
nickname,
|
||||
heldItemVisible,
|
||||
canDropHeldItem,
|
||||
cosmeticItem.orElse(ItemStack.EMPTY),
|
||||
@@ -146,11 +128,7 @@ internal data class PokemonP3(
|
||||
pokemon.originalTrainerType,
|
||||
Optional.ofNullable(pokemon.originalTrainer),
|
||||
pokemon.forcedAspects,
|
||||
pokemon.features.map { feature ->
|
||||
val nbt = CompoundTag()
|
||||
nbt.putString(FEATURE_ID, feature.name)
|
||||
feature.saveToNBT(nbt)
|
||||
},
|
||||
Optional.ofNullable(pokemon.nickname),
|
||||
Optional.ofNullable(pokemon.heldItemVisible),
|
||||
Optional.ofNullable(pokemon.canDropHeldItem),
|
||||
pokemon.cosmeticItem,
|
||||
|
||||
@@ -53,4 +53,60 @@ fun Quaternionf.toEulerXYZDegrees(): Vector3f {
|
||||
vector.z = vector.z.toDegrees()
|
||||
|
||||
return vector
|
||||
}
|
||||
|
||||
|
||||
/* // is not allocation free so just inline ".get(AxisAngle4f)" like in the function below this
|
||||
fun Quaternionf.toScaledAngleAxis(angAxisScaled: Vector3f) {
|
||||
val axisAng4 = AxisAngle4f()
|
||||
this.get(axisAng4)
|
||||
|
||||
angAxisScaled.x = axisAng4.x
|
||||
angAxisScaled.y = axisAng4.y
|
||||
angAxisScaled.z = axisAng4.z
|
||||
angAxisScaled.mul(axisAng4.angle)
|
||||
} */
|
||||
|
||||
fun Quaternionf.toScaledAngleAxis(dest: Vector3f) {
|
||||
var x = this.x
|
||||
var y = this.y
|
||||
var z = this.z
|
||||
var w = this.w
|
||||
|
||||
if (w > 1.0f) {
|
||||
val invNorm = 1.0f / kotlin.math.sqrt(x * x + y * y + z * z + w * w)
|
||||
x *= invNorm
|
||||
y *= invNorm
|
||||
z *= invNorm
|
||||
w *= invNorm
|
||||
}
|
||||
|
||||
val angle = 2.0f * kotlin.math.acos(w)
|
||||
val s = kotlin.math.sqrt(1.0f - w * w)
|
||||
|
||||
if (s < 0.001f) {
|
||||
dest.x = x * angle
|
||||
dest.y = y * angle
|
||||
dest.z = z * angle
|
||||
} else {
|
||||
val invS = angle / s
|
||||
dest.x = x * invS
|
||||
dest.y = y * invS
|
||||
dest.z = z * invS
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun Quaternionf.setFromScaledAngleAxis(angAxisScaled: Vector3f) {
|
||||
val len = angAxisScaled.length()
|
||||
if (len > 1e-5f) {
|
||||
this.rotationAxis(
|
||||
len,
|
||||
angAxisScaled.x / len,
|
||||
angAxisScaled.y / len,
|
||||
angAxisScaled.z / len
|
||||
)
|
||||
} else {
|
||||
this.identity()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,163 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.util.math
|
||||
|
||||
import net.minecraft.util.Mth
|
||||
import kotlin.math.max
|
||||
import kotlin.math.sqrt
|
||||
import kotlin.math.abs
|
||||
import org.joml.Quaternionf
|
||||
import org.joml.Vector3f
|
||||
|
||||
/**
|
||||
* Much of the code here is directly taken or inspired off this great article:
|
||||
* https://theorangeduck.com/page/spring-roll-call#critical
|
||||
*
|
||||
* Very much worth the read.
|
||||
*
|
||||
* Util funcitons for using springs to smoothly/naturally approach one value towards a target
|
||||
*/
|
||||
|
||||
/**
|
||||
* Need to pass in and mutate both a value and a velocity to a spring
|
||||
*/
|
||||
class FloatSpring(
|
||||
var value: Float = 0f,
|
||||
var velocity: Float = 0f
|
||||
)
|
||||
|
||||
class QuatSpring(
|
||||
var quat: Quaternionf = Quaternionf(),
|
||||
var angVel: Vector3f = Vector3f()
|
||||
)
|
||||
|
||||
|
||||
/**
|
||||
* Provides a fast negative exponent approximation for e^-x
|
||||
*/
|
||||
fun negExp(x: Float): Float {
|
||||
return 1.0f / (1.0f + x + 0.48f*x*x + 0.235f*x*x*x)
|
||||
}
|
||||
|
||||
fun halflifeToDamping(halflife: Float, eps: Float = 1e-5f): Float {
|
||||
return (4.0f * 0.69314718056f) / (halflife + eps)
|
||||
}
|
||||
|
||||
fun simpleSpringDamper(
|
||||
spring: FloatSpring,
|
||||
goalValue: Float,
|
||||
halflife: Float,
|
||||
dt: Float,
|
||||
isAngle: Boolean = false
|
||||
) {
|
||||
val y = halflifeToDamping(halflife) / 2.0f
|
||||
val j0 = if (isAngle) Mth.wrapDegrees(spring.value - goalValue) else spring.value - goalValue
|
||||
val j1 = spring.velocity + j0*y;
|
||||
val eydt = negExp(y*dt);
|
||||
|
||||
spring.value = eydt*(j0 + j1*dt) + goalValue;
|
||||
spring.velocity = eydt*(spring.velocity - j1*y*dt);
|
||||
}
|
||||
|
||||
fun simpleSpringDamperQuat(
|
||||
spring: QuatSpring,
|
||||
goalQuat: Quaternionf,
|
||||
halflife: Float,
|
||||
dt: Float
|
||||
) {
|
||||
val y = halflifeToDamping(halflife) / 2.0f
|
||||
|
||||
// Quaternions have double cover q and -q represent the same rotation.
|
||||
// so an accidentally rotation the long way could be calculated.
|
||||
// account for that specifically
|
||||
val goal = if (spring.quat.dot(goalQuat) < 0f) {
|
||||
Quaternionf(-goalQuat.x, -goalQuat.y, -goalQuat.z, -goalQuat.w)
|
||||
} else {
|
||||
goalQuat
|
||||
}
|
||||
|
||||
// Gather the rotation from the goal to the current
|
||||
val goalToCurrQuat = Quaternionf(spring.quat).mul(Quaternionf(goal).conjugate())
|
||||
|
||||
val j0 = Vector3f()
|
||||
goalToCurrQuat.toScaledAngleAxis(j0)
|
||||
|
||||
val j1: Vector3f = Vector3f(spring.angVel).add(Vector3f(j0).mul(y))
|
||||
|
||||
val eydt: Float = negExp(y * dt)
|
||||
|
||||
val scaledAxis = Vector3f(j0).add(Vector3f(j1).mul(dt)).mul(eydt)
|
||||
|
||||
spring.quat.setFromScaledAngleAxis(scaledAxis)
|
||||
spring.quat.mul(goal)
|
||||
|
||||
spring.angVel.sub(j1.mul(y * dt))
|
||||
spring.angVel.mul(eydt)
|
||||
}
|
||||
|
||||
/**
|
||||
* Below is essentially the same code as found here: https://github.com/orangeduck/Spring-It-On/blob/main/inertialeasing.c
|
||||
* https://theorangeduck.com/page/inertial-easing <- the blogpost
|
||||
*/
|
||||
|
||||
// Class to hold the "time" along the curve/function and scale of the function currently
|
||||
// Held in this class so both can be mutated and returned in one function call
|
||||
class InertialVals(
|
||||
var t: Float = 0f,
|
||||
var s: Float = 0f,
|
||||
var offset: Float = 0f,
|
||||
)
|
||||
|
||||
// Includes the negative portion
|
||||
fun smoothstep(t: Float, s: Float): Float {
|
||||
return s * (if(t > 1.0f) 1.0f else 3*t*t - 2*t*t*t)
|
||||
}
|
||||
|
||||
// Derivative of the above smoothstep
|
||||
fun smoothstepDt(t: Float, s: Float): Float {
|
||||
return s * (if(t > 1.0f) 0.0f else 6*t - 6*t*t)
|
||||
}
|
||||
|
||||
// Solve for smoothstep parameters `t` and `s` given new target `x` and velocity `v`
|
||||
fun smoothstepSolve( //TODO change these names to make more sense
|
||||
vals: InertialVals,
|
||||
x: Float, // Target Value x
|
||||
v: Float, // Goal velocity
|
||||
overshoot: Float = 0.05f,
|
||||
eps: Float = 1e-8f
|
||||
) {
|
||||
// If velocity is low enough then start from time zero
|
||||
if (abs(v) < 1e-8f) {
|
||||
vals.t = 0f
|
||||
vals.s = x
|
||||
return
|
||||
}
|
||||
|
||||
// If x is negative then invert signs and re-Solve
|
||||
if (x < 0f) {
|
||||
smoothstepSolve(vals, -x, -v, overshoot, eps)
|
||||
vals.s *= -1f
|
||||
return
|
||||
}
|
||||
|
||||
// Find the possible times that solve for the given `x` and `v`
|
||||
// Quadratic formula!
|
||||
val q: Float = sqrt(max((6*x - v)*(6*x - v) + 8*v*v, eps))
|
||||
val t0: Float = (v - 6*x + q) / (4*v)
|
||||
val t1: Float = (v - 6*x - q) / (4*v)
|
||||
|
||||
// Overshoot if the alternative time is between -0.5f and -(0.5f + overshoot)
|
||||
vals.t = if(-0.5f > t1 && t1 > -(0.5f + overshoot)) t1 else t0;
|
||||
|
||||
// Find the un-scaled velocity at the fitted time
|
||||
val vt: Float = smoothstepDt(vals.t, 1f);
|
||||
|
||||
// Find the scaling factor so that the velocity at the fitted time matches
|
||||
vals.s = if(abs(vt) < eps) 0f else v / vt;
|
||||
}
|
||||
@@ -43,7 +43,7 @@ class TypeGemFeature : Feature<BlockStateConfiguration>(BlockStateConfiguration.
|
||||
val coreState = TYPE_GEM_CORE.defaultBlockState()
|
||||
|
||||
// Place the gem first then make sure it placed before placing the core.
|
||||
worldGenLevel.setBlock(origin, coreState, UPDATE_ALL)
|
||||
worldGenLevel.setBlock(chosenPos, gemState, UPDATE_ALL)
|
||||
if (!worldGenLevel.getBlockState(chosenPos).`is`(gemBlock)) {
|
||||
return false
|
||||
}
|
||||
|
||||
+7173
-195
File diff suppressed because it is too large
Load Diff
+1805
-337
File diff suppressed because it is too large
Load Diff
+245
-151
@@ -1,192 +1,286 @@
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"animations": {
|
||||
"animation.absol.render": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"hips": {
|
||||
"rotation": [-2.5, 0, 0]
|
||||
},
|
||||
"chest": {
|
||||
"rotation": [12.5, 0, 0]
|
||||
},
|
||||
"tail": {
|
||||
"rotation": [-8.01788, 32.61138, -0.66603]
|
||||
},
|
||||
"neck": {
|
||||
"rotation": [15.34479, -13.10699, 9.18372]
|
||||
},
|
||||
"head": {
|
||||
"rotation": [-25.32307, -13.66763, -4.61603]
|
||||
},
|
||||
"hair": {
|
||||
"rotation": [0, 0, 45]
|
||||
},
|
||||
"hair2": {
|
||||
"rotation": [1.95155, 7.24305, 27.62353]
|
||||
},
|
||||
"hair3": {
|
||||
"rotation": [8.61775, 34.05444, 17.64371]
|
||||
},
|
||||
"neck_fur_right2": {
|
||||
"rotation": [0, 0, -30]
|
||||
},
|
||||
"neck_fur_left2": {
|
||||
"rotation": [0, 0, 40]
|
||||
},
|
||||
"neck_fur_back2": {
|
||||
"rotation": [-45, 0, 0]
|
||||
},
|
||||
"chest_fur": {
|
||||
"rotation": [-42.5, 0, 0]
|
||||
},
|
||||
"chest_fur_right": {
|
||||
"rotation": [0, 35, 0]
|
||||
},
|
||||
"chest_fur_left": {
|
||||
"rotation": [0, -25, 0]
|
||||
},
|
||||
"chest_fur_1": {
|
||||
"rotation": [27.5, 0, 0]
|
||||
},
|
||||
"chest_fur_2": {
|
||||
"rotation": [7.5, 0, 0]
|
||||
},
|
||||
"leg_back_left": {
|
||||
"rotation": [21.9659, -13.44762, -0.11731]
|
||||
},
|
||||
"leg_back_left2": {
|
||||
"rotation": [-10, 0, 0]
|
||||
},
|
||||
"leg_back_left3": {
|
||||
"rotation": [5, 0, 0]
|
||||
},
|
||||
"foot__back_left": {
|
||||
"rotation": [-14.82005, -12.39135, -1.6575]
|
||||
},
|
||||
"leg_front_left": {
|
||||
"rotation": [-25.47479, -17.22575, 3.13388],
|
||||
"position": [0, -0.25, 0]
|
||||
},
|
||||
"leg_front_left2": {
|
||||
"rotation": [14.61364, 12.22219, 2.52829]
|
||||
},
|
||||
"foot_front_left": {
|
||||
"rotation": [12.15846, -18.26883, -13.36473]
|
||||
},
|
||||
"eyes_open": {
|
||||
"position": [0, 0, 0]
|
||||
},
|
||||
"eyes_happy": {
|
||||
"position": [0, 0, 0]
|
||||
},
|
||||
"eyes_closed": {
|
||||
"position": [0, 0, 0]
|
||||
},
|
||||
"eyes_halfclosed": {
|
||||
"position": [0, 0, 0]
|
||||
},
|
||||
"leg_back_right": {
|
||||
"rotation": [0, -22.5, 0],
|
||||
"position": [-0.11888, 0, -1.67283]
|
||||
},
|
||||
"foot_back_right": {
|
||||
"rotation": [0, 15, 0]
|
||||
},
|
||||
"waist": {
|
||||
"rotation": [0, -20, 0]
|
||||
},
|
||||
"leg_front_right": {
|
||||
"rotation": [12.5, 0, 0]
|
||||
},
|
||||
"leg_front_right2": {
|
||||
"rotation": [0, 0, -10]
|
||||
},
|
||||
"foot_front_right": {
|
||||
"rotation": [-12.07362, 14.63639, 13.31914]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.absol.ground_idle": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"neck": {
|
||||
"rotation": [20, 0, 0]
|
||||
"rotation": [30, 0, 0]
|
||||
},
|
||||
"head": {
|
||||
"rotation": [-17.5, 0, 0]
|
||||
},
|
||||
"hair": {
|
||||
"rotation": [0, 0, 47]
|
||||
"rotation": [0, 0, -2.5]
|
||||
},
|
||||
"hair2": {
|
||||
"rotation": [0, 8.5, 38]
|
||||
"rotation": [2.5, 10, 0]
|
||||
},
|
||||
"hair3": {
|
||||
"rotation": [9.69368, 25.60466, 13.24197]
|
||||
"rotation": [1.9544, 7.5589, 12.4168]
|
||||
},
|
||||
"neck_fur_right2": {
|
||||
"rotation": [0, 0, -30]
|
||||
"neck_fluff_left": {
|
||||
"rotation": [0, 0, 67.5]
|
||||
},
|
||||
"neck_fur_left2": {
|
||||
"rotation": [0, 0, 40]
|
||||
},
|
||||
"neck_fur_back2": {
|
||||
"neck_fluff_back": {
|
||||
"rotation": [-45, 0, 0]
|
||||
},
|
||||
"chest_fur": {
|
||||
"rotation": [-30, 0, 0]
|
||||
"chest_fluff": {
|
||||
"rotation": [-12.5, 0, 0]
|
||||
},
|
||||
"chest_fur_right": {
|
||||
"rotation": [0, 35, 0]
|
||||
"chest_fluff_right": {
|
||||
"rotation": [0, 37.5, 0]
|
||||
},
|
||||
"chest_fur_left": {
|
||||
"rotation": [0, -25, 0]
|
||||
"chest_fluff_left": {
|
||||
"rotation": [0, -37.5, 0]
|
||||
},
|
||||
"chest_fur_1": {
|
||||
"rotation": [27.5, 0, 0]
|
||||
"chest_fluff2": {
|
||||
"rotation": [-7.5, 0, 0]
|
||||
},
|
||||
"chest_fur_2": {
|
||||
"chest_fluff3": {
|
||||
"rotation": [7.5, 0, 0]
|
||||
},
|
||||
"tail": {
|
||||
"rotation": [-22.5, 0, 0]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.absol.cry": {
|
||||
"animation_length": 2,
|
||||
"bones": {
|
||||
"mouth": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.17],
|
||||
"0.25": {"pre": [0, 0, 0.17], "post": [0, 0, -1]},
|
||||
"1.7917": {"pre": [0, 0, -1], "post": [0, 0, 0.17]}
|
||||
}
|
||||
}
|
||||
},
|
||||
"sound_effects": {
|
||||
"0.04": {
|
||||
"effect": "pokemon.absol.cry"
|
||||
"rotation": [10, 0, 0]
|
||||
},
|
||||
"neck_fluff_right": {
|
||||
"rotation": [0, 0, -67.5]
|
||||
},
|
||||
"torso": {
|
||||
"rotation": [2.5, 0, 0]
|
||||
},
|
||||
"torso2": {
|
||||
"rotation": [-5, 0, 0]
|
||||
},
|
||||
"head_angle": {
|
||||
"rotation": [-5, 0, 0]
|
||||
},
|
||||
"leg_front_left": {
|
||||
"rotation": [-4.9083, 1.8509, 2.416]
|
||||
},
|
||||
"leg_back_left": {
|
||||
"rotation": [0, -10, 0]
|
||||
},
|
||||
"leg_back_left2": {
|
||||
"rotation": [5, 0, 0]
|
||||
},
|
||||
"leg_back_left3": {
|
||||
"rotation": [10, 0, 0]
|
||||
},
|
||||
"foot_back_left": {
|
||||
"rotation": [-13.9904, -4.9952, -0.2186]
|
||||
},
|
||||
"foot_front_left": {
|
||||
"rotation": [4.991, -1.4949, -3.2033]
|
||||
},
|
||||
"neck_fluff_back2": {
|
||||
"rotation": [-50, 0, 0]
|
||||
},
|
||||
"leg_front_right": {
|
||||
"rotation": [2.585, -1.6431, -2.3501]
|
||||
},
|
||||
"leg_front_right2": {
|
||||
"rotation": [2.5, 0, 0]
|
||||
},
|
||||
"foot_front_right": {
|
||||
"rotation": [-4.9201, 6.845, 3.7466]
|
||||
},
|
||||
"leg_back_right": {
|
||||
"rotation": [0, 10, 0]
|
||||
},
|
||||
"leg_back_right2": {
|
||||
"rotation": [5, 0, 0]
|
||||
},
|
||||
"leg_back_right3": {
|
||||
"rotation": [10, 0, 0]
|
||||
},
|
||||
"foot_back_right": {
|
||||
"rotation": [-13.9904, 4.9952, 0.2186]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.absol.blink": {
|
||||
"animation_length": 0.1667,
|
||||
"bones": {
|
||||
"eyes_open": {
|
||||
"eye_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 1],
|
||||
"0.125": {"pre": [0, 0, 1], "post": [0, 0, 1]},
|
||||
"0.1667": {"pre": [0, 0, 1], "post": [0, 0, 0]}
|
||||
"0.0": [-0.1, 0, 0.1],
|
||||
"0.1667": {"pre": [-0.1, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyes_closed": {
|
||||
"eye_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -1],
|
||||
"0.125": {"pre": [0, 0, -1], "post": [0, 0, -1]},
|
||||
"0.1667": {"pre": [0, 0, -1], "post": [0, 0, 0]}
|
||||
"0.0": [0.1, 0, 0.1],
|
||||
"0.1667": {"pre": [0.1, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyelid_right": {
|
||||
"position": {
|
||||
"0.0": [-0.1, 0, -0.1],
|
||||
"0.1667": {"pre": [-0.1, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyelid_left": {
|
||||
"position": {
|
||||
"0.0": [0.1, 0, -0.1],
|
||||
"0.1667": {"pre": [0.1, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyes_ditto": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyes_blink_ditto": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.absol.ditto_face": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"face": {
|
||||
"position": [0, 0, 0.1],
|
||||
"scale": 0
|
||||
},
|
||||
"face_ditto": {
|
||||
"position": [0, 0, -0.1]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.absol.pose": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"neck": {
|
||||
"rotation": [30.3812, -8.6492, -5.0384]
|
||||
},
|
||||
"head": {
|
||||
"rotation": [-17.5, 0, 0]
|
||||
},
|
||||
"hair": {
|
||||
"rotation": [0, 0, -2.5]
|
||||
},
|
||||
"hair2": {
|
||||
"rotation": [2.5, 10, 0]
|
||||
},
|
||||
"hair3": {
|
||||
"rotation": [1.9544, 7.5589, 12.4168]
|
||||
},
|
||||
"neck_fluff_left": {
|
||||
"rotation": [0, 0, 67.5]
|
||||
},
|
||||
"neck_fluff_back": {
|
||||
"rotation": [-45, 0, 0]
|
||||
},
|
||||
"chest_fluff": {
|
||||
"rotation": [-17.5, 0, 0]
|
||||
},
|
||||
"chest_fluff_right": {
|
||||
"rotation": [0, 37.5, 0]
|
||||
},
|
||||
"chest_fluff_left": {
|
||||
"rotation": [0, -37.5, 0]
|
||||
},
|
||||
"chest_fluff2": {
|
||||
"rotation": [-5, 0, 0]
|
||||
},
|
||||
"chest_fluff3": {
|
||||
"rotation": [7.5, 0, 0]
|
||||
},
|
||||
"tail": {
|
||||
"rotation": [-2.2793, -9.656, -2.6129]
|
||||
},
|
||||
"horn": {
|
||||
"rotation": [0, -10, 0]
|
||||
},
|
||||
"neck_fluff_right": {
|
||||
"rotation": [0, 0, -52.5]
|
||||
},
|
||||
"body": {
|
||||
"rotation": [0, 65, 0],
|
||||
"position": [2, -0.55, 0]
|
||||
},
|
||||
"torso": {
|
||||
"rotation": [9.9864, 0.6469, -2.4149]
|
||||
},
|
||||
"torso2": {
|
||||
"rotation": [-5, 0, 0]
|
||||
},
|
||||
"head_angle": {
|
||||
"rotation": [-5.7686, -29.8743, 2.8806]
|
||||
},
|
||||
"leg_front_left": {
|
||||
"rotation": [16.5711, -9.4592, -13.6836],
|
||||
"position": [0.75, -2, 0]
|
||||
},
|
||||
"leg_front_left2": {
|
||||
"rotation": [-45, 0, 0]
|
||||
},
|
||||
"leg_back_left": {
|
||||
"rotation": [14.2119, -9.413, -10.1281]
|
||||
},
|
||||
"leg_back_left2": {
|
||||
"rotation": [-2.5, 0, 0]
|
||||
},
|
||||
"leg_back_left3": {
|
||||
"rotation": [17.5, 0, 0]
|
||||
},
|
||||
"foot_back_left": {
|
||||
"rotation": [-27.3943, 4.3233, 8.0916]
|
||||
},
|
||||
"iris_left": {
|
||||
"position": [1, 0, 0]
|
||||
},
|
||||
"foot_front_left": {
|
||||
"rotation": [41.9868, -4.2611, 0.0665],
|
||||
"position": [0, 0, -0.75]
|
||||
},
|
||||
"claw_middle_front_left": {
|
||||
"rotation": [7.5, 0, 0]
|
||||
},
|
||||
"claw_outer_front_left": {
|
||||
"rotation": [7.5, 0, 0]
|
||||
},
|
||||
"claw_inner_front_left": {
|
||||
"rotation": [7.5, 0, 0]
|
||||
},
|
||||
"neck_fluff_back2": {
|
||||
"rotation": [-50, 0, 0]
|
||||
},
|
||||
"leg_front_right": {
|
||||
"rotation": [-37.5352, -0.064, 9.7291],
|
||||
"position": [-0.25, -1.75, 0]
|
||||
},
|
||||
"leg_front_right2": {
|
||||
"rotation": [3.5, 0, 0]
|
||||
},
|
||||
"foot_front_right": {
|
||||
"rotation": [34.0275, 7.3656, -7.2548],
|
||||
"position": [0, 0.3, 0]
|
||||
},
|
||||
"leg_back_right": {
|
||||
"rotation": [-18.2881, 9.413, 10.1281],
|
||||
"position": [-0.25, 0, 0]
|
||||
},
|
||||
"leg_back_right2": {
|
||||
"rotation": [16.5248, 0.124, 0.1823]
|
||||
},
|
||||
"leg_back_right3": {
|
||||
"rotation": [6, 0, 0]
|
||||
},
|
||||
"foot_back_right": {
|
||||
"rotation": [-2.4124, 5.5284, -9.8095]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.absol.cry": {
|
||||
"sound_effects": {
|
||||
"0.04": {
|
||||
"effect": "pokemon.absol.cry"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1028
-26
File diff suppressed because it is too large
Load Diff
+208
@@ -0,0 +1,208 @@
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"animations": {
|
||||
"animation.burmy_plant.ground_idle": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"body": {
|
||||
"rotation": [2.5201, 0.3141, 0.0322],
|
||||
"position": [0, 6, 0]
|
||||
},
|
||||
"body_rotation": {
|
||||
"rotation": [2.5, 0, 0]
|
||||
},
|
||||
"spring2": {
|
||||
"rotation": [-2.5, 0, 0]
|
||||
},
|
||||
"segment1": {
|
||||
"position": [0, 0.5, 0]
|
||||
},
|
||||
"leg_left1": {
|
||||
"rotation": [0, 15, 0]
|
||||
},
|
||||
"leg_right1": {
|
||||
"rotation": [0, -15, 0]
|
||||
},
|
||||
"segment2": {
|
||||
"position": [0, 0.5, 0]
|
||||
},
|
||||
"segment3": {
|
||||
"position": [0, 0.5, 0]
|
||||
},
|
||||
"leg_left2": {
|
||||
"rotation": [0, 17.5, 0]
|
||||
},
|
||||
"leg_left3": {
|
||||
"rotation": [0, 25, 0]
|
||||
},
|
||||
"leg_right2": {
|
||||
"rotation": [0, -17.5, 0]
|
||||
},
|
||||
"leg_right3": {
|
||||
"rotation": [0, -25, 0]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.burmy_plant.ground_idle_naked": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"body_rotation": {
|
||||
"rotation": [7.5, 0, 0],
|
||||
"position": [0, 0, -3]
|
||||
},
|
||||
"segment1": {
|
||||
"rotation": [75, 0, 0]
|
||||
},
|
||||
"leg_left1": {
|
||||
"rotation": [0.00002, 0.00005, 0.00002]
|
||||
},
|
||||
"cloak_plant": {
|
||||
"scale": 0
|
||||
},
|
||||
"body": {
|
||||
"rotation": [2.5, 0, 0],
|
||||
"position": [0, -7.25, 0]
|
||||
},
|
||||
"leg_right1": {
|
||||
"rotation": [0.00002, -0.00005, -0.00002]
|
||||
},
|
||||
"segment2": {
|
||||
"rotation": [5, 0, 0]
|
||||
},
|
||||
"segment3": {
|
||||
"rotation": [2.5781, -0.5734, 0.2485]
|
||||
},
|
||||
"leg_left2": {
|
||||
"rotation": [2.53742, -4.92385, -0.87038]
|
||||
},
|
||||
"leg_left3": {
|
||||
"rotation": [7.53742, -4.92385, -0.87038]
|
||||
},
|
||||
"leg_right2": {
|
||||
"rotation": [2.53742, 4.92385, 0.87038]
|
||||
},
|
||||
"leg_right3": {
|
||||
"rotation": [7.53742, 4.92385, 0.87038]
|
||||
},
|
||||
"face": {
|
||||
"position": [0, 0, 1]
|
||||
},
|
||||
"cloaked_face": {
|
||||
"scale": 0
|
||||
},
|
||||
"face_ditto": {
|
||||
"position": [0, 0, 1]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.burmy_plant.spring": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"body": {
|
||||
"rotation": [2.5201, 0.3141, 0.0322],
|
||||
"position": [0, 6, 0]
|
||||
},
|
||||
"body_rotation": {
|
||||
"rotation": [2.5, 0, 0],
|
||||
"position": [0, -3, 0]
|
||||
},
|
||||
"spring2": {
|
||||
"rotation": [35.9366, -29.087, 32.6804]
|
||||
},
|
||||
"segment1": {
|
||||
"position": [0, 0.5, 0]
|
||||
},
|
||||
"leg_left1": {
|
||||
"rotation": [0, 15, 0]
|
||||
},
|
||||
"spring": {
|
||||
"rotation": [-26.941, -5.7358, -11.1249]
|
||||
},
|
||||
"spring3": {
|
||||
"rotation": [-24.3803, 6.6782, -46.9093]
|
||||
},
|
||||
"spring4": {
|
||||
"rotation": [0, 0, -35]
|
||||
},
|
||||
"leg_right1": {
|
||||
"rotation": [0, -15, 0]
|
||||
},
|
||||
"segment2": {
|
||||
"position": [0, 0.5, 0]
|
||||
},
|
||||
"segment3": {
|
||||
"position": [0, 0.5, 0]
|
||||
},
|
||||
"leg_left2": {
|
||||
"rotation": [0, 17.5, 0]
|
||||
},
|
||||
"leg_left3": {
|
||||
"rotation": [0, 25, 0]
|
||||
},
|
||||
"leg_right2": {
|
||||
"rotation": [0, -17.5, 0]
|
||||
},
|
||||
"leg_right3": {
|
||||
"rotation": [0, -25, 0]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.burmy_plant.ditto_face": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"face": {
|
||||
"position": [0, 0, 0.1],
|
||||
"scale": 0
|
||||
},
|
||||
"face_ditto": {
|
||||
"position": [0, 0, -0.1]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.burmy_plant.blink": {
|
||||
"animation_length": 0.1667,
|
||||
"bones": {
|
||||
"pupil_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.125": {"pre": [0, 0, 0.1], "post": [0, 0, 0.1]},
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"pupil_closed_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.125": {"pre": [0, 0, -0.1], "post": [0, 0, -0.1]},
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"pupil_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.125": {"pre": [0, 0, 0.1], "post": [0, 0, 0.1]},
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"pupil_closed_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.125": {"pre": [0, 0, -0.1], "post": [0, 0, -0.1]},
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyes_ditto": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyes_blink_ditto": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+208
@@ -0,0 +1,208 @@
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"animations": {
|
||||
"animation.burmy_sandy.ground_idle": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"body": {
|
||||
"rotation": [2.5201, 0.3141, 0.0322],
|
||||
"position": [0, 6, 0]
|
||||
},
|
||||
"body_rotation": {
|
||||
"rotation": [2.5, 0, 0]
|
||||
},
|
||||
"spring2": {
|
||||
"rotation": [-2.5, 0, 0]
|
||||
},
|
||||
"segment1": {
|
||||
"position": [0, 0.5, 0]
|
||||
},
|
||||
"leg_left1": {
|
||||
"rotation": [0, 15, 0]
|
||||
},
|
||||
"leg_right1": {
|
||||
"rotation": [0, -15, 0]
|
||||
},
|
||||
"segment2": {
|
||||
"position": [0, 0.5, 0]
|
||||
},
|
||||
"segment3": {
|
||||
"position": [0, 0.5, 0]
|
||||
},
|
||||
"leg_left2": {
|
||||
"rotation": [0, 17.5, 0]
|
||||
},
|
||||
"leg_left3": {
|
||||
"rotation": [0, 25, 0]
|
||||
},
|
||||
"leg_right2": {
|
||||
"rotation": [0, -17.5, 0]
|
||||
},
|
||||
"leg_right3": {
|
||||
"rotation": [0, -25, 0]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.burmy_sandy.ground_idle_naked": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"body_rotation": {
|
||||
"rotation": [7.5, 0, 0],
|
||||
"position": [0, 0, -3]
|
||||
},
|
||||
"segment1": {
|
||||
"rotation": [75, 0, 0]
|
||||
},
|
||||
"leg_left1": {
|
||||
"rotation": [0.00002, 0.00005, 0.00002]
|
||||
},
|
||||
"cloak_plant": {
|
||||
"scale": 0
|
||||
},
|
||||
"body": {
|
||||
"rotation": [2.5, 0, 0],
|
||||
"position": [0, -7.25, 0]
|
||||
},
|
||||
"leg_right1": {
|
||||
"rotation": [0.00002, -0.00005, -0.00002]
|
||||
},
|
||||
"segment2": {
|
||||
"rotation": [5, 0, 0]
|
||||
},
|
||||
"segment3": {
|
||||
"rotation": [2.5781, -0.5734, 0.2485]
|
||||
},
|
||||
"leg_left2": {
|
||||
"rotation": [2.53742, -4.92385, -0.87038]
|
||||
},
|
||||
"leg_left3": {
|
||||
"rotation": [7.53742, -4.92385, -0.87038]
|
||||
},
|
||||
"leg_right2": {
|
||||
"rotation": [2.53742, 4.92385, 0.87038]
|
||||
},
|
||||
"leg_right3": {
|
||||
"rotation": [7.53742, 4.92385, 0.87038]
|
||||
},
|
||||
"face": {
|
||||
"position": [0, 0, 1]
|
||||
},
|
||||
"cloaked_face": {
|
||||
"scale": 0
|
||||
},
|
||||
"face_ditto": {
|
||||
"position": [0, 0, 1]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.burmy_sandy.spring": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"body": {
|
||||
"rotation": [2.5201, 0.3141, 0.0322],
|
||||
"position": [0, 6, 0]
|
||||
},
|
||||
"body_rotation": {
|
||||
"rotation": [2.5, 0, 0],
|
||||
"position": [0, -3, 0]
|
||||
},
|
||||
"spring2": {
|
||||
"rotation": [35.9366, -29.087, 32.6804]
|
||||
},
|
||||
"segment1": {
|
||||
"position": [0, 0.5, 0]
|
||||
},
|
||||
"leg_left1": {
|
||||
"rotation": [0, 15, 0]
|
||||
},
|
||||
"spring": {
|
||||
"rotation": [-26.941, -5.7358, -11.1249]
|
||||
},
|
||||
"spring3": {
|
||||
"rotation": [-24.3803, 6.6782, -46.9093]
|
||||
},
|
||||
"spring4": {
|
||||
"rotation": [0, 0, -35]
|
||||
},
|
||||
"leg_right1": {
|
||||
"rotation": [0, -15, 0]
|
||||
},
|
||||
"segment2": {
|
||||
"position": [0, 0.5, 0]
|
||||
},
|
||||
"segment3": {
|
||||
"position": [0, 0.5, 0]
|
||||
},
|
||||
"leg_left2": {
|
||||
"rotation": [0, 17.5, 0]
|
||||
},
|
||||
"leg_left3": {
|
||||
"rotation": [0, 25, 0]
|
||||
},
|
||||
"leg_right2": {
|
||||
"rotation": [0, -17.5, 0]
|
||||
},
|
||||
"leg_right3": {
|
||||
"rotation": [0, -25, 0]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.burmy_sandy.ditto_face": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"face": {
|
||||
"position": [0, 0, 0.1],
|
||||
"scale": 0
|
||||
},
|
||||
"face_ditto": {
|
||||
"position": [0, 0, -0.1]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.burmy_sandy.blink": {
|
||||
"animation_length": 0.1667,
|
||||
"bones": {
|
||||
"pupil_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.125": [0, 0, 0.1],
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"pupil_closed_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.125": [0, 0, -0.1],
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"pupil_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.125": [0, 0, 0.1],
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"pupil_closed_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.125": [0, 0, -0.1],
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyes_ditto": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyes_blink_ditto": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+208
@@ -0,0 +1,208 @@
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"animations": {
|
||||
"animation.burmy_trash.ground_idle": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"body": {
|
||||
"rotation": [2.5201, 0.3141, 0.0322],
|
||||
"position": [0, 6, 0]
|
||||
},
|
||||
"body_rotation": {
|
||||
"rotation": [2.5, 0, 0]
|
||||
},
|
||||
"spring2": {
|
||||
"rotation": [-2.5, 0, 0]
|
||||
},
|
||||
"segment1": {
|
||||
"position": [0, 0.5, 0]
|
||||
},
|
||||
"leg_left1": {
|
||||
"rotation": [0, 15, 0]
|
||||
},
|
||||
"leg_right1": {
|
||||
"rotation": [0, -15, 0]
|
||||
},
|
||||
"segment2": {
|
||||
"position": [0, 0.5, 0]
|
||||
},
|
||||
"segment3": {
|
||||
"position": [0, 0.5, 0]
|
||||
},
|
||||
"leg_left2": {
|
||||
"rotation": [0, 17.5, 0]
|
||||
},
|
||||
"leg_left3": {
|
||||
"rotation": [0, 25, 0]
|
||||
},
|
||||
"leg_right2": {
|
||||
"rotation": [0, -17.5, 0]
|
||||
},
|
||||
"leg_right3": {
|
||||
"rotation": [0, -25, 0]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.burmy_trash.ground_idle_naked": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"body_rotation": {
|
||||
"rotation": [7.5, 0, 0],
|
||||
"position": [0, 0, -3]
|
||||
},
|
||||
"segment1": {
|
||||
"rotation": [75, 0, 0]
|
||||
},
|
||||
"leg_left1": {
|
||||
"rotation": [0.00002, 0.00005, 0.00002]
|
||||
},
|
||||
"cloak_plant": {
|
||||
"scale": 0
|
||||
},
|
||||
"body": {
|
||||
"rotation": [2.5, 0, 0],
|
||||
"position": [0, -7.25, 0]
|
||||
},
|
||||
"leg_right1": {
|
||||
"rotation": [0.00002, -0.00005, -0.00002]
|
||||
},
|
||||
"segment2": {
|
||||
"rotation": [5, 0, 0]
|
||||
},
|
||||
"segment3": {
|
||||
"rotation": [2.5781, -0.5734, 0.2485]
|
||||
},
|
||||
"leg_left2": {
|
||||
"rotation": [2.53742, -4.92385, -0.87038]
|
||||
},
|
||||
"leg_left3": {
|
||||
"rotation": [7.53742, -4.92385, -0.87038]
|
||||
},
|
||||
"leg_right2": {
|
||||
"rotation": [2.53742, 4.92385, 0.87038]
|
||||
},
|
||||
"leg_right3": {
|
||||
"rotation": [7.53742, 4.92385, 0.87038]
|
||||
},
|
||||
"face": {
|
||||
"position": [0, 0, 1]
|
||||
},
|
||||
"cloaked_face": {
|
||||
"scale": 0
|
||||
},
|
||||
"face_ditto": {
|
||||
"position": [0, 0, 1]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.burmy_trash.spring": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"body": {
|
||||
"rotation": [2.5201, 0.3141, 0.0322],
|
||||
"position": [0, 6, 0]
|
||||
},
|
||||
"body_rotation": {
|
||||
"rotation": [2.5, 0, 0],
|
||||
"position": [0, -3, 0]
|
||||
},
|
||||
"spring2": {
|
||||
"rotation": [35.9366, -29.087, 32.6804]
|
||||
},
|
||||
"segment1": {
|
||||
"position": [0, 0.5, 0]
|
||||
},
|
||||
"leg_left1": {
|
||||
"rotation": [0, 15, 0]
|
||||
},
|
||||
"spring": {
|
||||
"rotation": [-26.941, -5.7358, -11.1249]
|
||||
},
|
||||
"spring3": {
|
||||
"rotation": [-24.3803, 6.6782, -46.9093]
|
||||
},
|
||||
"spring4": {
|
||||
"rotation": [0, 0, -35]
|
||||
},
|
||||
"leg_right1": {
|
||||
"rotation": [0, -15, 0]
|
||||
},
|
||||
"segment2": {
|
||||
"position": [0, 0.5, 0]
|
||||
},
|
||||
"segment3": {
|
||||
"position": [0, 0.5, 0]
|
||||
},
|
||||
"leg_left2": {
|
||||
"rotation": [0, 17.5, 0]
|
||||
},
|
||||
"leg_left3": {
|
||||
"rotation": [0, 25, 0]
|
||||
},
|
||||
"leg_right2": {
|
||||
"rotation": [0, -17.5, 0]
|
||||
},
|
||||
"leg_right3": {
|
||||
"rotation": [0, -25, 0]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.burmy_trash.ditto_face": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"face": {
|
||||
"position": [0, 0, 0.1],
|
||||
"scale": 0
|
||||
},
|
||||
"face_ditto": {
|
||||
"position": [0, 0, -0.1]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.burmy_trash.blink": {
|
||||
"animation_length": 0.1667,
|
||||
"bones": {
|
||||
"pupil_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.125": [0, 0, 0.1],
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"pupil_closed_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.125": [0, 0, -0.1],
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"pupil_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.125": [0, 0, 0.1],
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"pupil_closed_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.125": [0, 0, -0.1],
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyes_ditto": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyes_blink_ditto": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+107
@@ -0,0 +1,107 @@
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"animations": {
|
||||
"animation.wormadam_plant.ground_idle": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"body": {
|
||||
"rotation": [5, 0, 0],
|
||||
"position": [0, 6, 0]
|
||||
},
|
||||
"body_rotation": {
|
||||
"rotation": [0, 0, 0]
|
||||
},
|
||||
"antenna": {
|
||||
"rotation": [-2.5, 0, 0]
|
||||
},
|
||||
"ear_left": {
|
||||
"rotation": [0, -12.5, 0]
|
||||
},
|
||||
"ear_left2": {
|
||||
"rotation": [0, 0, 20]
|
||||
},
|
||||
"ear_left3": {
|
||||
"rotation": [0, 0, 22.5]
|
||||
},
|
||||
"ear_back_left": {
|
||||
"rotation": [-7.5, 0, 25]
|
||||
},
|
||||
"ear_left4": {
|
||||
"rotation": [0, 0, 17.5]
|
||||
},
|
||||
"ear_right": {
|
||||
"rotation": [0, 12.5, 0]
|
||||
},
|
||||
"ear_right2": {
|
||||
"rotation": [0, 0, -20]
|
||||
},
|
||||
"ear_right3": {
|
||||
"rotation": [0, 0, -22.5]
|
||||
},
|
||||
"ear_right4": {
|
||||
"rotation": [0, 0, -17.5]
|
||||
},
|
||||
"ear_back_right": {
|
||||
"rotation": [-7.5, 0, -25]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.wormadam_plant.blink": {
|
||||
"animation_length": 0.1667,
|
||||
"bones": {
|
||||
"pupil_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.125": [0, 0, 0.1],
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"pupil_closed_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.125": [0, 0, -0.1],
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"pupil_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.125": [0, 0, 0.1],
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"pupil_closed_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.125": [0, 0, -0.1],
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyes_ditto": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyes_blink_ditto": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.wormadam_plant.ditto_face": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"face": {
|
||||
"position": [0, 0, 0.1],
|
||||
"scale": 0
|
||||
},
|
||||
"face_ditto": {
|
||||
"position": [0, 0, -0.1]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+107
@@ -0,0 +1,107 @@
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"animations": {
|
||||
"animation.wormadam_sandy.ground_idle": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"body": {
|
||||
"rotation": [5, 0, 0],
|
||||
"position": [0, 6, 0]
|
||||
},
|
||||
"body_rotation": {
|
||||
"rotation": [0, 0, 0]
|
||||
},
|
||||
"antenna": {
|
||||
"rotation": [-2.5, 0, 0]
|
||||
},
|
||||
"ear_left": {
|
||||
"rotation": [0, -12.5, 0]
|
||||
},
|
||||
"ear_left2": {
|
||||
"rotation": [0, 0, 20]
|
||||
},
|
||||
"ear_left3": {
|
||||
"rotation": [0, 0, 22.5]
|
||||
},
|
||||
"ear_back_left": {
|
||||
"rotation": [-7.5, 0, 25]
|
||||
},
|
||||
"ear_left4": {
|
||||
"rotation": [0, 0, 17.5]
|
||||
},
|
||||
"ear_right": {
|
||||
"rotation": [0, 12.5, 0]
|
||||
},
|
||||
"ear_right2": {
|
||||
"rotation": [0, 0, -20]
|
||||
},
|
||||
"ear_right3": {
|
||||
"rotation": [0, 0, -22.5]
|
||||
},
|
||||
"ear_right4": {
|
||||
"rotation": [0, 0, -17.5]
|
||||
},
|
||||
"ear_back_right": {
|
||||
"rotation": [-7.5, 0, -25]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.wormadam_sandy.blink": {
|
||||
"animation_length": 0.1667,
|
||||
"bones": {
|
||||
"pupil_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.125": [0, 0, 0.1],
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"pupil_closed_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.125": [0, 0, -0.1],
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"pupil_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.125": [0, 0, 0.1],
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"pupil_closed_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.125": [0, 0, -0.1],
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyes_ditto": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyes_blink_ditto": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.wormadam_sandy.ditto_face": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"face": {
|
||||
"position": [0, 0, 0.1],
|
||||
"scale": 0
|
||||
},
|
||||
"face_ditto": {
|
||||
"position": [0, 0, -0.1]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+107
@@ -0,0 +1,107 @@
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"animations": {
|
||||
"animation.wormadam_trash.ground_idle": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"body": {
|
||||
"rotation": [5, 0, 0],
|
||||
"position": [0, 6, 0]
|
||||
},
|
||||
"body_rotation": {
|
||||
"rotation": [0, 0, 0]
|
||||
},
|
||||
"antenna": {
|
||||
"rotation": [-2.5, 0, 0]
|
||||
},
|
||||
"ear_left": {
|
||||
"rotation": [0, -12.5, 0]
|
||||
},
|
||||
"ear_left2": {
|
||||
"rotation": [0, 0, 20]
|
||||
},
|
||||
"ear_left3": {
|
||||
"rotation": [0, 0, 22.5]
|
||||
},
|
||||
"ear_back_left": {
|
||||
"rotation": [-7.5, 0, 25]
|
||||
},
|
||||
"ear_left4": {
|
||||
"rotation": [0, 0, 17.5]
|
||||
},
|
||||
"ear_right": {
|
||||
"rotation": [0, 12.5, 0]
|
||||
},
|
||||
"ear_right2": {
|
||||
"rotation": [0, 0, -20]
|
||||
},
|
||||
"ear_right3": {
|
||||
"rotation": [0, 0, -22.5]
|
||||
},
|
||||
"ear_right4": {
|
||||
"rotation": [0, 0, -17.5]
|
||||
},
|
||||
"ear_back_right": {
|
||||
"rotation": [-7.5, 0, -25]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.wormadam_trash.blink": {
|
||||
"animation_length": 0.1667,
|
||||
"bones": {
|
||||
"pupil_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.125": [0, 0, 0.1],
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"pupil_closed_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.125": [0, 0, -0.1],
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"pupil_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.125": [0, 0, 0.1],
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"pupil_closed_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.125": [0, 0, -0.1],
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyes_ditto": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyes_blink_ditto": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.wormadam_trash.ditto_face": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"face": {
|
||||
"position": [0, 0, 0.1],
|
||||
"scale": 0
|
||||
},
|
||||
"face_ditto": {
|
||||
"position": [0, 0, -0.1]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"animations": {
|
||||
"animation.mothim.ground_idle": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"torso": {
|
||||
"rotation": [5, 0, 0]
|
||||
},
|
||||
"wing_upper_left": {
|
||||
"rotation": [1.3185, -9.9136, -7.6143]
|
||||
},
|
||||
"wing_lower_left": {
|
||||
"rotation": [-2.5, -12.5, 0]
|
||||
},
|
||||
"head": {
|
||||
"rotation": [-5, 0, 0]
|
||||
},
|
||||
"antenna_left": {
|
||||
"rotation": [-22.4229, 1.9113, 4.6211]
|
||||
},
|
||||
"antenna_left2": {
|
||||
"rotation": [-7.5, 0, 0]
|
||||
},
|
||||
"tail": {
|
||||
"rotation": [-12.5, 0, 0]
|
||||
},
|
||||
"antenna_right": {
|
||||
"rotation": [-22.4229, -1.9113, -4.6211]
|
||||
},
|
||||
"antenna_right2": {
|
||||
"rotation": [-7.5, 0, 0]
|
||||
},
|
||||
"arm_left": {
|
||||
"rotation": [-0.9096, 19.9802, 44.8398]
|
||||
},
|
||||
"arm_right": {
|
||||
"rotation": [-0.9096, -19.9802, -44.8398]
|
||||
},
|
||||
"leg_left": {
|
||||
"rotation": [-9.041, -41.7073, 13.4501]
|
||||
},
|
||||
"leg_right": {
|
||||
"rotation": [-9.041, 41.7073, -13.4501]
|
||||
},
|
||||
"wing_upper_right": {
|
||||
"rotation": [1.3185, 9.9136, 7.6143]
|
||||
},
|
||||
"wing_lower_right": {
|
||||
"rotation": [-2.5, 12.5, 0]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.mothim.blink": {
|
||||
"animation_length": 0.1667,
|
||||
"bones": {
|
||||
"eye_open_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.125": {"pre": [0, 0, 0.1], "post": [0, 0, 0.1]},
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eye_open_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.125": {"pre": [0, 0, 0.1], "post": [0, 0, 0.1]},
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eye_closed_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.125": {"pre": [0, 0, -0.1], "post": [0, 0, -0.1]},
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, -0.1]}
|
||||
}
|
||||
},
|
||||
"eye_closed_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.125": {"pre": [0, 0, -0.1], "post": [0, 0, -0.1]},
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, -0.1]}
|
||||
}
|
||||
},
|
||||
"eyes_ditto": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyes_blink_ditto": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+104
@@ -0,0 +1,104 @@
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"animations": {
|
||||
"animation.snover.ground_idle": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"tail": {
|
||||
"rotation": [-7.44134, 0.07948, 0.53084]
|
||||
},
|
||||
"arm_right": {
|
||||
"rotation": [0, 0, "-32.5-5*Math.sin((query.anim_time-0.5) * 90 * 1)"]
|
||||
},
|
||||
"arm_right2": {
|
||||
"rotation": [0, "-12.5+5*Math.sin((query.anim_time-0.75) * 90 * 1)", 0]
|
||||
},
|
||||
"torso": {
|
||||
"rotation": ["-2.5+2*Math.sin((query.anim_time-0) * 90 * 1)", 0, "-2*Math.sin((query.anim_time-0.8) * 90 * 0.5)"],
|
||||
"position": [0, "0.1*Math.sin((query.anim_time-0.75) * 90 * 1)", 0]
|
||||
},
|
||||
"torso2": {
|
||||
"rotation": ["5+1*Math.sin((query.anim_time-0.25) * 90 * 1)", 0, 0]
|
||||
},
|
||||
"arm_left": {
|
||||
"rotation": [0, 0, "32.5+5*Math.sin((query.anim_time-0.5) * 90 * 1)"]
|
||||
},
|
||||
"arm_left2": {
|
||||
"rotation": [0, "12.5-5*Math.sin((query.anim_time-0.75) * 90 * 1)", 0]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.snover.blink": {
|
||||
"animation_length": 0.1667,
|
||||
"bones": {
|
||||
"pupil_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"pupil_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"pupil_closed_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"pupil_closed_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyes_ditto": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyes_blink_ditto": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.snover.ditto_face": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"eyes": {
|
||||
"scale": 0
|
||||
},
|
||||
"face_ditto": {
|
||||
"position": [0, 0, -0.1]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.snover.berries_female": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"berry_front": {
|
||||
"position": [0, 0, -4]
|
||||
},
|
||||
"berry_front_right": {
|
||||
"position": [-4, 0, -4]
|
||||
},
|
||||
"berry_back_right": {
|
||||
"position": [-4, 0, 4]
|
||||
},
|
||||
"berry_front_left": {
|
||||
"position": [4, 0, -4]
|
||||
},
|
||||
"berry_back_left": {
|
||||
"position": [4, 0, 4]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"animations": {
|
||||
"animation.abomasnow.ground_idle": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"torso2": {
|
||||
"rotation": [2.5, 0, 0]
|
||||
},
|
||||
"head": {
|
||||
"rotation": [-2.5, 0, 0]
|
||||
},
|
||||
"arm_left": {
|
||||
"rotation": [0, 0, 35]
|
||||
},
|
||||
"arm_left2": {
|
||||
"rotation": [4.75346, 32.18826, 8.87221]
|
||||
},
|
||||
"finger_front_left": {
|
||||
"rotation": [-3.96713, -14.47751, 15.50409]
|
||||
},
|
||||
"finger_middle_left": {
|
||||
"rotation": [0, 0, 15]
|
||||
},
|
||||
"finger_back_left": {
|
||||
"rotation": [3.96713, 14.47751, 15.50409]
|
||||
},
|
||||
"foot_left": {
|
||||
"rotation": [0, -15, 0]
|
||||
},
|
||||
"tail": {
|
||||
"rotation": [-15, 0, 0]
|
||||
},
|
||||
"tail2": {
|
||||
"rotation": [5, 0, 0]
|
||||
},
|
||||
"tail3": {
|
||||
"rotation": [5, 0, 0]
|
||||
},
|
||||
"arm_right": {
|
||||
"rotation": [0, 0, -35]
|
||||
},
|
||||
"arm_right2": {
|
||||
"rotation": [4.75346, -32.18826, -8.87221]
|
||||
},
|
||||
"finger_front_right": {
|
||||
"rotation": [-3.96713, 14.47751, -15.50409]
|
||||
},
|
||||
"finger_middle_right": {
|
||||
"rotation": [0, 0, -15]
|
||||
},
|
||||
"finger_back_right": {
|
||||
"rotation": [3.96713, -14.47751, -15.50409]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.abomasnow.blink": {
|
||||
"animation_length": 0.1667,
|
||||
"bones": {
|
||||
"eye_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eye_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyelid_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyelid_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyes_ditto": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyes_blink_ditto": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.abomasnow.ditto_face": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"eyes": {
|
||||
"scale": 0
|
||||
},
|
||||
"face_ditto": {
|
||||
"position": [0, 0, -0.1]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+279
@@ -0,0 +1,279 @@
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"animations": {
|
||||
"animation.tympole.ground_idle": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"torso": {
|
||||
"rotation": [-2.5, 0, 0]
|
||||
},
|
||||
"tail": {
|
||||
"rotation": [-37.5, 0, 0]
|
||||
},
|
||||
"tail2": {
|
||||
"rotation": [35, 0, 0]
|
||||
},
|
||||
"tail3": {
|
||||
"rotation": [10, 0, 0]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.tympole.sleep": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"body": {
|
||||
"rotation": [-95, 0, 0],
|
||||
"position": [0, 0, 2]
|
||||
},
|
||||
"tail": {
|
||||
"rotation": [-85, 0, 0]
|
||||
},
|
||||
"tail2": {
|
||||
"rotation": [-5, 0, 0]
|
||||
},
|
||||
"tail3": {
|
||||
"rotation": [-12.5, 0, 0]
|
||||
},
|
||||
"eye_left": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"eye_right": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"eyelid_right": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"eyelid_left": {
|
||||
"position": [0, 0, -0.1]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.tympole.blink": {
|
||||
"animation_length": 0.1667,
|
||||
"bones": {
|
||||
"eye_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyelid_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eye_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyelid_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyes_ditto": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyes_blink_ditto": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.tympole.ditto_face": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"face": {
|
||||
"scale": 0
|
||||
},
|
||||
"face_ditto": {
|
||||
"position": [0, 0, -0.1]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.tympole.pose": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"body": {
|
||||
"rotation": [-8.5958, -5.68422, 21.80633],
|
||||
"position": [0, 8, 0]
|
||||
},
|
||||
"tail": {
|
||||
"rotation": [-67.5, -22.5, 0],
|
||||
"position": [0, -2, 0]
|
||||
},
|
||||
"tail2": {
|
||||
"rotation": [22.5, 0, 0]
|
||||
},
|
||||
"tail3": {
|
||||
"rotation": [22.5, 0, 0]
|
||||
},
|
||||
"mouth": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"mouth_open": {
|
||||
"position": [0, 0, 0]
|
||||
},
|
||||
"mouth_open_small": {
|
||||
"position": [0, 0, -0.1]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.tympole.happy": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"eye_left": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"eye_right": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"mouth": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"mouth_open": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"eye_left_happy": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"eye_right_happy": {
|
||||
"position": [0, 0, -0.1]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.tympole.shock": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"mouth": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"mouth_open_tall": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"eyebrow_left": {
|
||||
"position": [0, 0.5, 0]
|
||||
},
|
||||
"eyebrow_right": {
|
||||
"position": [0, 0.5, 0]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.tympole.angry": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"eyebrow_left": {
|
||||
"rotation": [0, 0, -22.5],
|
||||
"position": [-0.25, -0.25, -0.04]
|
||||
},
|
||||
"eyebrow_right": {
|
||||
"rotation": [0, 0, 22.5],
|
||||
"position": [0.25, -0.25, -0.04]
|
||||
},
|
||||
"mouth": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"eyelid_left_emote": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"eyelid_right_emote": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"mouth_angry": {
|
||||
"position": [0, 0, -0.1]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.tympole.sad": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"eyebrow_left": {
|
||||
"rotation": [0, 0, 10],
|
||||
"position": [0.15, 0, -0.04]
|
||||
},
|
||||
"eyebrow_right": {
|
||||
"rotation": [0, 0, -10],
|
||||
"position": [-0.15, 0, -0.04]
|
||||
},
|
||||
"mouth": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"eyelid_left_emote": {
|
||||
"position": [0.9, 0, -0.1]
|
||||
},
|
||||
"eyelid_right_emote": {
|
||||
"position": [-0.9, 0, -0.1]
|
||||
},
|
||||
"mouth_sad": {
|
||||
"position": [0, 0, -0.1]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.tympole.hurt": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"eyebrow_left": {
|
||||
"position": [0, -0.25, 0]
|
||||
},
|
||||
"eyebrow_right": {
|
||||
"position": [0, -0.25, 0]
|
||||
},
|
||||
"eye_left": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"eye_right": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"mouth": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"mouth_open_frown": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"eye_left_hurt": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"eye_right_hurt": {
|
||||
"position": [0, 0, -0.1]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.tympole.unamused": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"mouth": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"mouth_angry": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"eyelid_left_unamused": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"eyelid_right_unamused": {
|
||||
"position": [0, 0, -0.1]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.tympole.scale": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"tympole": {
|
||||
"scale": 0.65
|
||||
},
|
||||
"ear_left_inside": {
|
||||
"position": [0, 0, 0]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+223
@@ -0,0 +1,223 @@
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"animations": {
|
||||
"animation.palpitoad.ground_idle": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"palpitoad": {
|
||||
"scale": 1
|
||||
},
|
||||
"torso": {
|
||||
"rotation": [-2.5, 0, 0]
|
||||
},
|
||||
"tail": {
|
||||
"rotation": [-32.5, 0, 0]
|
||||
},
|
||||
"nose": {
|
||||
"rotation": [-10, 0, 0]
|
||||
},
|
||||
"leg_left": {
|
||||
"rotation": [0, 15, 0]
|
||||
},
|
||||
"leg_right": {
|
||||
"rotation": [0, -15, 0]
|
||||
},
|
||||
"tail2": {
|
||||
"rotation": [20, 0, 0]
|
||||
},
|
||||
"tail3": {
|
||||
"rotation": [12.5, 0, 0]
|
||||
},
|
||||
"tongue": {
|
||||
"rotation": [260, 0, 0]
|
||||
},
|
||||
"tongue_2": {
|
||||
"rotation": [180, 0, 0]
|
||||
},
|
||||
"tongue_3": {
|
||||
"rotation": [180, 0, 0]
|
||||
},
|
||||
"tongue_4": {
|
||||
"rotation": [180, 0, 0]
|
||||
},
|
||||
"tongue_5": {
|
||||
"rotation": [180, 0, 0]
|
||||
},
|
||||
"tongue_6": {
|
||||
"rotation": [180, 0, 0]
|
||||
},
|
||||
"tongue_7": {
|
||||
"rotation": [180, 0, 0]
|
||||
},
|
||||
"tongue_8": {
|
||||
"rotation": [180, 0, 0]
|
||||
},
|
||||
"tongue_9": {
|
||||
"rotation": [180, 0, 0]
|
||||
},
|
||||
"tongue_10": {
|
||||
"rotation": [180, 0, 0]
|
||||
},
|
||||
"tongue_11": {
|
||||
"rotation": [180, 0, 0]
|
||||
},
|
||||
"tongue_12": {
|
||||
"rotation": [180, 0, 0]
|
||||
},
|
||||
"head": {
|
||||
"rotation": [2.5, 0, 0]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.palpitoad.blink": {
|
||||
"animation_length": 0.1667,
|
||||
"bones": {
|
||||
"eye_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.125": [0, 0, 0.1],
|
||||
"0.1667": [0, 0, 0]
|
||||
}
|
||||
},
|
||||
"shine_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.125": [0, 0, 0.1],
|
||||
"0.1667": [0, 0, 0]
|
||||
}
|
||||
},
|
||||
"eye_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.125": [0, 0, 0.1],
|
||||
"0.1667": [0, 0, 0]
|
||||
}
|
||||
},
|
||||
"shine_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.125": [0, 0, 0.1],
|
||||
"0.1667": [0, 0, 0]
|
||||
}
|
||||
},
|
||||
"eyelid_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.125": [0, 0, -0.1],
|
||||
"0.1667": [0, 0, 0]
|
||||
}
|
||||
},
|
||||
"eyelid_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.125": [0, 0, -0.1],
|
||||
"0.1667": [0, 0, 0]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.palpitoad.ditto_face": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"mouth_open_big_bottom": {
|
||||
"scale": 0
|
||||
},
|
||||
"face": {
|
||||
"scale": 0
|
||||
},
|
||||
"face_ditto": {
|
||||
"position": [0, 0, -0.1]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.palpitoad.pose": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"body": {
|
||||
"position": [0, 1, 0]
|
||||
},
|
||||
"leg_left": {
|
||||
"rotation": [20, 25, 0]
|
||||
},
|
||||
"toes_left": {
|
||||
"rotation": [-20, 0, 0]
|
||||
},
|
||||
"leg_right": {
|
||||
"rotation": [20, -25, 0]
|
||||
},
|
||||
"toes_right": {
|
||||
"rotation": [-20, 0, 0]
|
||||
},
|
||||
"torso": {
|
||||
"rotation": [-5, 0, 0]
|
||||
},
|
||||
"head_angle": {
|
||||
"rotation": [5, 10, 0]
|
||||
},
|
||||
"mouth": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"nose": {
|
||||
"rotation": [-10, 0, 0]
|
||||
},
|
||||
"tail": {
|
||||
"rotation": [27.5, -30, 0]
|
||||
},
|
||||
"tail2": {
|
||||
"rotation": [27.5, 0, 0]
|
||||
},
|
||||
"tongue": {
|
||||
"rotation": [-10, -32.5, 0]
|
||||
},
|
||||
"tongue_2": {
|
||||
"rotation": [-42.79487, -18.88952, 16.68541]
|
||||
},
|
||||
"tongue_3": {
|
||||
"rotation": [-38.85707, -12.27659, 12.56853]
|
||||
},
|
||||
"tongue_4": {
|
||||
"rotation": [-25, 0, 0]
|
||||
},
|
||||
"tongue_5": {
|
||||
"rotation": [-10.82756, 27.88369, 21.32202]
|
||||
},
|
||||
"tongue_6": {
|
||||
"rotation": [-10, 42.5, 0]
|
||||
},
|
||||
"tongue_7": {
|
||||
"rotation": [-30.86748, 12.95254, -7.63074]
|
||||
},
|
||||
"mouth_open": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"tongue_8": {
|
||||
"rotation": [-15, 0, 0]
|
||||
},
|
||||
"tongue_9": {
|
||||
"rotation": [-22.5, 0, 0]
|
||||
},
|
||||
"tongue_12": {
|
||||
"rotation": [40, 0, 0]
|
||||
},
|
||||
"tongue_11": {
|
||||
"rotation": [37.5, 0, 0]
|
||||
},
|
||||
"tongue_10": {
|
||||
"rotation": [-15, 0, 0]
|
||||
},
|
||||
"shine_left": {
|
||||
"position": [-0.25, 0, 0]
|
||||
},
|
||||
"shine_right": {
|
||||
"position": [-0.25, 0, 0]
|
||||
},
|
||||
"pupil_left": {
|
||||
"position": [-0.25, 0, 0]
|
||||
},
|
||||
"pupil_right": {
|
||||
"position": [-0.25, 0, 0]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+341
@@ -0,0 +1,341 @@
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"animations": {
|
||||
"animation.seismitoad.ground_idle": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"body": {
|
||||
"position": [0, -3.2, 0]
|
||||
},
|
||||
"torso": {
|
||||
"rotation": [2.5, 0, 0]
|
||||
},
|
||||
"shoulder_left": {
|
||||
"rotation": [34.3569, -7.1313, 32.7929]
|
||||
},
|
||||
"arm_left": {
|
||||
"rotation": [0, 27.5, 5]
|
||||
},
|
||||
"elbow_left": {
|
||||
"rotation": [-15, 22.5, 0]
|
||||
},
|
||||
"hand_left": {
|
||||
"rotation": [0, 0, 22.5]
|
||||
},
|
||||
"leg_left": {
|
||||
"rotation": [-45, -20, -10],
|
||||
"position": [-1, 0, 0]
|
||||
},
|
||||
"knee_left": {
|
||||
"rotation": [60, -10, 10]
|
||||
},
|
||||
"foot_left": {
|
||||
"rotation": [-12, 0, -5]
|
||||
},
|
||||
"wart_knee_left": {
|
||||
"rotation": [22.5, 0, 7.5]
|
||||
},
|
||||
"neck_rotation": {
|
||||
"rotation": [2.5, 0, 0]
|
||||
},
|
||||
"head": {
|
||||
"rotation": [-90, 0, 0]
|
||||
},
|
||||
"finger_middle_left2": {
|
||||
"rotation": [0, 0, 15]
|
||||
},
|
||||
"finger_front_left": {
|
||||
"rotation": [0, 0, 7.5]
|
||||
},
|
||||
"finger_front_left2": {
|
||||
"rotation": [0, 0, 15]
|
||||
},
|
||||
"finger_back_left": {
|
||||
"rotation": [0, 0, 7.5]
|
||||
},
|
||||
"finger_back_left2": {
|
||||
"rotation": [0, 0, 15]
|
||||
},
|
||||
"shoulder_right": {
|
||||
"rotation": [34.3569, 7.1313, -32.7929]
|
||||
},
|
||||
"arm_right": {
|
||||
"rotation": [0, -27.5, -5]
|
||||
},
|
||||
"elbow_right": {
|
||||
"rotation": [-15, -22.5, 0]
|
||||
},
|
||||
"hand_right": {
|
||||
"rotation": [0, 0, -22.5]
|
||||
},
|
||||
"finger_middle_right2": {
|
||||
"rotation": [0, 0, -15]
|
||||
},
|
||||
"finger_front_right": {
|
||||
"rotation": [0, 0, -7.5]
|
||||
},
|
||||
"finger_front_right2": {
|
||||
"rotation": [0, 0, -15]
|
||||
},
|
||||
"finger_back_right": {
|
||||
"rotation": [0, 0, -7.5]
|
||||
},
|
||||
"finger_back_right2": {
|
||||
"rotation": [0, 0, -15]
|
||||
},
|
||||
"toe_back_left2": {
|
||||
"rotation": [-10, 0, 0]
|
||||
},
|
||||
"toe_out_left2": {
|
||||
"rotation": [7.5, 0, 0]
|
||||
},
|
||||
"toe_in_left2": {
|
||||
"rotation": [7.5, 0, 0]
|
||||
},
|
||||
"leg_right": {
|
||||
"rotation": [-45, 20, 10],
|
||||
"position": [1, 0, 0]
|
||||
},
|
||||
"knee_right": {
|
||||
"rotation": [60, 10, -10]
|
||||
},
|
||||
"foot_right": {
|
||||
"rotation": [-12, 0, 5]
|
||||
},
|
||||
"toe_out_right2": {
|
||||
"rotation": [7.5, 0, 0]
|
||||
},
|
||||
"toe_in_right2": {
|
||||
"rotation": [7.5, 0, 0]
|
||||
},
|
||||
"toe_back_right2": {
|
||||
"rotation": [-10, 0, 0]
|
||||
},
|
||||
"wart_knee_right": {
|
||||
"rotation": [22.5, 0, -7.5]
|
||||
},
|
||||
"neck": {
|
||||
"rotation": [-45, 0, 0]
|
||||
},
|
||||
"tongue": {
|
||||
"position": [0, -0.25, 3]
|
||||
},
|
||||
"tongue2": {
|
||||
"position": [0, 0, 5]
|
||||
},
|
||||
"tongue3": {
|
||||
"position": [0, 0, 5]
|
||||
},
|
||||
"tongue4": {
|
||||
"position": [0, 0, 5]
|
||||
},
|
||||
"tongue5": {
|
||||
"position": [0, 0, 5]
|
||||
},
|
||||
"tongue_tip": {
|
||||
"position": [0, -1, 3]
|
||||
},
|
||||
"head_angle": {
|
||||
"rotation": [90, 0, 0]
|
||||
},
|
||||
"neck_angle": {
|
||||
"rotation": [45, 0, 0]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.seismitoad.blink": {
|
||||
"animation_length": 0.2917,
|
||||
"bones": {
|
||||
"eye_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0],
|
||||
"0.0833": {"pre": [0, 0, 0], "post": [0, 0, 0.1]},
|
||||
"0.2917": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eye_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.2083": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyelid_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0],
|
||||
"0.0833": {"pre": [0, 0, 0], "post": [0, 0, -0.1]},
|
||||
"0.2917": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyelid_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.2083": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyes_ditto": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.2083": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyes_blink_ditto": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.2083": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.seismitoad.ditto_face": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"face": {
|
||||
"scale": 0
|
||||
},
|
||||
"face_ditto": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"tongue": {
|
||||
"scale": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.seismitoad.pose": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"body": {
|
||||
"rotation": [0, -30, 0],
|
||||
"position": [0, -2.25, 0]
|
||||
},
|
||||
"torso": {
|
||||
"rotation": [17.5, 0, 0]
|
||||
},
|
||||
"jaw": {
|
||||
"rotation": [42.5, 0, 0]
|
||||
},
|
||||
"shoulder_left": {
|
||||
"rotation": [-5, -7.5, 25]
|
||||
},
|
||||
"arm_left": {
|
||||
"rotation": [0, 5, 0]
|
||||
},
|
||||
"elbow_left": {
|
||||
"rotation": [-12.5, 50, 0]
|
||||
},
|
||||
"finger_middle_left": {
|
||||
"rotation": [0, 0, 7.5]
|
||||
},
|
||||
"leg_left": {
|
||||
"rotation": [-40.6299, -29.1905, -7.6552]
|
||||
},
|
||||
"knee_left": {
|
||||
"rotation": [37.5, 0, 0]
|
||||
},
|
||||
"foot_left": {
|
||||
"rotation": [6.4717, -0.6518, 4.9574]
|
||||
},
|
||||
"head": {
|
||||
"rotation": [-22.0182, -4.7511, -24.0751]
|
||||
},
|
||||
"finger_middle_left2": {
|
||||
"rotation": [0, 0, 20]
|
||||
},
|
||||
"finger_front_left2": {
|
||||
"rotation": [0, 0, 15]
|
||||
},
|
||||
"finger_back_left": {
|
||||
"rotation": [0, 0, 27.5]
|
||||
},
|
||||
"finger_back_left2": {
|
||||
"rotation": [0, 0, 40]
|
||||
},
|
||||
"shoulder_right": {
|
||||
"rotation": [0, 0, -22.5]
|
||||
},
|
||||
"arm_right": {
|
||||
"rotation": [0, -12.5, 0]
|
||||
},
|
||||
"elbow_right": {
|
||||
"rotation": [173.5473, -44.2356, -288.0659]
|
||||
},
|
||||
"hand_right": {
|
||||
"rotation": [0, 0, -15]
|
||||
},
|
||||
"finger_middle_right": {
|
||||
"rotation": [0, 0, -15]
|
||||
},
|
||||
"finger_middle_right2": {
|
||||
"rotation": [0, 0, -5]
|
||||
},
|
||||
"finger_front_right": {
|
||||
"rotation": [20.5765, 31.8072, -73.3068],
|
||||
"position": [0, 0, -0.5]
|
||||
},
|
||||
"finger_front_right2": {
|
||||
"rotation": [0, 0, -50]
|
||||
},
|
||||
"finger_back_right": {
|
||||
"rotation": [-19.2568, -34.3655, -80.4799],
|
||||
"position": [0, 0, 0.5]
|
||||
},
|
||||
"finger_back_right2": {
|
||||
"rotation": [0, 0, -50]
|
||||
},
|
||||
"toe_back_left2": {
|
||||
"rotation": [-10, 0, 0]
|
||||
},
|
||||
"toe_out_left2": {
|
||||
"rotation": [7.5, 0, 0]
|
||||
},
|
||||
"toe_in_left2": {
|
||||
"rotation": [7.5, 0, 0]
|
||||
},
|
||||
"leg_right": {
|
||||
"rotation": [-38.922, 39.0907, 8.6174]
|
||||
},
|
||||
"knee_right": {
|
||||
"rotation": [37.5, 0, 0]
|
||||
},
|
||||
"foot_right": {
|
||||
"rotation": [7.4593, 0.7817, -5.949]
|
||||
},
|
||||
"toe_out_right2": {
|
||||
"rotation": [7.5, 0, 0]
|
||||
},
|
||||
"toe_in_right2": {
|
||||
"rotation": [7.5, 0, 0]
|
||||
},
|
||||
"toe_back_right2": {
|
||||
"rotation": [-10, 0, 0]
|
||||
},
|
||||
"pupil_right": {
|
||||
"position": [-0.25, 0, 0]
|
||||
},
|
||||
"pupil_left": {
|
||||
"position": [-0.25, 0, 0]
|
||||
},
|
||||
"neck": {
|
||||
"rotation": [0, -4, 0]
|
||||
},
|
||||
"tongue": {
|
||||
"rotation": [-25, 0, 0]
|
||||
},
|
||||
"tongue2": {
|
||||
"rotation": [-10, 25, 0]
|
||||
},
|
||||
"tongue3": {
|
||||
"rotation": [-5, 32.5, 0]
|
||||
},
|
||||
"tongue4": {
|
||||
"rotation": [-5, 45, 0]
|
||||
},
|
||||
"tongue5": {
|
||||
"rotation": [-22.99, 11.5348, -4.8492]
|
||||
},
|
||||
"tongue_tip": {
|
||||
"rotation": [-25.3376, 9.0548, -4.2618]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+105
@@ -0,0 +1,105 @@
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"animations": {
|
||||
"animation.deerling.ground_idle": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"body": {
|
||||
"position": [0, -0.1, 0]
|
||||
},
|
||||
"torso": {
|
||||
"rotation": [5, 0, 0]
|
||||
},
|
||||
"torso2": {
|
||||
"rotation": [-5, 0, 0]
|
||||
},
|
||||
"neck": {
|
||||
"rotation": [7.5, 0, 0]
|
||||
},
|
||||
"ear_left2": {
|
||||
"rotation": [0, 0, 7.5]
|
||||
},
|
||||
"ear_right2": {
|
||||
"rotation": [0, 0, -7.5]
|
||||
},
|
||||
"tail": {
|
||||
"rotation": [5, 0, 0]
|
||||
},
|
||||
"leg_front_left": {
|
||||
"rotation": [2.5, 0, 0]
|
||||
},
|
||||
"foot_front_left": {
|
||||
"rotation": [-2.5, 0, 0]
|
||||
},
|
||||
"leg_back_left": {
|
||||
"rotation": [2.5, 0, -2.5]
|
||||
},
|
||||
"leg_back_left2": {
|
||||
"rotation": [-2.5, 0, 0]
|
||||
},
|
||||
"foot_back_left": {
|
||||
"rotation": [0, 0, 2.5]
|
||||
},
|
||||
"leg_front_right": {
|
||||
"rotation": [2.5, 0, 0]
|
||||
},
|
||||
"foot_front_right": {
|
||||
"rotation": [-2.5, 0, 0]
|
||||
},
|
||||
"leg_back_right": {
|
||||
"rotation": [2.5, 0, 2.5]
|
||||
},
|
||||
"leg_back_right2": {
|
||||
"rotation": [-2.5, 0, 0]
|
||||
},
|
||||
"foot_back_right": {
|
||||
"rotation": [0, 0, -2.5]
|
||||
},
|
||||
"head": {
|
||||
"rotation": [-7.5, 0, 0]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.deerling.blink": {
|
||||
"animation_length": 0.1667,
|
||||
"bones": {
|
||||
"eyelid_left": {
|
||||
"position": {
|
||||
"0.0": [0.1, 0, -0.1],
|
||||
"0.1667": {"pre": [0.1, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eye_left": {
|
||||
"position": {
|
||||
"0.0": [-0.1, 0, 0.1],
|
||||
"0.1667": {"pre": [-0.1, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eye_right": {
|
||||
"position": {
|
||||
"0.0": [0.1, 0, 0.1],
|
||||
"0.1667": {"pre": [0.1, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyelid_right": {
|
||||
"position": {
|
||||
"0.0": [-0.1, 0, -0.1],
|
||||
"0.1667": {"pre": [-0.1, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyes_ditto": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyes_blink_ditto": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"animations": {
|
||||
"animation.sawsbuck_autumn.ground_idle": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"body": {
|
||||
"position": [0, -0.4, 0]
|
||||
},
|
||||
"head": {
|
||||
"rotation": [-3, 0, 0]
|
||||
},
|
||||
"leg_front_left": {
|
||||
"rotation": [0, -3, -2]
|
||||
},
|
||||
"leg_front_left2": {
|
||||
"rotation": [0, 0, 0]
|
||||
},
|
||||
"leg_front_left3": {
|
||||
"rotation": [2.5, 0, 0]
|
||||
},
|
||||
"foot_front_left": {
|
||||
"rotation": [-0.5, 0, 2]
|
||||
},
|
||||
"leg_back_left": {
|
||||
"rotation": [-5, -3, -2]
|
||||
},
|
||||
"leg_back_left2": {
|
||||
"rotation": [3, 0, 0]
|
||||
},
|
||||
"leg_back_left3": {
|
||||
"rotation": [-5, 0, 0]
|
||||
},
|
||||
"foot_back_left": {
|
||||
"rotation": [7, -1, 2]
|
||||
},
|
||||
"leg_front_right": {
|
||||
"rotation": [0, 3, 2]
|
||||
},
|
||||
"leg_front_right2": {
|
||||
"rotation": [0, 0, 0]
|
||||
},
|
||||
"leg_front_right3": {
|
||||
"rotation": [2.5, 0, 0]
|
||||
},
|
||||
"foot_front_right": {
|
||||
"rotation": [-0.5, 0, -2]
|
||||
},
|
||||
"leg_back_right": {
|
||||
"rotation": [-5, 3, 2]
|
||||
},
|
||||
"leg_back_right2": {
|
||||
"rotation": [3, 0, 0]
|
||||
},
|
||||
"leg_back_right3": {
|
||||
"rotation": [-5, 0, 0]
|
||||
},
|
||||
"foot_back_right": {
|
||||
"rotation": [7, 1, -2]
|
||||
},
|
||||
"ear_left": {
|
||||
"rotation": [0, 0, -10]
|
||||
},
|
||||
"ear_right": {
|
||||
"rotation": [0, 0, 10]
|
||||
},
|
||||
"tail1": {
|
||||
"rotation": [-3, 0, 0]
|
||||
},
|
||||
"tail2": {
|
||||
"rotation": [-5, 0, 0]
|
||||
},
|
||||
"torso": {
|
||||
"rotation": [5, 0, 0]
|
||||
},
|
||||
"torso2": {
|
||||
"rotation": [-5, 0, 0]
|
||||
},
|
||||
"neck": {
|
||||
"rotation": [-5, 0, 0]
|
||||
},
|
||||
"ftorso2": {
|
||||
"rotation": [-2.5, 0, 0]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.sawsbuck_autumn.blink": {
|
||||
"animation_length": 0.1667,
|
||||
"bones": {
|
||||
"eyelid_left": {
|
||||
"position": {
|
||||
"0.0": [0.1, -0.1, 0],
|
||||
"0.1667": {"pre": [0.1, -0.1, 0], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyelid_right": {
|
||||
"position": {
|
||||
"0.0": [-0.1, -0.1, 0],
|
||||
"0.1667": {"pre": [-0.1, -0.1, 0], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eye_left": {
|
||||
"position": {
|
||||
"0.0": [-0.1, 0.1, 0],
|
||||
"0.1667": {"pre": [-0.1, 0.1, 0], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyebrow_left": {
|
||||
"position": {
|
||||
"0.0": [-0.1, 0.1, 0],
|
||||
"0.1667": {"pre": [-0.1, 0.1, 0], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eye_right": {
|
||||
"position": {
|
||||
"0.0": [0.1, 0.1, 0],
|
||||
"0.1667": {"pre": [0.1, 0.1, 0], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyebrow_right": {
|
||||
"position": {
|
||||
"0.0": [0.1, 0.1, 0],
|
||||
"0.1667": {"pre": [0.1, 0.1, 0], "post": [0, 0, 0]}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"animations": {
|
||||
"animation.sawsbuck_spring.ground_idle": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"body": {
|
||||
"position": [0, -0.4, 0]
|
||||
},
|
||||
"head": {
|
||||
"rotation": [-3, 0, 0]
|
||||
},
|
||||
"leg_front_left": {
|
||||
"rotation": [0, -3, -2]
|
||||
},
|
||||
"leg_front_left2": {
|
||||
"rotation": [0, 0, 0]
|
||||
},
|
||||
"leg_front_left3": {
|
||||
"rotation": [2.5, 0, 0]
|
||||
},
|
||||
"foot_front_left": {
|
||||
"rotation": [-0.5, 0, 2]
|
||||
},
|
||||
"leg_back_left": {
|
||||
"rotation": [-5, -3, -2]
|
||||
},
|
||||
"leg_back_left2": {
|
||||
"rotation": [3, 0, 0]
|
||||
},
|
||||
"leg_back_left3": {
|
||||
"rotation": [-5, 0, 0]
|
||||
},
|
||||
"foot_back_left": {
|
||||
"rotation": [7, -1, 2]
|
||||
},
|
||||
"leg_front_right": {
|
||||
"rotation": [0, 3, 2]
|
||||
},
|
||||
"leg_front_right2": {
|
||||
"rotation": [0, 0, 0]
|
||||
},
|
||||
"leg_front_right3": {
|
||||
"rotation": [2.5, 0, 0]
|
||||
},
|
||||
"foot_front_right": {
|
||||
"rotation": [-0.5, 0, -2]
|
||||
},
|
||||
"leg_back_right": {
|
||||
"rotation": [-5, 3, 2]
|
||||
},
|
||||
"leg_back_right2": {
|
||||
"rotation": [3, 0, 0]
|
||||
},
|
||||
"leg_back_right3": {
|
||||
"rotation": [-5, 0, 0]
|
||||
},
|
||||
"foot_back_right": {
|
||||
"rotation": [7, 1, -2]
|
||||
},
|
||||
"ear_left": {
|
||||
"rotation": [0, 0, -10]
|
||||
},
|
||||
"ear_right": {
|
||||
"rotation": [0, 0, 10]
|
||||
},
|
||||
"tail1": {
|
||||
"rotation": [-3, 0, 0]
|
||||
},
|
||||
"tail2": {
|
||||
"rotation": [-5, 0, 0]
|
||||
},
|
||||
"torso": {
|
||||
"rotation": [5, 0, 0]
|
||||
},
|
||||
"torso2": {
|
||||
"rotation": [-5, 0, 0]
|
||||
},
|
||||
"neck": {
|
||||
"rotation": [-5, 0, 0]
|
||||
},
|
||||
"ftorso2": {
|
||||
"rotation": [-2.5, 0, 0]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.sawsbuck_spring.blink": {
|
||||
"animation_length": 0.1667,
|
||||
"bones": {
|
||||
"eyelid_left": {
|
||||
"position": {
|
||||
"0.0": [0.1, -0.1, 0],
|
||||
"0.1667": {"pre": [0.1, -0.1, 0], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyelid_right": {
|
||||
"position": {
|
||||
"0.0": [-0.1, -0.1, 0],
|
||||
"0.1667": {"pre": [-0.1, -0.1, 0], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eye_left": {
|
||||
"position": {
|
||||
"0.0": [-0.1, 0.1, 0],
|
||||
"0.1667": {"pre": [-0.1, 0.1, 0], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyebrow_left": {
|
||||
"position": {
|
||||
"0.0": [-0.1, 0.1, 0],
|
||||
"0.1667": {"pre": [-0.1, 0.1, 0], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eye_right": {
|
||||
"position": {
|
||||
"0.0": [0.1, 0.1, 0],
|
||||
"0.1667": {"pre": [0.1, 0.1, 0], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyebrow_right": {
|
||||
"position": {
|
||||
"0.0": [0.1, 0.1, 0],
|
||||
"0.1667": {"pre": [0.1, 0.1, 0], "post": [0, 0, 0]}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+141
@@ -0,0 +1,141 @@
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"animations": {
|
||||
"animation.sawsbuck_summer.ground_idle": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"body": {
|
||||
"position": [0, -0.4, 0]
|
||||
},
|
||||
"head": {
|
||||
"rotation": [-3, 0, 0]
|
||||
},
|
||||
"leg_front_left": {
|
||||
"rotation": [0, -3, -2]
|
||||
},
|
||||
"leg_front_left2": {
|
||||
"rotation": [0, 0, 0]
|
||||
},
|
||||
"leg_front_left3": {
|
||||
"rotation": [2.5, 0, 0]
|
||||
},
|
||||
"foot_front_left": {
|
||||
"rotation": [-0.5, 0, 2]
|
||||
},
|
||||
"leg_back_left": {
|
||||
"rotation": [-5, -3, -2]
|
||||
},
|
||||
"leg_back_left2": {
|
||||
"rotation": [3, 0, 0]
|
||||
},
|
||||
"leg_back_left3": {
|
||||
"rotation": [-5, 0, 0]
|
||||
},
|
||||
"foot_back_left": {
|
||||
"rotation": [7, -1, 2]
|
||||
},
|
||||
"leg_front_right": {
|
||||
"rotation": [0, 3, 2]
|
||||
},
|
||||
"leg_front_right2": {
|
||||
"rotation": [0, 0, 0]
|
||||
},
|
||||
"leg_front_right3": {
|
||||
"rotation": [2.5, 0, 0]
|
||||
},
|
||||
"foot_front_right": {
|
||||
"rotation": [-0.5, 0, -2]
|
||||
},
|
||||
"leg_back_right": {
|
||||
"rotation": [-5, 3, 2]
|
||||
},
|
||||
"leg_back_right2": {
|
||||
"rotation": [3, 0, 0]
|
||||
},
|
||||
"leg_back_right3": {
|
||||
"rotation": [-5, 0, 0]
|
||||
},
|
||||
"foot_back_right": {
|
||||
"rotation": [7, 1, -2]
|
||||
},
|
||||
"ear_left": {
|
||||
"rotation": [0, 0, -10]
|
||||
},
|
||||
"ear_right": {
|
||||
"rotation": [0, 0, 10]
|
||||
},
|
||||
"tail1": {
|
||||
"rotation": [-3, 0, 0]
|
||||
},
|
||||
"tail2": {
|
||||
"rotation": [-5, 0, 0]
|
||||
},
|
||||
"torso": {
|
||||
"rotation": [5, 0, 0]
|
||||
},
|
||||
"torso2": {
|
||||
"rotation": [-5, 0, 0]
|
||||
},
|
||||
"neck": {
|
||||
"rotation": [-5, 0, 0]
|
||||
},
|
||||
"ftorso2": {
|
||||
"rotation": [-2.5, 0, 0]
|
||||
},
|
||||
"bush_left3_summer": {
|
||||
"rotation": [0, 0, -5]
|
||||
},
|
||||
"bush_left4_summer": {
|
||||
"rotation": [0, 0, -7.5]
|
||||
},
|
||||
"bush_right3_summer": {
|
||||
"rotation": [0, 0, 5]
|
||||
},
|
||||
"bush_right4_summer": {
|
||||
"rotation": [0, 0, 7.5]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.sawsbuck_summer.blink": {
|
||||
"animation_length": 0.1667,
|
||||
"bones": {
|
||||
"eyelid_left": {
|
||||
"position": {
|
||||
"0.0": [0.1, -0.1, 0],
|
||||
"0.1667": {"pre": [0.1, -0.1, 0], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyelid_right": {
|
||||
"position": {
|
||||
"0.0": [-0.1, -0.1, 0],
|
||||
"0.1667": {"pre": [-0.1, -0.1, 0], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eye_left": {
|
||||
"position": {
|
||||
"0.0": [-0.1, 0.1, 0],
|
||||
"0.1667": {"pre": [-0.1, 0.1, 0], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyebrow_left": {
|
||||
"position": {
|
||||
"0.0": [-0.1, 0.1, 0],
|
||||
"0.1667": {"pre": [-0.1, 0.1, 0], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eye_right": {
|
||||
"position": {
|
||||
"0.0": [0.1, 0.1, 0],
|
||||
"0.1667": {"pre": [0.1, 0.1, 0], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyebrow_right": {
|
||||
"position": {
|
||||
"0.0": [0.1, 0.1, 0],
|
||||
"0.1667": {"pre": [0.1, 0.1, 0], "post": [0, 0, 0]}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+141
@@ -0,0 +1,141 @@
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"animations": {
|
||||
"animation.sawsbuck_winter.ground_idle": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"body": {
|
||||
"position": [0, -0.4, 0]
|
||||
},
|
||||
"head": {
|
||||
"rotation": [-3, 0, 0]
|
||||
},
|
||||
"leg_front_left": {
|
||||
"rotation": [0, -3, -2]
|
||||
},
|
||||
"leg_front_left2": {
|
||||
"rotation": [0, 0, 0]
|
||||
},
|
||||
"leg_front_left3": {
|
||||
"rotation": [2.5, 0, 0]
|
||||
},
|
||||
"foot_front_left": {
|
||||
"rotation": [-0.5, 0, 2]
|
||||
},
|
||||
"leg_back_left": {
|
||||
"rotation": [-5, -3, -2]
|
||||
},
|
||||
"leg_back_left2": {
|
||||
"rotation": [3, 0, 0]
|
||||
},
|
||||
"leg_back_left3": {
|
||||
"rotation": [-5, 0, 0]
|
||||
},
|
||||
"foot_back_left": {
|
||||
"rotation": [7, -1, 2]
|
||||
},
|
||||
"leg_front_right": {
|
||||
"rotation": [0, 3, 2]
|
||||
},
|
||||
"leg_front_right2": {
|
||||
"rotation": [0, 0, 0]
|
||||
},
|
||||
"leg_front_right3": {
|
||||
"rotation": [2.5, 0, 0]
|
||||
},
|
||||
"foot_front_right": {
|
||||
"rotation": [-0.5, 0, -2]
|
||||
},
|
||||
"leg_back_right": {
|
||||
"rotation": [-5, 3, 2]
|
||||
},
|
||||
"leg_back_right2": {
|
||||
"rotation": [3, 0, 0]
|
||||
},
|
||||
"leg_back_right3": {
|
||||
"rotation": [-5, 0, 0]
|
||||
},
|
||||
"foot_back_right": {
|
||||
"rotation": [7, 1, -2]
|
||||
},
|
||||
"ear_left": {
|
||||
"rotation": [0, 0, -10]
|
||||
},
|
||||
"ear_right": {
|
||||
"rotation": [0, 0, 10]
|
||||
},
|
||||
"tail1": {
|
||||
"rotation": [-3, 0, 0]
|
||||
},
|
||||
"tail2": {
|
||||
"rotation": [-5, 0, 0]
|
||||
},
|
||||
"torso": {
|
||||
"rotation": [5, 0, 0]
|
||||
},
|
||||
"torso2": {
|
||||
"rotation": [-5, 0, 0]
|
||||
},
|
||||
"neck": {
|
||||
"rotation": [-5, 0, 0]
|
||||
},
|
||||
"ftorso2": {
|
||||
"rotation": [-2.5, 0, 0]
|
||||
},
|
||||
"bush_left3_summer": {
|
||||
"rotation": [0, 0, -5]
|
||||
},
|
||||
"bush_left4_summer": {
|
||||
"rotation": [0, 0, -7.5]
|
||||
},
|
||||
"bush_right3_summer": {
|
||||
"rotation": [0, 0, 5]
|
||||
},
|
||||
"bush_right4_summer": {
|
||||
"rotation": [0, 0, 7.5]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.sawsbuck_winter.blink": {
|
||||
"animation_length": 0.1667,
|
||||
"bones": {
|
||||
"eyelid_left": {
|
||||
"position": {
|
||||
"0.0": [0.1, -0.1, 0],
|
||||
"0.1667": {"pre": [0.1, -0.1, 0], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyelid_right": {
|
||||
"position": {
|
||||
"0.0": [-0.1, -0.1, 0],
|
||||
"0.1667": {"pre": [-0.1, -0.1, 0], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eye_left": {
|
||||
"position": {
|
||||
"0.0": [-0.1, 0.1, 0],
|
||||
"0.1667": {"pre": [-0.1, 0.1, 0], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyebrow_left": {
|
||||
"position": {
|
||||
"0.0": [-0.1, 0.1, 0],
|
||||
"0.1667": {"pre": [-0.1, 0.1, 0], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eye_right": {
|
||||
"position": {
|
||||
"0.0": [0.1, 0.1, 0],
|
||||
"0.1667": {"pre": [0.1, 0.1, 0], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyebrow_right": {
|
||||
"position": {
|
||||
"0.0": [0.1, 0.1, 0],
|
||||
"0.1667": {"pre": [0.1, 0.1, 0], "post": [0, 0, 0]}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+155
-120
@@ -5,105 +5,103 @@
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"neck_left": {
|
||||
"rotation": [0, 0, 17.5]
|
||||
"rotation": [17.5, 0, 17.5]
|
||||
},
|
||||
"neck_left2": {
|
||||
"rotation": [-7.28217, -2.57594, -9.6658],
|
||||
"position": [0, 0, 0.1]
|
||||
"rotation": [-7.28217, -2.57594, -9.6658]
|
||||
},
|
||||
"neck_left3": {
|
||||
"rotation": [-2.5, 0, -12.5]
|
||||
"rotation": [-2.4786, 0.3262, -5.0071]
|
||||
},
|
||||
"head_left": {
|
||||
"rotation": [-5, 0, 10]
|
||||
},
|
||||
"claw_inner_left": {
|
||||
"inner_claw_left": {
|
||||
"rotation": [0, 0, -12.5]
|
||||
},
|
||||
"claw_outer_left": {
|
||||
"outer_claw_left": {
|
||||
"rotation": [0, 0, 12.5]
|
||||
},
|
||||
"neck_right": {
|
||||
"rotation": [0, 0, -25],
|
||||
"position": [0, 0, 0]
|
||||
"rotation": [7.5, 0, -17.5],
|
||||
"position": [0, -2.5, 0]
|
||||
},
|
||||
"neck_right2": {
|
||||
"rotation": [-5, 0, 17.5],
|
||||
"position": [-0.75, -2, 0]
|
||||
"rotation": [12.5, 0, 0]
|
||||
},
|
||||
"neck_right3": {
|
||||
"rotation": [-5, 0, 12.5],
|
||||
"position": [0, -0.75, 0]
|
||||
"rotation": [-2.5, 0, 10]
|
||||
},
|
||||
"head_right": {
|
||||
"rotation": [-7.43656, -0.9762, -12.43656]
|
||||
},
|
||||
"claw_inner_right": {
|
||||
"inner_claw_right": {
|
||||
"rotation": [0, 0, 12.5]
|
||||
},
|
||||
"claw_outer_right": {
|
||||
"outer_claw_right": {
|
||||
"rotation": [0, 0, -12.5]
|
||||
},
|
||||
"head_angle_left": {
|
||||
"rotation": [0, 0, -7.5]
|
||||
},
|
||||
"head_angle_right": {
|
||||
"rotation": [2.5, 0, 20]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.binacle.blink": {
|
||||
"animation_length": 0.1667,
|
||||
"bones": {
|
||||
"eye_open_inner_left": {
|
||||
"pupil_outer_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.125": {"pre": [0, 0, 0.1], "post": [0, 0, 0.1]},
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eye_open_outer_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.125": {"pre": [0, 0, 0.1], "post": [0, 0, 0.1]},
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyelid_inner_left": {
|
||||
"pupil_outer_closed_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.125": {"pre": [0, 0, -0.1], "post": [0, 0, -0.1]},
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyelid_outer_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.125": {"pre": [0, 0, -0.1], "post": [0, 0, -0.1]},
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.binacle.blink2": {
|
||||
"animation_length": 0.1667,
|
||||
"bones": {
|
||||
"eye_open_inner_right": {
|
||||
"pupil_inner_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.125": {"pre": [0, 0, 0.1], "post": [0, 0, 0.1]},
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyelid_inner_right": {
|
||||
"pupil_inner_closed_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.125": {"pre": [0, 0, -0.1], "post": [0, 0, -0.1]},
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eye_open_outer_right": {
|
||||
"pupil_outer_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.125": {"pre": [0, 0, 0.1], "post": [0, 0, 0.1]},
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyelid_outer_right": {
|
||||
"pupil_outer_closed_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.125": {"pre": [0, 0, -0.1], "post": [0, 0, -0.1]},
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"pupil_inner_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.125": {"pre": [0, 0, 0.1], "post": [0, 0, 0.1]},
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"pupil_inner_closed_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.125": {"pre": [0, 0, -0.1], "post": [0, 0, -0.1]},
|
||||
@@ -115,16 +113,9 @@
|
||||
"animation.binacle.shock": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"eyebrow_inner_left": {
|
||||
"position": [0, 0.35, 0]
|
||||
},
|
||||
"eye_open_inner_left": {
|
||||
"position": [-0.25, -0.1, 0],
|
||||
"scale": [0.7, 0.7, 1]
|
||||
},
|
||||
"eye_open_outer_left": {
|
||||
"position": [0.25, -0.1, 0],
|
||||
"scale": [0.7, 0.7, 1]
|
||||
"pupil_outer_left": {
|
||||
"position": [0.15, 0, 0],
|
||||
"scale": [0.6, 0.6, 1]
|
||||
},
|
||||
"mouth_closed_left": {
|
||||
"position": [0, 0, 0.1]
|
||||
@@ -132,96 +123,69 @@
|
||||
"mouth_open_left": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"eye_open_inner_right": {
|
||||
"position": [0.25, -0.1, 0],
|
||||
"scale": [0.7, 0.7, 1]
|
||||
},
|
||||
"eye_open_outer_right": {
|
||||
"position": [-0.25, -0.1, 0],
|
||||
"scale": [0.7, 0.7, 1]
|
||||
},
|
||||
"eyebrow_inner_right": {
|
||||
"position": [0, 0.35, 0]
|
||||
},
|
||||
"mouth_closed_right": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"mouth_open_right": {
|
||||
"position": [0, 0, -0.1]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.binacle.angry": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"eyebrow_inner_left": {
|
||||
"position": [0, -0.15, 0]
|
||||
},
|
||||
"eyebrow_inner_right": {
|
||||
"position": [0, -0.15, 0]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.binacle.sad": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"eyebrow_left": {
|
||||
"position": [0, 0, 0]
|
||||
"pupil_inner_left": {
|
||||
"position": [-0.05, 0, 0],
|
||||
"scale": [0.6, 0.6, 1]
|
||||
},
|
||||
"eyebrow_inner_left": {
|
||||
"position": [0, 0.6, 0]
|
||||
"pupil_outer_right": {
|
||||
"position": [-0.15, 0, 0],
|
||||
"scale": [0.6, 0.6, 1]
|
||||
},
|
||||
"eyebrow_right": {
|
||||
"position": [0, 0, 0]
|
||||
},
|
||||
"eyebrow_inner_right": {
|
||||
"position": [0, 0.6, 0]
|
||||
"pupil_inner_right": {
|
||||
"position": [0.05, 0, 0],
|
||||
"scale": [0.6, 0.6, 1]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.binacle.happy": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"eyebrow_inner_left": {
|
||||
"position": [0, 0.35, 0]
|
||||
},
|
||||
"eye_open_inner_left": {
|
||||
"pupil_outer_left": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"eyelid_happy_inner_left": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"eye_open_outer_left": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"eyelid_happy_outer_left": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"mouth_closed_left": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"mouth_open_left": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"eye_open_inner_right": {
|
||||
"position": [0, 0, 0.1]
|
||||
"pupil_outer_closed_left": {
|
||||
"position": [0, 0.3, -0.1]
|
||||
},
|
||||
"eyelid_happy_inner_right": {
|
||||
"pupil_outer_detail_left": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"eye_open_outer_right": {
|
||||
"pupil_inner_left": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"eyelid_happy_outer_right": {
|
||||
"pupil_inner_closed_left": {
|
||||
"position": [0, 0.3, -0.1]
|
||||
},
|
||||
"pupil_inner_detail_left": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"eyebrow_inner_right": {
|
||||
"position": [0, 0.35, 0]
|
||||
},
|
||||
"mouth_closed_right": {
|
||||
"pupil_outer_right": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"mouth_open_right": {
|
||||
"pupil_outer_closed_right": {
|
||||
"position": [0, 0.3, -0.1]
|
||||
},
|
||||
"pupil_outer_detail_right": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"pupil_inner_right": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"pupil_inner_closed_right": {
|
||||
"position": [0, 0.3, -0.1]
|
||||
},
|
||||
"pupil_inner_detail_right": {
|
||||
"position": [0, 0, -0.1]
|
||||
}
|
||||
}
|
||||
@@ -229,33 +193,104 @@
|
||||
"animation.binacle.hurt": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"eye_open_inner_left": {
|
||||
"pupil_outer_left": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"eyelid_inner_left": {
|
||||
"rotation": [0, 0, 22.5],
|
||||
"pupil_outer_closed_left": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"eye_open_outer_left": {
|
||||
"pupil_outer_closed_left2": {
|
||||
"position": [0, 0.35, 0]
|
||||
},
|
||||
"pupil_inner_left": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"eyelid_outer_left": {
|
||||
"rotation": [0, 0, -22.5],
|
||||
"pupil_inner_closed_left": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"eye_open_inner_right": {
|
||||
"pupil_inner_closed_left2": {
|
||||
"position": [0, 0.35, 0]
|
||||
},
|
||||
"pupil_outer_right": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"eyelid_inner_right": {
|
||||
"rotation": [0, 0, -22.5],
|
||||
"pupil_outer_closed_right": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"eye_open_outer_right": {
|
||||
"pupil_outer_closed_right2": {
|
||||
"position": [0, 0.35, 0]
|
||||
},
|
||||
"pupil_inner_right": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"eyelid_outer_right": {
|
||||
"rotation": [0, 0, 22.5],
|
||||
"pupil_inner_closed_right": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"pupil_inner_closed_right2": {
|
||||
"position": [0, 0.35, 0]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.binacle.render": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"neck_left": {
|
||||
"rotation": [29.6217, -4.9809, 26.1822]
|
||||
},
|
||||
"neck_left2": {
|
||||
"rotation": [-2.28217, -2.57594, -9.6658]
|
||||
},
|
||||
"neck_left3": {
|
||||
"rotation": [-9.9786, 0.3262, -5.0071]
|
||||
},
|
||||
"head_left": {
|
||||
"rotation": [-5, 0, 10]
|
||||
},
|
||||
"inner_claw_left": {
|
||||
"rotation": [0, 0, -12.5]
|
||||
},
|
||||
"outer_claw_left": {
|
||||
"rotation": [0, 0, 12.5]
|
||||
},
|
||||
"neck_right": {
|
||||
"rotation": [-15, 0, -17.5],
|
||||
"position": [0, -2.5, 0]
|
||||
},
|
||||
"neck_right2": {
|
||||
"rotation": [12.2128, 2.6851, -12.2126]
|
||||
},
|
||||
"neck_right3": {
|
||||
"rotation": [10, 0, 10]
|
||||
},
|
||||
"head_right": {
|
||||
"rotation": [-7.43656, -0.9762, -12.43656]
|
||||
},
|
||||
"inner_claw_right": {
|
||||
"rotation": [0, 0, 12.5]
|
||||
},
|
||||
"outer_claw_right": {
|
||||
"rotation": [0, 0, -12.5]
|
||||
},
|
||||
"body": {
|
||||
"rotation": [0, -12.5, 0]
|
||||
},
|
||||
"head_angle_left": {
|
||||
"rotation": [-12.5, 0, -7.5]
|
||||
},
|
||||
"head_angle_right": {
|
||||
"rotation": [5, 0, 20]
|
||||
},
|
||||
"mouth_closed_left": {
|
||||
"position": [0, 0, 0.3]
|
||||
},
|
||||
"mouth_open_left": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"pupil_inner_left": {
|
||||
"position": [-0.5, 0, 0]
|
||||
},
|
||||
"pupil_outer_right": {
|
||||
"position": [-0.5, 0, 0]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
+447
-116
@@ -5,183 +5,241 @@
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"body": {
|
||||
"position": [0, -5.5, 0]
|
||||
"position": [0, -4.2, 0]
|
||||
},
|
||||
"torso": {
|
||||
"rotation": [0, 0, 0]
|
||||
"rotation": [-2.5, 0, 0]
|
||||
},
|
||||
"torso2": {
|
||||
"waist": {
|
||||
"rotation": [5, 0, 0]
|
||||
},
|
||||
"torso3": {
|
||||
"chest": {
|
||||
"rotation": [7.5, 0, 0]
|
||||
},
|
||||
"arm_left": {
|
||||
"rotation": [0, 22.5, 35]
|
||||
"rotation": [0, 5, 35]
|
||||
},
|
||||
"arm_left2": {
|
||||
"rotation": [2.18443, 14.90608, 5.09576]
|
||||
},
|
||||
"hand_left": {
|
||||
"rotation": [0, 17.5, 0]
|
||||
"rotation": [1.5741, 17.4313, 5.2414]
|
||||
},
|
||||
"finger_front_left": {
|
||||
"rotation": [3.61644, 19.6835, 10.62758]
|
||||
"rotation": [5.38154, 19.291, 15.91518]
|
||||
},
|
||||
"finger_middle_left": {
|
||||
"rotation": [0, 0, 7.5]
|
||||
},
|
||||
"finger_back_left": {
|
||||
"rotation": [-2.66399, -14.76689, 10.34527]
|
||||
"rotation": [-4.60669, -14.29059, 18.07777]
|
||||
},
|
||||
"arm_right": {
|
||||
"rotation": [0, -22.5, -35]
|
||||
"rotation": [0, -5, -35]
|
||||
},
|
||||
"arm_right2": {
|
||||
"rotation": [2.18443, -14.90608, -5.09576]
|
||||
},
|
||||
"hand_right": {
|
||||
"rotation": [0, -17.5, 0]
|
||||
"rotation": [1.5741, -17.4313, -5.2414]
|
||||
},
|
||||
"leg_left": {
|
||||
"rotation": [-45, -50, -0.00001]
|
||||
"rotation": [-35, -57.5, -0.00001]
|
||||
},
|
||||
"leg_left2": {
|
||||
"rotation": [55, 0, 0]
|
||||
"rotation": [40, 0, 0]
|
||||
},
|
||||
"foot_left": {
|
||||
"rotation": [-10, 0, 0]
|
||||
"rotation": [-5, 0, 0]
|
||||
},
|
||||
"leg_right": {
|
||||
"rotation": [-45, 50, 0.00001]
|
||||
"rotation": [-35, 57.5, 0.00001]
|
||||
},
|
||||
"leg_right2": {
|
||||
"rotation": [55, 0, 0]
|
||||
"rotation": [40, 0, 0]
|
||||
},
|
||||
"foot_right": {
|
||||
"rotation": [-10, 0, 0]
|
||||
"rotation": [-5, 0, 0]
|
||||
},
|
||||
"shoulder_arm_left": {
|
||||
"shoulder_left": {
|
||||
"rotation": [5, 0, 0]
|
||||
},
|
||||
"shoulder_arm_left2": {
|
||||
"shoulder_left2": {
|
||||
"rotation": [9.96271, -0.86717, 4.92442]
|
||||
},
|
||||
"shoulder_hand_left": {
|
||||
"rotation": [2.5, 0, 0]
|
||||
"rotation": [5.0285, 0.2162, 5.0048]
|
||||
},
|
||||
"finger_middle_right": {
|
||||
"rotation": [0, 0, -7.5]
|
||||
},
|
||||
"finger_back_right": {
|
||||
"rotation": [-2.66399, 14.76689, -10.34527]
|
||||
"rotation": [-4.60669, 14.29059, -18.07777]
|
||||
},
|
||||
"shoulder_claw_inner_left": {
|
||||
"claw_inner_left": {
|
||||
"rotation": [5, 0, -7.5]
|
||||
},
|
||||
"shoulder_claw_middle_left": {
|
||||
"claw_middle_left": {
|
||||
"rotation": [5, 0, 0]
|
||||
},
|
||||
"shoulder_claw_outer_left": {
|
||||
"claw_outer_left": {
|
||||
"rotation": [4.95744, 0.65182, 7.52822]
|
||||
},
|
||||
"shoulder_arm_right": {
|
||||
"shoulder_right": {
|
||||
"rotation": [5, 0, 0]
|
||||
},
|
||||
"shoulder_arm_right2": {
|
||||
"shoulder_right2": {
|
||||
"rotation": [9.96271, 0.86717, -4.92442]
|
||||
},
|
||||
"shoulder_hand_right": {
|
||||
"rotation": [2.5, 0, 0]
|
||||
"rotation": [5.0285, -0.2162, -5.0048]
|
||||
},
|
||||
"shoulder_claw_inner_right": {
|
||||
"claw_inner_right": {
|
||||
"rotation": [5, 0, 7.5]
|
||||
},
|
||||
"shoulder_claw_middle_right": {
|
||||
"claw_middle_right": {
|
||||
"rotation": [5, 0, 0]
|
||||
},
|
||||
"shoulder_claw_outer_right": {
|
||||
"claw_outer_right": {
|
||||
"rotation": [4.95744, -0.65182, -7.52822]
|
||||
},
|
||||
"head_finger_left1_3": {
|
||||
"rotation": [5, 0, 0]
|
||||
},
|
||||
"head_finger_left2_3": {
|
||||
"torso2": {
|
||||
"rotation": [2.5, 0, 0]
|
||||
},
|
||||
"head_finger_right1_3": {
|
||||
"rotation": [7.5, 0, 0]
|
||||
"torso3": {
|
||||
"rotation": [2.5, 0, 0]
|
||||
},
|
||||
"head_finger_right2_3": {
|
||||
"shoulder_arm_left": {
|
||||
"rotation": [7.7366, -33.7446, 3.8487]
|
||||
},
|
||||
"shoulder_arm_left2": {
|
||||
"rotation": [4.9953, -0.2178, 2.4905]
|
||||
},
|
||||
"head_angle": {
|
||||
"rotation": [5, 0, 0]
|
||||
},
|
||||
"head_thumb2": {
|
||||
"rotation": [-2.50238, -2.49762, 0.10912]
|
||||
"head_thumb": {
|
||||
"rotation": [-7.5, 0, 0]
|
||||
},
|
||||
"head_thumb3": {
|
||||
"rotation": [0, -2.5, 0]
|
||||
"arm_left3": {
|
||||
"rotation": [3.0947, 22.2971, 8.11]
|
||||
},
|
||||
"arm_right3": {
|
||||
"rotation": [3.0947, -22.2971, -8.11]
|
||||
},
|
||||
"shoulder_finger_middle_left": {
|
||||
"rotation": [2.5, 0, 0]
|
||||
},
|
||||
"shoulder_finger_inner_left": {
|
||||
"rotation": [10, 0, -12.5]
|
||||
},
|
||||
"finger_front_right": {
|
||||
"rotation": [5.38154, -19.291, -15.91518]
|
||||
},
|
||||
"shoulder_finger_outer_left": {
|
||||
"rotation": [9.9627, -0.8672, 14.9244]
|
||||
},
|
||||
"shoulder_arm_right": {
|
||||
"rotation": [7.7366, 33.7446, -3.8487]
|
||||
},
|
||||
"shoulder_arm_right2": {
|
||||
"rotation": [4.9953, 0.2178, -2.4905]
|
||||
},
|
||||
"shoulder_finger_inner_right": {
|
||||
"rotation": [10, 0, 12.5]
|
||||
},
|
||||
"shoulder_finger_middle_right": {
|
||||
"rotation": [2.5, 0, 0]
|
||||
},
|
||||
"shoulder_finger_outer_right": {
|
||||
"rotation": [9.9627, 0.8672, -14.9244]
|
||||
},
|
||||
"head_thumb2": {
|
||||
"rotation": [0, -17.5, 0]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.barbaracle.blink": {
|
||||
"animation_length": 0.1667,
|
||||
"bones": {
|
||||
"eyelid_left": {
|
||||
"pupil_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.125": {"pre": [0, 0, 0.1], "post": [0, 0, 0.1]},
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0.1]}
|
||||
}
|
||||
},
|
||||
"pupil_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.125": {"pre": [0, 0, 0.1], "post": [0, 0, 0.1]},
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0.1]}
|
||||
}
|
||||
},
|
||||
"pupil_closed_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.125": {"pre": [0, 0, -0.1], "post": [0, 0, -0.1]},
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyelid_right": {
|
||||
"pupil_closed_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.125": {"pre": [0, 0, -0.1], "post": [0, 0, -0.1]},
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.barbaracle.blink2": {
|
||||
"animation_length": 0.1667,
|
||||
"bones": {
|
||||
"shoulder_eyelid_left": {
|
||||
},
|
||||
"pupil_shoulder_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.125": {"pre": [0, 0, 0.1], "post": [0, 0, 0.1]},
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0.1]}
|
||||
}
|
||||
},
|
||||
"pupil_shoulder_closed_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.125": {"pre": [0, 0, -0.1], "post": [0, 0, -0.1]},
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.barbaracle.blink3": {
|
||||
"animation_length": 0.1667,
|
||||
"bones": {
|
||||
"shoulder_eyelid_right": {
|
||||
},
|
||||
"pupil_shoulder_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.125": {"pre": [0, 0, 0.1], "post": [0, 0, 0.1]},
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0.1]}
|
||||
}
|
||||
},
|
||||
"pupil_shoulder_closed_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.125": {"pre": [0, 0, -0.1], "post": [0, 0, -0.1]},
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.barbaracle.blink4": {
|
||||
"animation_length": 0.1667,
|
||||
"bones": {
|
||||
"hand_eyelid_left": {
|
||||
},
|
||||
"pupil_hand_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0.1, 0],
|
||||
"0.125": {"pre": [0, 0.1, 0], "post": [0, 0.1, 0]},
|
||||
"0.1667": {"pre": [0, 0.1, 0], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"pupil_hand_closed_left": {
|
||||
"position": {
|
||||
"0.0": [0, -0.1, 0],
|
||||
"0.125": {"pre": [0, -0.1, 0], "post": [0, -0.1, 0]},
|
||||
"0.1667": {"pre": [0, -0.1, 0], "post": [0, 0, 0]}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.barbaracle.blink5": {
|
||||
"animation_length": 0.1667,
|
||||
"bones": {
|
||||
"hand_eyelid_right": {
|
||||
},
|
||||
"pupil_hand_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0.1, 0],
|
||||
"0.125": {"pre": [0, 0.1, 0], "post": [0, 0.1, 0]},
|
||||
"0.1667": {"pre": [0, 0.1, 0], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"pupil_hand_closed_right": {
|
||||
"position": {
|
||||
"0.0": [0, -0.1, 0],
|
||||
"0.125": {"pre": [0, -0.1, 0], "post": [0, -0.1, 0]},
|
||||
@@ -194,80 +252,353 @@
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"pupil_left": {
|
||||
"position": [0, -0.25, 0],
|
||||
"scale": [1, 0.4, 1]
|
||||
"position": [0, -0.4, 0],
|
||||
"scale": [0.6, 0.6, 1]
|
||||
},
|
||||
"pupil_right": {
|
||||
"position": [0, -0.25, 0],
|
||||
"scale": [1, 0.4, 1]
|
||||
"position": [0, -0.4, 0],
|
||||
"scale": [0.6, 0.6, 1]
|
||||
},
|
||||
"pupil_shoulder_left": {
|
||||
"position": [0, -0.5, 0],
|
||||
"scale": [0.6, 0.6, 1]
|
||||
},
|
||||
"pupil_shoulder_closed_left": {
|
||||
"scale": [1, 0.9, 1]
|
||||
},
|
||||
"pupil_shoulder_right": {
|
||||
"position": [0, -0.5, 0],
|
||||
"scale": [0.6, 0.6, 1]
|
||||
},
|
||||
"pupil_hand_left": {
|
||||
"position": [-0.5, 0, 0],
|
||||
"scale": [0.6, 1, 0.6]
|
||||
},
|
||||
"pupil_hand_right": {
|
||||
"position": [0.5, 0, 0],
|
||||
"scale": [0.6, 1, 0.6]
|
||||
},
|
||||
"mouth_closed": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"mouth_open": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"head_eyebrow": {
|
||||
"position": [0, 0.5, 0]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.barbaracle.angry": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"eye_expression_left": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"head_eyebrow": {
|
||||
"position": [0, 0.2, 0]
|
||||
},
|
||||
"eye_expression_right": {
|
||||
"position": [0, 0, -0.1]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.barbaracle.sad": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"eye_expression_left": {
|
||||
"position": [1, 0.25, -0.1]
|
||||
},
|
||||
"eye_expression_right": {
|
||||
"position": [-1, 0.25, -0.1]
|
||||
},
|
||||
"head_eyebrow": {
|
||||
"position": [0, 0.25, 0]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.barbaracle.happy": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"pupil_left": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"pupil_right": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"pupil_closed_left": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"pupil_closed_left3": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"pupil_closed_right": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"pupil_closed_right3": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"pupil_shoulder_left": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"pupil_shoulder_closed_left": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"pupil_shoulder_closed_left3": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"pupil_shoulder_right": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"pupil_shoulder_closed_right": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"pupil_shoulder_closed_right3": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"pupil_hand_left": {
|
||||
"position": [0, 0.1, 0]
|
||||
},
|
||||
"pupil_hand_closed_left": {
|
||||
"position": [0, -0.1, 0]
|
||||
},
|
||||
"pupil_hand_closed_left3": {
|
||||
"position": [0, -0.1, 0]
|
||||
},
|
||||
"pupil_hand_right": {
|
||||
"position": [0, 0.1, 0]
|
||||
},
|
||||
"pupil_hand_closed_right": {
|
||||
"position": [0, -0.1, 0]
|
||||
},
|
||||
"pupil_hand_closed_right3": {
|
||||
"position": [0, -0.1, 0]
|
||||
},
|
||||
"mouth_closed": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"mouth_open": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"head_eyebrow": {
|
||||
"position": [0, 0.5, 0]
|
||||
},
|
||||
"eyelid_happy_left": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"eyelid_happy_right": {
|
||||
"position": [0, 0, -0.1]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.barbaracle.hurt": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"eyelid_recoil_left": {
|
||||
"pupil_left": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"pupil_right": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"pupil_closed_left1": {
|
||||
"position": [0, -0.2, 0]
|
||||
},
|
||||
"pupil_closed_left": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"eyelid_recoil_right": {
|
||||
"pupil_closed_left2": {
|
||||
"position": [0, 0.1, 0]
|
||||
},
|
||||
"pupil_closed_right": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"pupil_closed_right1": {
|
||||
"position": [0, -0.2, 0]
|
||||
},
|
||||
"pupil_closed_right2": {
|
||||
"position": [0, 0.1, 0]
|
||||
},
|
||||
"pupil_shoulder_left": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"pupil_shoulder_closed_left": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"pupil_shoulder_closed_left1": {
|
||||
"position": [0, -0.2, 0]
|
||||
},
|
||||
"pupil_shoulder_closed_left2": {
|
||||
"position": [0, 0.25, 0]
|
||||
},
|
||||
"pupil_shoulder_right": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"pupil_shoulder_closed_right": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"pupil_shoulder_closed_right1": {
|
||||
"position": [0, -0.2, 0]
|
||||
},
|
||||
"pupil_shoulder_closed_right2": {
|
||||
"position": [0, 0.25, 0]
|
||||
},
|
||||
"pupil_hand_left": {
|
||||
"position": [0, 0.1, 0]
|
||||
},
|
||||
"pupil_hand_closed_left": {
|
||||
"position": [0, -0.1, 0]
|
||||
},
|
||||
"pupil_hand_closed_left1": {
|
||||
"position": [-0.15, 0, 0]
|
||||
},
|
||||
"pupil_hand_closed_left2": {
|
||||
"position": [0.25, 0, 0]
|
||||
},
|
||||
"pupil_hand_right": {
|
||||
"position": [0, 0.1, 0]
|
||||
},
|
||||
"pupil_hand_closed_right": {
|
||||
"position": [0, -0.1, 0]
|
||||
},
|
||||
"pupil_hand_closed_right1": {
|
||||
"position": [0.15, 0, 0]
|
||||
},
|
||||
"pupil_hand_closed_right2": {
|
||||
"position": [-0.25, 0, 0]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.barbaracle.render": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"body": {
|
||||
"rotation": [0, 22.5, 0],
|
||||
"position": [0, -5.15, 0]
|
||||
},
|
||||
"torso": {
|
||||
"rotation": [5, 0, 0]
|
||||
},
|
||||
"waist": {
|
||||
"rotation": [5, 0, 0]
|
||||
},
|
||||
"chest": {
|
||||
"rotation": [7.5, 0, 0]
|
||||
},
|
||||
"arm_left": {
|
||||
"rotation": [11.5511, 18.5668, 36.0517]
|
||||
},
|
||||
"arm_left2": {
|
||||
"rotation": [1.51733, 14.98688, 2.50956]
|
||||
},
|
||||
"hand_left": {
|
||||
"rotation": [2.3567, 17.3455, 7.8596]
|
||||
},
|
||||
"finger_front_left": {
|
||||
"rotation": [-0.00006, 20, -0.00002]
|
||||
},
|
||||
"finger_middle_left": {
|
||||
"rotation": [0, 0, -5]
|
||||
},
|
||||
"finger_back_left": {
|
||||
"rotation": [-4.89709, -24.25639, 18.95427]
|
||||
},
|
||||
"arm_right": {
|
||||
"rotation": [23.7134, 28.0591, -56.9661]
|
||||
},
|
||||
"arm_right2": {
|
||||
"rotation": [0.81923, -20.29228, 10.12704]
|
||||
},
|
||||
"hand_right": {
|
||||
"rotation": [-6.1549, -16.4136, 20.8884]
|
||||
},
|
||||
"leg_left": {
|
||||
"rotation": [-16.2776, -74.3753, -32.88211]
|
||||
},
|
||||
"leg_left2": {
|
||||
"rotation": [40, 0, 0]
|
||||
},
|
||||
"foot_left": {
|
||||
"rotation": [7.4365, -0.9762, 7.4365]
|
||||
},
|
||||
"leg_right": {
|
||||
"rotation": [-32.3785, 61.2987, 14.81371]
|
||||
},
|
||||
"leg_right2": {
|
||||
"rotation": [45, 0, 0]
|
||||
},
|
||||
"foot_right": {
|
||||
"rotation": [0, 0, -7.5]
|
||||
},
|
||||
"shoulder_left": {
|
||||
"rotation": [5, 0, 0]
|
||||
},
|
||||
"shoulder_left2": {
|
||||
"rotation": [9.96271, -0.86717, 4.92442]
|
||||
},
|
||||
"shoulder_hand_left": {
|
||||
"rotation": [5.0285, 0.2162, 5.0048]
|
||||
},
|
||||
"finger_middle_right": {
|
||||
"rotation": [0, 0, -7.5]
|
||||
},
|
||||
"finger_back_right": {
|
||||
"rotation": [-4.60669, 14.29059, -18.07777]
|
||||
},
|
||||
"claw_inner_left": {
|
||||
"rotation": [5, 0, -7.5]
|
||||
},
|
||||
"claw_middle_left": {
|
||||
"rotation": [5, 0, 0]
|
||||
},
|
||||
"claw_outer_left": {
|
||||
"rotation": [4.95744, 0.65182, 7.52822]
|
||||
},
|
||||
"shoulder_right": {
|
||||
"rotation": [5, 0, 0]
|
||||
},
|
||||
"shoulder_right2": {
|
||||
"rotation": [9.96271, 0.86717, -4.92442]
|
||||
},
|
||||
"shoulder_hand_right": {
|
||||
"rotation": [0.0285, -0.2162, -5.0048]
|
||||
},
|
||||
"claw_inner_right": {
|
||||
"rotation": [5, 0, 7.5]
|
||||
},
|
||||
"claw_middle_right": {
|
||||
"rotation": [5, 0, 0]
|
||||
},
|
||||
"claw_outer_right": {
|
||||
"rotation": [4.95744, -0.65182, -7.52822]
|
||||
},
|
||||
"torso2": {
|
||||
"rotation": [0, 0, 0]
|
||||
},
|
||||
"torso3": {
|
||||
"rotation": [-2.5096, -4.9952, 0.2186]
|
||||
},
|
||||
"shoulder_arm_left": {
|
||||
"rotation": [17.5227, -34.4394, 21.9663]
|
||||
},
|
||||
"shoulder_arm_left2": {
|
||||
"rotation": [4.9953, -0.2178, 2.4905]
|
||||
},
|
||||
"head_angle": {
|
||||
"rotation": [5.0047, -2.4905, -0.218]
|
||||
},
|
||||
"head_thumb": {
|
||||
"rotation": [-7.5, 0, 0]
|
||||
},
|
||||
"arm_left3": {
|
||||
"rotation": [2.0675, 22.4097, 5.4096]
|
||||
},
|
||||
"arm_right3": {
|
||||
"rotation": [4.2903, -17.8334, 7.1016]
|
||||
},
|
||||
"shoulder_finger_middle_left": {
|
||||
"rotation": [2.5, 0, 0]
|
||||
},
|
||||
"shoulder_finger_inner_left": {
|
||||
"rotation": [10, 0, -12.5]
|
||||
},
|
||||
"finger_front_right": {
|
||||
"rotation": [5.38154, -19.291, -15.91518]
|
||||
},
|
||||
"shoulder_finger_outer_left": {
|
||||
"rotation": [9.9627, -0.8672, 14.9244]
|
||||
},
|
||||
"shoulder_arm_right": {
|
||||
"rotation": [34.2917, 46.109, -1.4401]
|
||||
},
|
||||
"shoulder_arm_right2": {
|
||||
"rotation": [2.4953, 0.2178, -2.4905]
|
||||
},
|
||||
"shoulder_finger_inner_right": {
|
||||
"rotation": [0, 0, 12.5]
|
||||
},
|
||||
"shoulder_finger_middle_right": {
|
||||
"rotation": [2.5, 0, 0]
|
||||
},
|
||||
"shoulder_finger_outer_right": {
|
||||
"rotation": [9.9627, 0.8672, -14.9244]
|
||||
},
|
||||
"head_thumb2": {
|
||||
"rotation": [0, -17.5, 0]
|
||||
},
|
||||
"pupil_right": {
|
||||
"position": [0.25, 0, 0]
|
||||
},
|
||||
"pupil_shoulder_left": {
|
||||
"position": [-0.5, 0, 0]
|
||||
},
|
||||
"pupil_shoulder_right": {
|
||||
"position": [0.5, 0, 0]
|
||||
},
|
||||
"pupil_hand_left": {
|
||||
"position": [0, 0, -0.5]
|
||||
},
|
||||
"pupil_hand_right": {
|
||||
"position": [0, 0, -0.5]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
+405
@@ -0,0 +1,405 @@
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"animations": {
|
||||
"animation.helioptile.ground_idle": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"body": {
|
||||
"position": [0, -0.25, 0]
|
||||
},
|
||||
"torso": {
|
||||
"rotation": ["-2*Math.cos((query.anim_time-0.25) * 90 * 2) *0.5", 0, 0],
|
||||
"position": [0, 0, "0.25*Math.cos((query.anim_time-0) * 90 * 2) *0.5"]
|
||||
},
|
||||
"torso2": {
|
||||
"rotation": ["-52.5-2*Math.cos((query.anim_time-0.5) * 90 * 2) *0.5", 0, 0]
|
||||
},
|
||||
"head": {
|
||||
"rotation": ["-5-4*Math.cos((query.anim_time-0.75) * 90 * 2) *0.5", 0, 0]
|
||||
},
|
||||
"tail": {
|
||||
"rotation": [
|
||||
"15-6*Math.cos((query.anim_time-0.25) * 90 * 2) *0.5",
|
||||
"-4*Math.cos((query.anim_time-0.5) * 90 * 1) *0.5",
|
||||
"-12*Math.cos((query.anim_time-0.0) * 90 * 1) *0.5"
|
||||
]
|
||||
},
|
||||
"tail2": {
|
||||
"rotation": ["10-8*Math.cos((query.anim_time-0.5) * 90 * 2) *0.5", 0, "-22*Math.cos((query.anim_time-0.25) * 90 * 1) *0.5"]
|
||||
},
|
||||
"leg_right": {
|
||||
"rotation": [0, 0, "-25-3*Math.cos((query.anim_time-0) * 90 * 2) *0.5"]
|
||||
},
|
||||
"leg_right2": {
|
||||
"rotation": [0, 0, "-70+3*Math.cos((query.anim_time-0) * 90 * 2) *0.5"]
|
||||
},
|
||||
"foot_right": {
|
||||
"rotation": [2.4148, -0.6468, 4.9863]
|
||||
},
|
||||
"arm_left": {
|
||||
"rotation": [43.6985, 41.9981, "54.9995-4*Math.cos((query.anim_time-0.75) * 90 * 2) *0.5"]
|
||||
},
|
||||
"arm_left2": {
|
||||
"rotation": [0, "22.5+3*Math.cos((query.anim_time-0.0) * 90 * 2) *0.5", 0]
|
||||
},
|
||||
"hand_left": {
|
||||
"rotation": [0, 0, 25]
|
||||
},
|
||||
"finger_front_left": {
|
||||
"rotation": [0, 0, 25]
|
||||
},
|
||||
"finger_middle_left": {
|
||||
"rotation": [0, 0, 25]
|
||||
},
|
||||
"finger_back_left": {
|
||||
"rotation": [0, 0, 25]
|
||||
},
|
||||
"tail3": {
|
||||
"rotation": [22.5, 0, "-32*Math.cos((query.anim_time-0.0) * 90 * 1) *0.5"]
|
||||
},
|
||||
"tail4": {
|
||||
"rotation": [27.5, 0, "-42*Math.cos((query.anim_time-0.5) * 90 * 1) *0.5"]
|
||||
},
|
||||
"neck": {
|
||||
"rotation": [-22.5, 0, 0]
|
||||
},
|
||||
"arm_right": {
|
||||
"rotation": [43.6985, -41.9981, "-54.9995+4*Math.cos((query.anim_time-0.75) * 90 * 2) *0.5"]
|
||||
},
|
||||
"arm_right2": {
|
||||
"rotation": [0, "-22.5-3*Math.cos((query.anim_time-0.0) * 90 * 2) *0.5", 0]
|
||||
},
|
||||
"hand_right": {
|
||||
"rotation": [0, 0, -25]
|
||||
},
|
||||
"finger_front_right": {
|
||||
"rotation": [0, 0, -25]
|
||||
},
|
||||
"finger_middle_right": {
|
||||
"rotation": [0, 0, -25]
|
||||
},
|
||||
"finger_back_right": {
|
||||
"rotation": [0, 0, -25]
|
||||
},
|
||||
"leg_left": {
|
||||
"rotation": [0, 0, "25+3*Math.cos((query.anim_time-0) * 90 * 2) *0.5"]
|
||||
},
|
||||
"leg_left2": {
|
||||
"rotation": [0, 0, "70-3*Math.cos((query.anim_time-0) * 90 * 2) *0.5"]
|
||||
},
|
||||
"foot_left": {
|
||||
"rotation": [2.4148, 0.6468, -4.9863]
|
||||
},
|
||||
"frill_right": {
|
||||
"rotation": [0, "-0-6*Math.cos((query.anim_time-0.0) * 90 * 2) *0.5", "-60+4*Math.cos((query.anim_time-0.0) * 90 * 2) *0.5"]
|
||||
},
|
||||
"ear_right2": {
|
||||
"rotation": [0, 0, "-20+4*Math.cos((query.anim_time-0.25) * 90 * 2) *0.5"]
|
||||
},
|
||||
"ear_right3": {
|
||||
"rotation": [0, 0, "-25+4*Math.cos((query.anim_time-0.5) * 90 * 2) *0.5"]
|
||||
},
|
||||
"frill_left": {
|
||||
"rotation": [0, "0+6*Math.cos((query.anim_time-0.0) * 90 * 2) *0.5", "60-4*Math.cos((query.anim_time-0.0) * 90 * 2) *0.5"]
|
||||
},
|
||||
"ear_left2": {
|
||||
"rotation": [0, 0, "20-4*Math.cos((query.anim_time-0.25) * 90 * 2) *0.5"]
|
||||
},
|
||||
"ear_left3": {
|
||||
"rotation": [0, 0, "25-4*Math.cos((query.anim_time-0.5) * 90 * 2) *0.5"]
|
||||
},
|
||||
"frill_open_right": {
|
||||
"scale": 0
|
||||
},
|
||||
"frill_open_left": {
|
||||
"scale": 0
|
||||
},
|
||||
"waist": {
|
||||
"rotation": [82.5, 0, 0]
|
||||
},
|
||||
"leg_left_rotation": {
|
||||
"rotation": [0, 30, 0],
|
||||
"position": ["0.04*Math.cos((query.anim_time-0) * 90 * 2) *0.5", "0.2*Math.cos((query.anim_time-0) * 90 * 2) *0.5", 0]
|
||||
},
|
||||
"leg_right_rotation": {
|
||||
"rotation": [0, -30, 0],
|
||||
"position": ["-0.04*Math.cos((query.anim_time-0) * 90 * 2) *0.5", "0.2*Math.cos((query.anim_time-0) * 90 * 2) *0.5", 0]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.helioptile.blink": {
|
||||
"animation_length": 0.1667,
|
||||
"bones": {
|
||||
"eye_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eye_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, 0.1],
|
||||
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyelid_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyelid_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyes_ditto": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"eyes_blink_ditto": {
|
||||
"position": [0, 0, -0.1]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.helioptile.ditto_face": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"face": {
|
||||
"position": [0, 0, 0.1],
|
||||
"scale": 0
|
||||
},
|
||||
"face_ditto": {
|
||||
"position": [0, 0, -0.1]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.helioptile.pose": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"body": {
|
||||
"rotation": [0, -55, 0]
|
||||
},
|
||||
"torso": {
|
||||
"rotation": [75, 0, 0]
|
||||
},
|
||||
"torso2": {
|
||||
"rotation": [-40, 0, 0]
|
||||
},
|
||||
"head": {
|
||||
"rotation": [-34.3534, 66.6292, -32.4468]
|
||||
},
|
||||
"tail": {
|
||||
"rotation": [27.5, 0, 0]
|
||||
},
|
||||
"tail2": {
|
||||
"rotation": [22.5, 0, 0]
|
||||
},
|
||||
"leg_right": {
|
||||
"rotation": [-2.4616, 6.9887, -30.9789]
|
||||
},
|
||||
"leg_right2": {
|
||||
"rotation": [0, 0, -72.5]
|
||||
},
|
||||
"foot_right": {
|
||||
"rotation": [0, -1, 12.5]
|
||||
},
|
||||
"arm_left": {
|
||||
"rotation": [17.9474, 14.645, 52.325]
|
||||
},
|
||||
"arm_left2": {
|
||||
"rotation": [0, 30, 0]
|
||||
},
|
||||
"hand_left": {
|
||||
"rotation": [0, 0, 27.5]
|
||||
},
|
||||
"finger_front_left": {
|
||||
"rotation": [0, 0, 25]
|
||||
},
|
||||
"finger_middle_left": {
|
||||
"rotation": [0, 0, 25]
|
||||
},
|
||||
"finger_back_left": {
|
||||
"rotation": [0, 0, 25]
|
||||
},
|
||||
"tail3": {
|
||||
"rotation": [-12.5, 0, 0]
|
||||
},
|
||||
"tail4": {
|
||||
"rotation": [-22.5, 0, 0]
|
||||
},
|
||||
"neck": {
|
||||
"rotation": [-27.5, 0, 0]
|
||||
},
|
||||
"arm_right": {
|
||||
"rotation": [17.9474, -14.645, -52.325]
|
||||
},
|
||||
"arm_right2": {
|
||||
"rotation": [0, -30, 0]
|
||||
},
|
||||
"hand_right": {
|
||||
"rotation": [0, 0, -27.5]
|
||||
},
|
||||
"finger_front_right": {
|
||||
"rotation": [0, 0, -25]
|
||||
},
|
||||
"finger_middle_right": {
|
||||
"rotation": [0, 0, -25]
|
||||
},
|
||||
"finger_back_right": {
|
||||
"rotation": [0, 0, -25]
|
||||
},
|
||||
"leg_left": {
|
||||
"rotation": [12.1245, 16.4236, 31.3082]
|
||||
},
|
||||
"leg_left2": {
|
||||
"rotation": [0, 0, 72.5]
|
||||
},
|
||||
"foot_left": {
|
||||
"rotation": [0, 1, -12.5]
|
||||
},
|
||||
"frill_right": {
|
||||
"rotation": [10.8923, -5.1377, -51.2382]
|
||||
},
|
||||
"ear_right3": {
|
||||
"rotation": [0, 0, -17.5]
|
||||
},
|
||||
"ear_right2": {
|
||||
"rotation": [0, 0, -17.5]
|
||||
},
|
||||
"frill_left": {
|
||||
"rotation": [0, 0, 60]
|
||||
},
|
||||
"ear_left2": {
|
||||
"rotation": [0, 0, 20]
|
||||
},
|
||||
"ear_left3": {
|
||||
"rotation": [0, 0, 20]
|
||||
},
|
||||
"frill_open_right": {
|
||||
"scale": 0
|
||||
},
|
||||
"frills": {
|
||||
"scale": 1
|
||||
},
|
||||
"frill_open_left": {
|
||||
"scale": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.helioptile.happy": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"eye_left": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"eye_right": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"mouth_closed": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"eyelid_happy_right": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"eyelid_happy_left": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"mouth_open_smile": {
|
||||
"position": [0, 0, -0.1]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.helioptile.angry": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"mouth_closed": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"eyelid_angry_right": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"eyelid_angry_left": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"mouth_open": {
|
||||
"position": [0, 0, -0.1]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.helioptile.sad": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"mouth_closed": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"eyelid_sad_right": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"eyelid_sad_left": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"mouth_closed_frown": {
|
||||
"position": [0, 0, -0.1]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.helioptile.hurt": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"eye_left": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"eye_right": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"mouth_closed": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"eyelid_hit_right": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"eyelid_hit_left": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"mouth_open": {
|
||||
"position": [0, 0, -0.1]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.helioptile.shocked": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"mouth_closed": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"mouth_open": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"pupil_left": {
|
||||
"scale": [0.7, 0.7, 1]
|
||||
},
|
||||
"pupil_right": {
|
||||
"scale": [0.7, 0.7, 1]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.helioptile.annoyed": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"mouth_closed": {
|
||||
"position": [0, 0, 0.1]
|
||||
},
|
||||
"eyelid_annoyed_right": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"eyelid_annoyed_left": {
|
||||
"position": [0, 0, -0.1]
|
||||
},
|
||||
"mouth_closed_neutral": {
|
||||
"position": [0, 0, -0.1]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+568
@@ -0,0 +1,568 @@
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"animations": {
|
||||
"animation.heliolisk.ground_idle": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"torso": {
|
||||
"rotation": ["15-2*Math.cos((query.anim_time-0.0) * 90 * 2) *0.5", 0, 0],
|
||||
"position": [0, "0.55*Math.cos((query.anim_time-0) * 90 * 2) *0.5", 0]
|
||||
},
|
||||
"tail": {
|
||||
"rotation": [
|
||||
"-35-6*Math.cos((query.anim_time-0.0) * 90 * 2) *0.5",
|
||||
"-4*Math.cos((query.anim_time-0.25) * 90 * 1) *0.5",
|
||||
"-12*Math.cos((query.anim_time-0.75) * 90 * 1) *0.5"
|
||||
]
|
||||
},
|
||||
"tail2": {
|
||||
"rotation": ["35-8*Math.cos((query.anim_time-0.25) * 90 * 2) *0.5", 0, "-22*Math.cos((query.anim_time-0.0) * 90 * 1) *0.5"]
|
||||
},
|
||||
"tail3": {
|
||||
"rotation": [42.5, 0, "-32*Math.cos((query.anim_time-0.75) * 90 * 1) *0.5"]
|
||||
},
|
||||
"leg_right": {
|
||||
"rotation": ["-42.5+5*Math.cos((query.anim_time-0) * 90 * 2) *0.5", 37.5, 7.5],
|
||||
"position": [
|
||||
"-0.2*Math.cos((query.anim_time-0) * 90 * 2) *0.5",
|
||||
"0.67*Math.cos((query.anim_time-0) * 90 * 2) *0.5",
|
||||
"-0.3*Math.cos((query.anim_time-0) * 90 * 2) *0.5"
|
||||
]
|
||||
},
|
||||
"foot_right": {
|
||||
"rotation": ["-27.5+5*Math.cos((query.anim_time-0) * 90 * 2) *0.5", 7.5, 0]
|
||||
},
|
||||
"leg_left": {
|
||||
"rotation": ["-42.5+5*Math.cos((query.anim_time-0) * 90 * 2) *0.5", -37.5, -7.5],
|
||||
"position": [
|
||||
"0.2*Math.cos((query.anim_time-0) * 90 * 2) *0.5",
|
||||
"0.67*Math.cos((query.anim_time-0) * 90 * 2) *0.5",
|
||||
"-0.3*Math.cos((query.anim_time-0) * 90 * 2) *0.5"
|
||||
]
|
||||
},
|
||||
"foot_left": {
|
||||
"rotation": ["-27.5+5*Math.cos((query.anim_time-0) * 90 * 2) *0.5", -7.5, 0]
|
||||
},
|
||||
"frill_down_front": {
|
||||
"rotation": [-45, 0, 0]
|
||||
},
|
||||
"frill_down_back": {
|
||||
"rotation": [45, 0, 0]
|
||||
},
|
||||
"frill_down_left": {
|
||||
"rotation": [0, 0, -45]
|
||||
},
|
||||
"frill_down_right": {
|
||||
"rotation": [0, 0, 45]
|
||||
},
|
||||
"arm_left": {
|
||||
"rotation": [1.89098, 19.11433, "44.07649-4*Math.cos((query.anim_time-0.5) * 90 * 2) *0.5"]
|
||||
},
|
||||
"arm_left2": {
|
||||
"rotation": [0, "40+5*Math.cos((query.anim_time-0.75) * 90 * 2) *0.5", 0]
|
||||
},
|
||||
"hand_left_finger": {
|
||||
"rotation": [0, 0, 22.5]
|
||||
},
|
||||
"hand_left_finger2": {
|
||||
"rotation": [0, 10, 22.5]
|
||||
},
|
||||
"hand_left_finger3": {
|
||||
"rotation": [0, -10, 22.5]
|
||||
},
|
||||
"arm_right": {
|
||||
"rotation": [1.89098, -19.11433, "-44.07649+4*Math.cos((query.anim_time-0.5) * 90 * 2) *0.5"]
|
||||
},
|
||||
"arm_right2": {
|
||||
"rotation": [0, "-40-5*Math.cos((query.anim_time-0.75) * 90 * 2) *0.5", 0]
|
||||
},
|
||||
"hand_right_finger": {
|
||||
"rotation": [0, 0, -22.5]
|
||||
},
|
||||
"hand_right_finger2": {
|
||||
"rotation": [0, -10, -22.5]
|
||||
},
|
||||
"hand_right_finger3": {
|
||||
"rotation": [0, 10, -22.5]
|
||||
},
|
||||
"tail4": {
|
||||
"rotation": ["27.5-18*Math.cos((query.anim_time-0.75) * 90 * 2) *0.5", 0, "-42*Math.cos((query.anim_time-0.25) * 90 * 1) *0.5"]
|
||||
},
|
||||
"tail5": {
|
||||
"rotation": ["-37.5-18*Math.cos((query.anim_time-0.5) * 90 * 2) *0.5", 0, "-42*Math.cos((query.anim_time-0.0) * 90 * 1) *0.5"]
|
||||
},
|
||||
"tail6": {
|
||||
"rotation": ["-37.5-18*Math.cos((query.anim_time-0.25) * 90 * 2) *0.5", 0, "-42*Math.cos((query.anim_time-0.75) * 90 * 1) *0.5"]
|
||||
},
|
||||
"toes_left": {
|
||||
"rotation": ["-15-5*Math.cos((query.anim_time-0) * 90 * 2) *0.5", 0, 0]
|
||||
},
|
||||
"toes_right": {
|
||||
"rotation": ["-15-5*Math.cos((query.anim_time-0) * 90 * 2) *0.5", 0, 0]
|
||||
},
|
||||
"hand_left": {
|
||||
"rotation": [0, 0, "22.5-5*Math.cos((query.anim_time-0.0) * 90 * 2) *0.5"],
|
||||
"position": [-0.25, 0, 0]
|
||||
},
|
||||
"hand_right": {
|
||||
"rotation": [0, 0, "-22.5+5*Math.cos((query.anim_time-0.0) * 90 * 2) *0.5"],
|
||||
"position": [0.25, 0, 0]
|
||||
},
|
||||
"frills_open": {
|
||||
"scale": 0
|
||||
},
|
||||
"leg_left2": {
|
||||
"rotation": ["-5*Math.cos((query.anim_time-0) * 90 * 2) *0.5", 0, 0]
|
||||
},
|
||||
"eye_unamused_left": {
|
||||
"scale": 1
|
||||
},
|
||||
"eye_angry_left": {
|
||||
"scale": 0
|
||||
},
|
||||
"eye_sad_left": {
|
||||
"scale": 0
|
||||
},
|
||||
"eye_happy_left": {
|
||||
"scale": 0
|
||||
},
|
||||
"eye_recoil_left": {
|
||||
"scale": 0
|
||||
},
|
||||
"eye_surprise_left": {
|
||||
"scale": 0
|
||||
},
|
||||
"eye_blink_left": {
|
||||
"scale": 0
|
||||
},
|
||||
"eye_unamused_right": {
|
||||
"scale": 1
|
||||
},
|
||||
"eye_blink_right": {
|
||||
"scale": 0
|
||||
},
|
||||
"eye_angry_right": {
|
||||
"scale": 0
|
||||
},
|
||||
"eye_sad_right": {
|
||||
"scale": 0
|
||||
},
|
||||
"eye_happy_right": {
|
||||
"scale": 0
|
||||
},
|
||||
"eye_recoil_right": {
|
||||
"scale": 0
|
||||
},
|
||||
"eye_surprise_right": {
|
||||
"scale": 0
|
||||
},
|
||||
"leg_right2": {
|
||||
"rotation": ["-5*Math.cos((query.anim_time-0) * 90 * 2) *0.5", 0, 0]
|
||||
},
|
||||
"torso2": {
|
||||
"rotation": ["-5-2*Math.cos((query.anim_time-0.25) * 90 * 2) *0.5", 0, 0]
|
||||
},
|
||||
"neck": {
|
||||
"rotation": [0, 0, 0]
|
||||
},
|
||||
"head": {
|
||||
"rotation": ["10-4*Math.cos((query.anim_time-0.75) * 90 * 2) *0.5", 0, 0]
|
||||
},
|
||||
"jaw": {
|
||||
"rotation": ["4-4*Math.cos((query.anim_time-0.0) * 90 * 2) *0.5", 0, 0]
|
||||
},
|
||||
"neck2": {
|
||||
"rotation": ["-7.5-2*Math.cos((query.anim_time-0.5) * 90 * 2) *0.5", 0, 0]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.heliolisk.blink": {
|
||||
"animation_length": 0.1667,
|
||||
"bones": {
|
||||
"ditto_eyelid_left": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"ditto_eyelid_right": {
|
||||
"position": {
|
||||
"0.0": [0, 0, -0.1],
|
||||
"0.1667": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyelid_right_neutral": {
|
||||
"position": {
|
||||
"0.0": [0.1, 0, 0],
|
||||
"0.1667": {"pre": [0.1, 0, 0], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyelid_right_closed": {
|
||||
"position": {
|
||||
"0.0": [-0.1, 0, 0],
|
||||
"0.1667": {"pre": [-0.1, 0, 0], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyelid_left_neutral": {
|
||||
"position": {
|
||||
"0.0": [-0.1, 0, 0],
|
||||
"0.1667": {"pre": [-0.1, 0, 0], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"eyelid_left_closed": {
|
||||
"position": {
|
||||
"0.0": [0.1, 0, 0],
|
||||
"0.1667": {"pre": [0.1, 0, 0], "post": [0, 0, 0]}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.heliolisk.ditto_face": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"eyes": {
|
||||
"scale": 0
|
||||
},
|
||||
"ditto_eye_left": {
|
||||
"position": [0.1, 0, 0]
|
||||
},
|
||||
"ditto_eye_right": {
|
||||
"position": [-0.1, 0, 0]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.heliolisk.frill_test": {
|
||||
"loop": "hold_on_last_frame",
|
||||
"animation_length": 1,
|
||||
"bones": {
|
||||
"torso": {
|
||||
"rotation": {
|
||||
"0.0": [7.5, 0, 0],
|
||||
"0.2917": [7.5, 0, 0],
|
||||
"0.5": [40, 0, 0]
|
||||
}
|
||||
},
|
||||
"tail": {
|
||||
"rotation": [-50, 0, 0]
|
||||
},
|
||||
"tail2": {
|
||||
"rotation": [22.5, 0, 0]
|
||||
},
|
||||
"tail3": {
|
||||
"rotation": [22.5, 0, 0]
|
||||
},
|
||||
"leg_right": {
|
||||
"rotation": [-45, 35, 0]
|
||||
},
|
||||
"foot_right": {
|
||||
"rotation": [-30, 0, 0]
|
||||
},
|
||||
"leg_left": {
|
||||
"rotation": [-45, -15, -15],
|
||||
"position": [1, 0, 0]
|
||||
},
|
||||
"foot_left": {
|
||||
"rotation": [-25, -7.5, 0]
|
||||
},
|
||||
"frill_down_front": {
|
||||
"rotation": [-45, 0, 0]
|
||||
},
|
||||
"frill_down_back": {
|
||||
"rotation": [45, 0, 0]
|
||||
},
|
||||
"frill_down_left": {
|
||||
"rotation": [0, 0, -45]
|
||||
},
|
||||
"frill_down_right": {
|
||||
"rotation": [0, 0, 45]
|
||||
},
|
||||
"arm_left": {
|
||||
"rotation": {
|
||||
"0.0": [1.89098, 19.11433, 44.07649],
|
||||
"0.2917": [1.89, 19.11, 44.08],
|
||||
"0.5": [-90, 0, 17.5]
|
||||
}
|
||||
},
|
||||
"arm_left2": {
|
||||
"rotation": {
|
||||
"0.0": [0, 40, 0],
|
||||
"0.3333": [0, 40, 0],
|
||||
"0.5": [0, 20, 0]
|
||||
}
|
||||
},
|
||||
"hand_left_finger": {
|
||||
"rotation": [0, 0, 22.5]
|
||||
},
|
||||
"hand_left_finger2": {
|
||||
"rotation": [0, 10, 22.5]
|
||||
},
|
||||
"hand_left_finger3": {
|
||||
"rotation": [0, -10, 22.5]
|
||||
},
|
||||
"arm_right": {
|
||||
"rotation": {
|
||||
"0.0": [1.89098, -19.11433, -44.07649],
|
||||
"0.2917": [1.89, -19.11, -44.08],
|
||||
"0.5": [-90, 0, -17.5]
|
||||
}
|
||||
},
|
||||
"arm_right2": {
|
||||
"rotation": {
|
||||
"0.0": [0, -40, 0],
|
||||
"0.3333": [0, -40, 0],
|
||||
"0.5": [0, -20, 0]
|
||||
}
|
||||
},
|
||||
"hand_right_finger": {
|
||||
"rotation": [0, 0, -22.5]
|
||||
},
|
||||
"hand_right_finger2": {
|
||||
"rotation": [0, -10, -22.5]
|
||||
},
|
||||
"hand_right_finger3": {
|
||||
"rotation": [0, 10, -22.5]
|
||||
},
|
||||
"tail4": {
|
||||
"rotation": [22.5, 0, 0]
|
||||
},
|
||||
"tail5": {
|
||||
"rotation": [22.5, 0, 0]
|
||||
},
|
||||
"tail6": {
|
||||
"rotation": [-22.5, 0, 0]
|
||||
},
|
||||
"toes_left": {
|
||||
"rotation": [-15, 0, 0]
|
||||
},
|
||||
"toes_right": {
|
||||
"rotation": [-15, 0, 0]
|
||||
},
|
||||
"torso2": {
|
||||
"rotation": {
|
||||
"0.0": [0, 0, 0],
|
||||
"0.2917": [0, 0, 0],
|
||||
"0.5": [15, 0, 0]
|
||||
}
|
||||
},
|
||||
"frills_down2": {
|
||||
"rotation": {
|
||||
"0.0": [0, 0, 0],
|
||||
"0.2917": [0, 0, 0],
|
||||
"0.3333": [-7.5, 0, 0]
|
||||
},
|
||||
"position": {
|
||||
"0.0": [0, 0, 0],
|
||||
"0.2917": [0, 0, 0],
|
||||
"0.3333": [0, 0.6, 0]
|
||||
},
|
||||
"scale": {
|
||||
"0.0": [1, 1, 1],
|
||||
"0.2917": [1, 1, 1],
|
||||
"0.3333": [2, 0.1, 2],
|
||||
"0.375": {"pre": [2, 0.1, 2], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"hand_left": {
|
||||
"rotation": [0, 0, 22.5],
|
||||
"position": [-0.25, 0, 0]
|
||||
},
|
||||
"hand_right": {
|
||||
"rotation": [0, 0, -22.5],
|
||||
"position": [0.25, 0, 0]
|
||||
},
|
||||
"frills_down3": {
|
||||
"scale": {
|
||||
"0.0": [1, 1, 1],
|
||||
"0.4583": {"pre": [1, 1, 1], "post": [0, 0, 0]}
|
||||
}
|
||||
},
|
||||
"head": {
|
||||
"rotation": {
|
||||
"0.0": [0, 0, 0],
|
||||
"0.2917": [0, 0, 0],
|
||||
"0.5": [-35, 0, 0]
|
||||
}
|
||||
},
|
||||
"jaw": {
|
||||
"rotation": {
|
||||
"0.0": [0, 0, 0],
|
||||
"0.2917": [0, 0, 0],
|
||||
"0.5": [45, 0, 0]
|
||||
}
|
||||
},
|
||||
"frills_open": {
|
||||
"rotation": {
|
||||
"0.0": [0, 0, 0],
|
||||
"0.3333": {
|
||||
"pre": [-55, 0, 0],
|
||||
"post": [-55, 0, 0],
|
||||
"lerp_mode": "catmullrom"
|
||||
},
|
||||
"0.4583": {
|
||||
"post": [0, 0, 0],
|
||||
"lerp_mode": "catmullrom"
|
||||
}
|
||||
},
|
||||
"position": {
|
||||
"0.0": [0, 0, 0],
|
||||
"0.3333": {
|
||||
"pre": [0, -5.25, 0],
|
||||
"post": [0, -5.25, 0],
|
||||
"lerp_mode": "catmullrom"
|
||||
},
|
||||
"0.4583": {
|
||||
"post": [0, 0, 0],
|
||||
"lerp_mode": "catmullrom"
|
||||
}
|
||||
},
|
||||
"scale": {
|
||||
"0.0": [0, 0, 0],
|
||||
"0.3333": {"pre": [0, 0, 0], "post": [1, 1, 1]}
|
||||
}
|
||||
},
|
||||
"leg_left2": {
|
||||
"rotation": [0, -10, 0]
|
||||
},
|
||||
"eye_unamused_left": {
|
||||
"scale": 1
|
||||
},
|
||||
"eye_angry_left": {
|
||||
"scale": 0
|
||||
},
|
||||
"eye_sad_left": {
|
||||
"scale": 0
|
||||
},
|
||||
"eye_happy_left": {
|
||||
"scale": 0
|
||||
},
|
||||
"eye_recoil_left": {
|
||||
"scale": 0
|
||||
},
|
||||
"eye_surprise_left": {
|
||||
"scale": 0
|
||||
},
|
||||
"eye_blink_left": {
|
||||
"scale": 0
|
||||
},
|
||||
"eye_unamused_right": {
|
||||
"scale": 1
|
||||
},
|
||||
"eye_blink_right": {
|
||||
"scale": 0
|
||||
},
|
||||
"eye_angry_right": {
|
||||
"scale": 0
|
||||
},
|
||||
"eye_sad_right": {
|
||||
"scale": 0
|
||||
},
|
||||
"eye_happy_right": {
|
||||
"scale": 0
|
||||
},
|
||||
"eye_recoil_right": {
|
||||
"scale": 0
|
||||
},
|
||||
"eye_surprise_right": {
|
||||
"scale": 0
|
||||
},
|
||||
"frills_down": {
|
||||
"scale": {
|
||||
"0.375": [1, 1, 1],
|
||||
"0.4167": [0, 0, 0]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.heliolisk.happy": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"jaw": {
|
||||
"rotation": [30, 0, 0]
|
||||
},
|
||||
"eyelid_right_neutral": {
|
||||
"position": [0.1, 0, 0]
|
||||
},
|
||||
"eyelid_right_happy": {
|
||||
"position": [-0.1, 0, 0]
|
||||
},
|
||||
"eyelid_left_neutral": {
|
||||
"position": [-0.1, 0, 0]
|
||||
},
|
||||
"eyelid_left_happy": {
|
||||
"position": [0.1, 0, 0]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.heliolisk.angry": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"eyelid_right_neutral": {
|
||||
"position": [0.1, 0, 0]
|
||||
},
|
||||
"eyelid_right_angry": {
|
||||
"position": [-0.1, 0, 0]
|
||||
},
|
||||
"eyelid_left_neutral": {
|
||||
"position": [-0.1, 0, 0]
|
||||
},
|
||||
"eyelid_left_angry": {
|
||||
"position": [0.1, 0, 0]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.heliolisk.sad": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"eyelid_right_neutral": {
|
||||
"position": [0.1, 0, 0]
|
||||
},
|
||||
"eyelid_right_sad": {
|
||||
"position": [-0.1, 0, 0]
|
||||
},
|
||||
"eyelid_left_neutral": {
|
||||
"position": [-0.1, 0, 0]
|
||||
},
|
||||
"eyelid_left_sad": {
|
||||
"position": [0.1, 0, 0]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.heliolisk.hurt": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"jaw": {
|
||||
"rotation": [30, 0, 0]
|
||||
},
|
||||
"eyelid_right_neutral": {
|
||||
"position": [0.1, 0, 0]
|
||||
},
|
||||
"eyelid_right_hit": {
|
||||
"position": [-0.1, 0, 0]
|
||||
},
|
||||
"eyelid_left_neutral": {
|
||||
"position": [-0.1, 0, 0]
|
||||
},
|
||||
"eyelid_left_hit": {
|
||||
"position": [0.1, 0, 0]
|
||||
}
|
||||
}
|
||||
},
|
||||
"animation.heliolisk.annoyed": {
|
||||
"loop": true,
|
||||
"bones": {
|
||||
"eyelid_right_neutral": {
|
||||
"position": [0.1, 0, 0]
|
||||
},
|
||||
"eyelid_right_annoyed": {
|
||||
"position": [-0.1, 0, 0]
|
||||
},
|
||||
"eyelid_left_neutral": {
|
||||
"position": [-0.1, 0, 0]
|
||||
},
|
||||
"eyelid_left_annoyed": {
|
||||
"position": [0.1, 0, 0]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user