convert to use paucal
This commit is contained in:
parent
7765baf98c
commit
53565f83f5
41 changed files with 374 additions and 666 deletions
65
CREDITS.txt
65
CREDITS.txt
|
@ -1,65 +0,0 @@
|
|||
Minecraft Forge: Credits/Thank You
|
||||
|
||||
Forge is a set of tools and modifications to the Minecraft base game code to assist
|
||||
mod developers in creating new and exciting content. It has been in development for
|
||||
several years now, but I would like to take this time thank a few people who have
|
||||
helped it along it's way.
|
||||
|
||||
First, the people who originally created the Forge projects way back in Minecraft
|
||||
alpha. Eloraam of RedPower, and SpaceToad of Buildcraft, without their acceptiance
|
||||
of me taking over the project, who knows what Minecraft modding would be today.
|
||||
|
||||
Secondly, someone who has worked with me, and developed some of the core features
|
||||
that allow modding to be as functional, and as simple as it is, cpw. For developing
|
||||
FML, which stabelized the client and server modding ecosystem. As well as the base
|
||||
loading system that allows us to modify Minecraft's code as elegently as possible.
|
||||
|
||||
Mezz, who has stepped up as the issue and pull request manager. Helping to keep me
|
||||
sane as well as guiding the community into creating better additions to Forge.
|
||||
|
||||
Searge, Bspks, Fesh0r, ProfMobious, and all the rest over on the MCP team {of which
|
||||
I am a part}. For creating some of the core tools needed to make Minecraft modding
|
||||
both possible, and as stable as can be.
|
||||
On that note, here is some specific information of the MCP data we use:
|
||||
* Minecraft Coder Pack (MCP) *
|
||||
Forge Mod Loader and Minecraft Forge have permission to distribute and automatically
|
||||
download components of MCP and distribute MCP data files. This permission is not
|
||||
transitive and others wishing to redistribute the Minecraft Forge source independently
|
||||
should seek permission of MCP or remove the MCP data files and request their users
|
||||
to download MCP separately.
|
||||
|
||||
And lastly, the countless community members who have spent time submitting bug reports,
|
||||
pull requests, and just helping out the community in general. Thank you.
|
||||
|
||||
--LexManos
|
||||
|
||||
=========================================================================
|
||||
|
||||
This is Forge Mod Loader.
|
||||
|
||||
You can find the source code at all times at https://github.com/MinecraftForge/MinecraftForge/tree/1.12.x/src/main/java/net/minecraftforge/fml
|
||||
|
||||
This minecraft mod is a clean open source implementation of a mod loader for minecraft servers
|
||||
and minecraft clients.
|
||||
|
||||
The code is authored by cpw.
|
||||
|
||||
It began by partially implementing an API defined by the client side ModLoader, authored by Risugami.
|
||||
http://www.minecraftforum.net/topic/75440-
|
||||
This support has been dropped as of Minecraft release 1.7, as Risugami no longer maintains ModLoader.
|
||||
|
||||
It also contains suggestions and hints and generous helpings of code from LexManos, author of MinecraftForge.
|
||||
http://www.minecraftforge.net/
|
||||
|
||||
Additionally, it contains an implementation of topological sort based on that
|
||||
published at http://keithschwarz.com/interesting/code/?dir=topological-sort
|
||||
|
||||
It also contains code from the Maven project for performing versioned dependency
|
||||
resolution. http://maven.apache.org/
|
||||
|
||||
It also contains a partial repackaging of the javaxdelta library from http://sourceforge.net/projects/javaxdelta/
|
||||
with credit to it's authors.
|
||||
|
||||
Forge Mod Loader downloads components from the Minecraft Coder Pack
|
||||
(http://mcp.ocean-labs.de/index.php/Main_Page) with kind permission from the MCP team.
|
||||
|
21
build.gradle
21
build.gradle
|
@ -173,6 +173,13 @@ repositories {
|
|||
name = "ModMaven"
|
||||
url = "https://modmaven.dev"
|
||||
}
|
||||
|
||||
maven {
|
||||
url "https://cursemaven.com"
|
||||
content {
|
||||
includeGroup "curse.maven"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
@ -184,17 +191,6 @@ dependencies {
|
|||
minecraft 'net.minecraftforge:forge:1.18.2-40.0.19'
|
||||
annotationProcessor 'org.spongepowered:mixin:0.8.5:processor'
|
||||
|
||||
// Real mod deobf dependency examples - these get remapped to your current mappings
|
||||
// compileOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}:api") // Adds JEI API as a compile dependency
|
||||
// runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}") // Adds the full JEI mod as a runtime dependency
|
||||
// implementation fg.deobf("com.tterrag.registrate:Registrate:MC${mc_version}-${registrate_version}") // Adds registrate as a dependency
|
||||
|
||||
// Examples using mod jars from ./libs
|
||||
// implementation fg.deobf("blank:coolmod-${mc_version}:${coolmod_version}")
|
||||
|
||||
// For more info...
|
||||
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
|
||||
// http://www.gradle.org/docs/current/userguide/dependency_management.html
|
||||
compileOnly fg.deobf("vazkii.patchouli:Patchouli:1.18.2-66:api")
|
||||
runtimeOnly fg.deobf("vazkii.patchouli:Patchouli:1.18.2-66")
|
||||
|
||||
|
@ -202,6 +198,9 @@ dependencies {
|
|||
compileOnly fg.deobf("mezz.jei:jei-1.18.2:9.5.3.143:api")
|
||||
// at runtime, use the full JEI jar
|
||||
runtimeOnly fg.deobf("mezz.jei:jei-1.18.2:9.5.3.143")
|
||||
|
||||
compileOnly fg.deobf("curse.maven:paucal-597824:3711583")
|
||||
runtimeOnly fg.deobf("curse.maven:paucal-597824:3711583")
|
||||
}
|
||||
|
||||
mixin {
|
||||
|
|
142
changelog.txt
142
changelog.txt
|
@ -1,142 +0,0 @@
|
|||
Build: 1.18.1-39.0.8 - Wed Dec 22 13:22:32 GMT 2021
|
||||
JTK222:
|
||||
Fixed incorrect generic in PermissionAPI (#8317)
|
||||
|
||||
=========
|
||||
Build: 1.18.1-39.0.7 - Mon Dec 20 18:35:11 GMT 2021
|
||||
JTK222:
|
||||
Redo of the whole PermissionAPI (#7780)
|
||||
|
||||
|
||||
|
||||
Co-authored-by: LexManos <LexManos@gmail.com>
|
||||
|
||||
=========
|
||||
Build: 1.18.1-39.0.6 - Sun Dec 19 18:28:43 GMT 2021
|
||||
JTK222:
|
||||
Fix misplaced patch in SpreadingSnowyDirtBlock.
|
||||
|
||||
Fixes #8308.
|
||||
|
||||
=========
|
||||
Build: 1.18.1-39.0.5 - Mon Dec 13 21:58:30 GMT 2021
|
||||
pupnewfster:
|
||||
Add RenderArmEvent to make overriding just the arm rendering not require copying nearly as much vanilla code (#8254)
|
||||
|
||||
=========
|
||||
Build: 1.18.1-39.0.4 - Mon Dec 13 21:32:20 GMT 2021
|
||||
bageldotjpg:
|
||||
Add MobEffect tags (#8231)
|
||||
|
||||
=========
|
||||
Build: 1.18.1-39.0.3 - Mon Dec 13 19:49:00 GMT 2021
|
||||
xfacthd:
|
||||
Log missing or unsupported dependencies (#8218)
|
||||
|
||||
=========
|
||||
Build: 1.18.1-39.0.2 - Mon Dec 13 19:33:05 GMT 2021
|
||||
sciwhiz12:
|
||||
Fix datagen test for sounds definitions provider (#8249)
|
||||
|
||||
=========
|
||||
Build: 1.18.1-39.0.1 - Mon Dec 13 19:14:15 GMT 2021
|
||||
williewillus:
|
||||
Fix wrong stage being declared in transition to common (#8267)
|
||||
|
||||
=========
|
||||
Build: 1.18.1-39.0.0 - Fri Dec 10 19:32:24 GMT 2021
|
||||
curle:
|
||||
Update to 1.18.1
|
||||
|
||||
Co-Authored by:
|
||||
- Curle
|
||||
_ Orion
|
||||
|
||||
=========
|
||||
Build: 1.18-38.0.17 - Fri Dec 10 09:23:45 GMT 2021
|
||||
oriondevelopment:
|
||||
[CVE-2021-44228]: Update Log4J to fix the security issue inside it. (#8268)
|
||||
|
||||
=========
|
||||
Build: 1.18-38.0.16 - Wed Dec 08 00:09:40 GMT 2021
|
||||
jaredlll08:
|
||||
Fix KeyMappings only checking if they conflict with themselves. (#8256)
|
||||
|
||||
=========
|
||||
Build: 1.18-38.0.15 - Sun Dec 05 19:40:15 GMT 2021
|
||||
xfacthd:
|
||||
Fix ChunkWatchEvent not being fired (#8253)
|
||||
|
||||
=========
|
||||
Build: 1.18-38.0.14 - Sat Dec 04 01:30:30 GMT 2021
|
||||
git:
|
||||
Call handleUpdateTag for BlockEntities again (#8237)
|
||||
|
||||
=========
|
||||
Build: 1.18-38.0.13 - Fri Dec 03 22:10:25 GMT 2021
|
||||
commoble:
|
||||
Fix test worldgen data (#8248)
|
||||
|
||||
=========
|
||||
Build: 1.18-38.0.12 - Thu Dec 02 20:16:47 GMT 2021
|
||||
lexmanos:
|
||||
Allow Forge Registries to return key information for overridden objects. Fixes #8230
|
||||
|
||||
=========
|
||||
Build: 1.18-38.0.11 - Thu Dec 02 19:17:12 GMT 2021
|
||||
curle:
|
||||
Save Chunk capabilities to the chunk, rather than recursively to the capabilities.
|
||||
|
||||
=========
|
||||
Build: 1.18-38.0.10 - Thu Dec 02 15:24:47 GMT 2021
|
||||
gigaherz:
|
||||
Make HandshakeConsumer public again.
|
||||
Fixes #8241
|
||||
|
||||
gigaherz:
|
||||
Fix LevelChunk capability attach crash.
|
||||
Fix client chunks not having capability providers attached.
|
||||
Add capability attach tests.
|
||||
|
||||
=========
|
||||
Build: 1.18-38.0.8 - Thu Dec 02 00:44:15 GMT 2021
|
||||
curle:
|
||||
Add missing biomes back to the BiomeDictionary
|
||||
|
||||
curle:
|
||||
Complete TODO in ShapedRecipe patch causing logspam related to minecraft:air
|
||||
|
||||
=========
|
||||
Build: 1.18-38.0.6 - Wed Dec 01 22:12:05 GMT 2021
|
||||
curle:
|
||||
Readd Mixin 0.8.5 to fix modules issues.
|
||||
|
||||
=========
|
||||
Build: 1.18-38.0.5 - Wed Dec 01 16:56:24 GMT 2021
|
||||
curle:
|
||||
Readd PoseStack field to RenderTooltipEvent.
|
||||
|
||||
=========
|
||||
Build: 1.18-38.0.4 - Wed Dec 01 01:29:57 GMT 2021
|
||||
curle:
|
||||
Fix custom loot serializers using wrong registry names
|
||||
|
||||
=========
|
||||
Build: 1.18-38.0.3 - Wed Dec 01 01:15:13 GMT 2021
|
||||
lexmanos:
|
||||
Fix DungeonHooks not returning correct values. Fixes dungeons in world spawning pigs.
|
||||
|
||||
=========
|
||||
Build: 1.18-38.0.2 - Wed Dec 01 00:23:23 GMT 2021
|
||||
lexmanos:
|
||||
Fix dedicated server install. Closes #8226
|
||||
Fix example mod
|
||||
Fix obf issue with records. Closes #8228
|
||||
Fix dependencies beingg out of sync from vanilla. Closes #8227
|
||||
Disable mixin due to module incompatibility.
|
||||
|
||||
=========
|
||||
Build: 1.18-38.0.1 - Tue Nov 30 20:56:52 GMT 2021
|
||||
gigaherz:
|
||||
Fix mod resources not loading.
|
||||
Add BreakingItemParticle.java.patch which I forgot to commit during the porting.
|
|
@ -1,88 +0,0 @@
|
|||
# The version of night-config Forge packages still has this bug:
|
||||
# https://github.com/TheElectronWill/night-config/issues/96
|
||||
# So we use int codes. aa.
|
||||
|
||||
# Also we use UUID keys, this way we can just store the UUID with a block.
|
||||
# https://gameplay.tools/minecraft/uuid
|
||||
|
||||
# == Devs ==
|
||||
|
||||
# petra_the_kat
|
||||
["a2ce9382-2518-4752-87b2-c6a5c97f173e"]
|
||||
# colorizer = [0xebad1c, 0xc7c7bd, 0x7c2e94, 0x2e060f]
|
||||
colorizer = [15445276, 13092797, 8138388, 3016207]
|
||||
|
||||
# AmyMialee
|
||||
["2793cdc6-7710-4e7e-9d81-cf918e067729"]
|
||||
#colorizer = [0xb992ff]
|
||||
colorizer = [12161791]
|
||||
|
||||
# Alwinfy
|
||||
["64f6e5fc-981c-442c-8d6a-578e8e8cbcd3"]
|
||||
#colorizer = [0x3327e3]
|
||||
colorizer = [3352547]
|
||||
|
||||
# Noobulus
|
||||
["89719de3-6445-4445-abe2-509659db930d"]
|
||||
#colorizer = [0x92a1ff, 0x6b7fff]
|
||||
colorizer = [6548735, 16752895]
|
||||
|
||||
# Hubry
|
||||
["b0a26f6b-d951-4b65-b824-b164b9bc4b90"]
|
||||
# 0x10e810, 0xe97dff, 0x33ffff
|
||||
colorizer = [1107984, 15302143, 3407871]
|
||||
|
||||
# Dev (the forge dummy player)
|
||||
["380df991-f603-344c-a090-369bad2a924a"]
|
||||
# 0xff0000 0x00ff00 0x0000ff
|
||||
# For testing purposes
|
||||
colorizer = [16711680, 65280, 255]
|
||||
|
||||
# Todo:
|
||||
# Jane (also get her IGN)
|
||||
# Falkory
|
||||
|
||||
# == Cool People ==
|
||||
|
||||
# Hudeler
|
||||
["23978392-a78c-49cf-9f52-35a151fd4083"]
|
||||
#colorizer = [0x825ec2]
|
||||
colorizer = [8543938]
|
||||
|
||||
# nbyzantine
|
||||
["e055cae1-dd93-42b7-abad-8f2dc758a9f2"]
|
||||
# dfe0e8 f2da00 e66910 383138
|
||||
colorizer = [14672104, 15915520, 15100176, 3682616]
|
||||
|
||||
# Todo:
|
||||
# wiresegal
|
||||
# SleepyEmber
|
||||
|
||||
# == Quote Contest Winners ==
|
||||
|
||||
# Ical92
|
||||
["d682d4df-e2eb-4b62-b41e-23becc7e01e5"]
|
||||
# cf0a8a
|
||||
colorizer = [13568650]
|
||||
|
||||
# Goldgamesav
|
||||
["b34b707a-8429-4dbd-a7a2-a208cf2268b8"]
|
||||
# ff3939 ffd543 fffc43 ffffe3
|
||||
colorizer = [16726329, 16766275, 16776259, 16777187]
|
||||
|
||||
# WildOats (stevebutnottoomanypeoplehaveit)
|
||||
["968e572c-a6c1-4963-8399-0c64abd3820e"]
|
||||
# 5f118a 411db8
|
||||
colorizer = [6230410, 4267448]
|
||||
|
||||
# taswin
|
||||
["816bedca-0bfa-4239-8b36-d234463b9c33"]
|
||||
# 0x800300, 0x5f5f5f
|
||||
colorizer = [8389376, 6250335]
|
||||
|
||||
# MacyMacerator
|
||||
["29a10dc6-a201-4993-80d8-c847212bc92b"]
|
||||
colorizer = [25, 13948159, 20]
|
||||
|
||||
# Todo:
|
||||
# artemisSystem
|
|
@ -132,7 +132,7 @@ cc66962ddeef9b9c3a623eef178b352605f1c922 assets/hexcasting/models/item/slate_blo
|
|||
eeaa26fe380975188cd2d6a93bd5e324dc509767 assets/hexcasting/models/item/trinket_filled.json
|
||||
c534699d2cd118163b43d4a2557f2a7b1e5cc0b6 assets/hexcasting/models/item/uuid_colorizer.json
|
||||
5847c79fce9ef3fd26b03b80d586beed6ff4c354 assets/hexcasting/models/item/wand.json
|
||||
a2cee8e7d2149294538d0d4d9e32d8235f194229 data/forge/loot_modifiers/global_loot_modifiers.json
|
||||
d6302438f2b411d520f5a9347b18e76c32dd1a79 data/forge/loot_modifiers/global_loot_modifiers.json
|
||||
b6593ea802a692c29b5032292df31beb84878ad8 data/hexcasting/advancements/aaa_wasteful_cast.json
|
||||
4f4c94021adfb296e3ef3dce1acc46f724f38f92 data/hexcasting/advancements/aab_big_cast.json
|
||||
a165e3959b7d0c37bea586d0e94609b483255569 data/hexcasting/advancements/enlightenment.json
|
||||
|
@ -141,7 +141,7 @@ eb6393ffc79966e4b5983a68157742b78cd12414 data/hexcasting/advancements/opened_eye
|
|||
d225f90cc1e3b8200014106cd2d3bede9c783817 data/hexcasting/advancements/recipes/brainsweep/brainsweep/impetus_rightclick.json
|
||||
47000a9b5a409038e369dbef156a72ec93cb51db data/hexcasting/advancements/recipes/hexcasting/abacus.json
|
||||
5a17fa9a1496f5fbedd0362f94a5231e0e5ebbfc data/hexcasting/advancements/recipes/hexcasting/ageing_scroll_paper_lantern.json
|
||||
a0d1b5723e0a602676a77a4cd27d9664d56e9e4b data/hexcasting/advancements/recipes/hexcasting/amethyst_dust_block.json
|
||||
ddd7bd92b9e1586cebd2cee658315a9336a80a76 data/hexcasting/advancements/recipes/hexcasting/amethyst_dust_packing.json
|
||||
e5ae652aee1567ac2e626fa0f88f160993a6f9a5 data/hexcasting/advancements/recipes/hexcasting/amethyst_dust_unpacking.json
|
||||
337c4370fd24b66a6b4b3f6c296a33d9a799034e data/hexcasting/advancements/recipes/hexcasting/amethyst_sconce.json
|
||||
563cb6dda9c55864f141f2ec0ecd2a2b95f57237 data/hexcasting/advancements/recipes/hexcasting/amethyst_tiles.json
|
||||
|
@ -196,29 +196,37 @@ eb17a23e7a9543f33922c056cdf0d63def176bf2 data/hexcasting/advancements/recipes/he
|
|||
cfd93238a1774a30a9da7c6b84e66c2e1e22f243 data/hexcasting/advancements/recipes/hexcasting/wand.json
|
||||
d31956749bebbcb3f0d3c37f89b569642ac8c2fb data/hexcasting/advancements/root.json
|
||||
739cbdf7f204132f2acfab4df8d21c6197aa1456 data/hexcasting/advancements/y_u_no_cast_angy.json
|
||||
0026293d7365142676971a5c786005b00171c765 data/hexcasting/loot_modifiers/amethyst_cluster.json
|
||||
fb4960e9cae41d83a6fe67bf8ef12671a3465d0d data/hexcasting/loot_modifiers/amethyst_cluster_charged.json
|
||||
5b724ddf71a6c42e11689c6dd360d3ead562482f data/hexcasting/loot_modifiers/amethyst_cluster_dust.json
|
||||
e04be385fa9daa422e41a38ddd70fdd065107968 data/hexcasting/loot_modifiers/scroll_bastion.json
|
||||
6569766d1579114149eb0a1154d05ec3c964b2a3 data/hexcasting/loot_modifiers/scroll_cartographer.json
|
||||
afecba3144e00505977a4ab4de7940f949ab7818 data/hexcasting/loot_modifiers/scroll_dungeon.json
|
||||
0e8c8a56161586a4021487b27059ca151465af67 data/hexcasting/loot_modifiers/scroll_jungle.json
|
||||
50e7ad657a0ab43f3bd632120e09f109791aaf34 data/hexcasting/loot_modifiers/scroll_shipwreck.json
|
||||
7ffa361bd8a108b504fe450749b42997dc898e5e data/hexcasting/loot_modifiers/scroll_stronghold_library.json
|
||||
41d666145104483214c0256958b14724e60a036b data/hexcasting/loot_tables/blocks/amethyst_dust_block.json
|
||||
967b64670e7d98b6c46779da68c245ee539ba375 data/hexcasting/loot_tables/blocks/amethyst_sconce.json
|
||||
79421f4528355837d12fbfcccb19e08a1eb40bff data/hexcasting/loot_tables/blocks/amethyst_tiles.json
|
||||
558ce469f2bcbf8f0498815b6b4c1fd4f2bfbc2b data/hexcasting/loot_tables/blocks/ancient_scroll_paper.json
|
||||
4ba256a96d6794214775c6ea94074f03ace6cb90 data/hexcasting/loot_tables/blocks/ancient_scroll_paper_lantern.json
|
||||
5944235a01e31fbe3f2799f667b6deb2f8a62ca6 data/hexcasting/loot_tables/blocks/empty_impetus.json
|
||||
c87dcdb39d1d9cb0429763bbd32631cbf15047aa data/hexcasting/loot_tables/blocks/impetus_rightclick.json
|
||||
e66ddc68e90e5e779f273a8d081c2f63e81d6698 data/hexcasting/loot_tables/blocks/scroll_paper.json
|
||||
fd662ce6977b96065bd438ff332bc5b9f62560e6 data/hexcasting/loot_tables/blocks/scroll_paper_lantern.json
|
||||
17e53b980127473558a1a544e59d329a4701e7cc data/hexcasting/loot_tables/blocks/slate.json
|
||||
33b4d5e6928828898fea92523f7cb81f9b4eac36 data/hexcasting/loot_tables/blocks/slate_block.json
|
||||
6b4459635b3d53cc2b6836fa97d29244a65b412d data/hexcasting/recipes/abacus.json
|
||||
1f0c9a98d97fb81e1f504cdb6619a3dfab52ba5f data/hexcasting/recipes/ageing_scroll_paper_lantern.json
|
||||
dd14358e5bc1a5a3e5aca1631a090a98ed02acd8 data/hexcasting/recipes/amethyst_dust_block.json
|
||||
0a9df75d350505150da20b6c19919e56d41e01ed data/hexcasting/recipes/amethyst_dust_packing.json
|
||||
91bb341776ce64a68e1c4200aa8f5b2fa6669820 data/hexcasting/recipes/amethyst_dust_unpacking.json
|
||||
85033316221c8d697569458a850dae433be0153c data/hexcasting/recipes/amethyst_sconce.json
|
||||
c0c0eeece7140629344b51d290acd580307a8b76 data/hexcasting/recipes/amethyst_tiles.json
|
||||
4b3f5fe572ec06feab786e3ba93b0d80b145dd69 data/hexcasting/recipes/amethyst_sconce.json
|
||||
e5c835d3866e8f5ecfb03c9e7c2c134a50951d67 data/hexcasting/recipes/amethyst_tiles.json
|
||||
0662d191ec9416e2c3c86962628d3bfbd11bc01f data/hexcasting/recipes/ancient_scroll_paper.json
|
||||
223a864056a893e753aa43d734d6f8b93004d930 data/hexcasting/recipes/ancient_scroll_paper_lantern.json
|
||||
3f9756b2c5137b285c4faa88ab43c4996b6b2bb6 data/hexcasting/recipes/ancient_scroll_paper_lantern.json
|
||||
6e6e4d01097c10316892e274f33cb0faaf9dc0df data/hexcasting/recipes/artifact.json
|
||||
2f8404bf839fa109f0eb157704721d5a5734a4e1 data/hexcasting/recipes/brainsweep/budding_amethyst.json
|
||||
9631f6616c6a63c9e0a9eaa8126e2f116636fab5 data/hexcasting/recipes/brainsweep/impetus_rightclick.json
|
||||
27164ae64cf43091f25946cc15dfcace2c903b2b data/hexcasting/recipes/cypher.json
|
||||
ea32d82fc3f2cb974038c311a3538aae481ea4c0 data/hexcasting/recipes/cypher.json
|
||||
33fed8fb8e34df026e1eea0df8161c7f842a8648 data/hexcasting/recipes/dye_colorizer_black.json
|
||||
c36caf44a941a4abc44a15141eba8fe634c76fb8 data/hexcasting/recipes/dye_colorizer_blue.json
|
||||
91348d69c8a49eae2bbaf9fb00b9604c43716527 data/hexcasting/recipes/dye_colorizer_brown.json
|
||||
|
@ -237,8 +245,8 @@ bc79add419b8791e68b35076355fea11dfc640c6 data/hexcasting/recipes/dye_colorizer_w
|
|||
c5341777604a4be5a311e300a4de89967b7caad2 data/hexcasting/recipes/dye_colorizer_yellow.json
|
||||
db8a00478e1c4b0f9b143b5946d1ba25e489591d data/hexcasting/recipes/dynamic/seal_focus.json
|
||||
b7c248d2627c2a2b398d1c50181c1e0863612424 data/hexcasting/recipes/empty_impetus.json
|
||||
91d690ba6ad40da05111aff1ea5804c859618986 data/hexcasting/recipes/focus.json
|
||||
3a47933ad88386e7e70712d9db682f0a987afeda data/hexcasting/recipes/lens.json
|
||||
7eaf7ee280d1982ecbaf5175cea5c5a7c7804f98 data/hexcasting/recipes/focus.json
|
||||
9f82cc7aa432ea290a9c76f924b72d5d3e2c4900 data/hexcasting/recipes/lens.json
|
||||
0ea329526c81c1e4064bab61721ab4586cfcf706 data/hexcasting/recipes/pride_colorizer_0.json
|
||||
c742a0a5fba2388263bfccfb49c60277d817f8cd data/hexcasting/recipes/pride_colorizer_1.json
|
||||
855d1421063c24b2d1507f90f378f51261111d84 data/hexcasting/recipes/pride_colorizer_10.json
|
||||
|
@ -254,15 +262,15 @@ c7c7fa49b7d1f0d03cd753f1ba78aa05a68135d0 data/hexcasting/recipes/pride_colorizer
|
|||
03504ac1cc40ece1097e46a8244b7cfb4b32014c data/hexcasting/recipes/pride_colorizer_8.json
|
||||
3a12c82f29953ee4131a0b49c1b35999c2779019 data/hexcasting/recipes/pride_colorizer_9.json
|
||||
56d35172b3c5a58e2be4c5be20dd69417685f5d9 data/hexcasting/recipes/scroll.json
|
||||
4aaec5f85c47f0754ceeedb7af1ae9a2fa19f4d1 data/hexcasting/recipes/scroll_paper.json
|
||||
a3278c0bc104d0d7f4827ef516ade111a1c2ead0 data/hexcasting/recipes/scroll_paper_lantern.json
|
||||
ccf4ea841ea9a66738253385c659ff86c85a73f5 data/hexcasting/recipes/scroll_paper.json
|
||||
5c471f81cc168826f1652a39a71aeb85e786ea16 data/hexcasting/recipes/scroll_paper_lantern.json
|
||||
f3a33396e071f3afd61eadab2aabdb9acf2ae775 data/hexcasting/recipes/slate.json
|
||||
2630d1471512bc7e26115cd04fd532c925f09a5f data/hexcasting/recipes/slate_block.json
|
||||
09e80537530ed51b6792f16fe8b32448e89dc334 data/hexcasting/recipes/slate_block.json
|
||||
6f5c41ab9f87ec1206efaaab8d91adc766bb79fd data/hexcasting/recipes/slate_block_from_slates.json
|
||||
4f06f5f4ae181c8bb6b993d7b6047cd9ca7afbce data/hexcasting/recipes/spellbook.json
|
||||
ef936e73eea3be9d53c4ac5c78d1477675550375 data/hexcasting/recipes/stonecutting/amethyst_tiles.json
|
||||
d14cf2f8f0895a5b6dc09b7582c0abf1c2514adf data/hexcasting/recipes/sub_sandwich.json
|
||||
33b9d3a5e65343fc0e442e17d55a1eaa08943c8f data/hexcasting/recipes/trinket.json
|
||||
7716dd89b2c4141dd7ecdb9f6adefe694ff22d70 data/hexcasting/recipes/trinket.json
|
||||
14d6be5d47b54676a349564ea32c045c76c39b45 data/hexcasting/recipes/uuid_colorizer.json
|
||||
0521d57838cb3e9795fc02ce47aa58db3b0188f9 data/hexcasting/recipes/wand.json
|
||||
f930dbc5b41d42150d388e39b29b940229658809 data/minecraft/tags/blocks/crystal_sound_blocks.json
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
{
|
||||
"replace": false,
|
||||
"entries": [
|
||||
"hexcasting:amethyst_cluster_charged",
|
||||
"hexcasting:scroll_bastion",
|
||||
"hexcasting:amethyst_cluster",
|
||||
"hexcasting:amethyst_cluster_dust",
|
||||
"hexcasting:scroll_dungeon",
|
||||
"hexcasting:scroll_stronghold_library",
|
||||
"hexcasting:scroll_jungle",
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"parent": "minecraft:recipes/root",
|
||||
"rewards": {
|
||||
"recipes": [
|
||||
"hexcasting:amethyst_dust_block"
|
||||
"hexcasting:amethyst_dust_packing"
|
||||
]
|
||||
},
|
||||
"criteria": {
|
||||
|
@ -21,7 +21,7 @@
|
|||
"has_the_recipe": {
|
||||
"trigger": "minecraft:recipe_unlocked",
|
||||
"conditions": {
|
||||
"recipe": "hexcasting:amethyst_dust_block"
|
||||
"recipe": "hexcasting:amethyst_dust_packing"
|
||||
}
|
||||
}
|
||||
},
|
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "forge:loot_table_id",
|
||||
"loot_table_id": "minecraft:blocks/amethyst_cluster"
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:inverted",
|
||||
"term": {
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:table_bonus",
|
||||
"enchantment": "minecraft:fortune",
|
||||
"chances": [
|
||||
0.2,
|
||||
0.4,
|
||||
0.6,
|
||||
0.8
|
||||
]
|
||||
}
|
||||
],
|
||||
"item": "hexcasting:charged_amethyst",
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:set_count",
|
||||
"count": 1.0,
|
||||
"add": false
|
||||
}
|
||||
],
|
||||
"type": "paucal:add_item"
|
||||
}
|
|
@ -18,6 +18,13 @@
|
|||
}
|
||||
}
|
||||
],
|
||||
"chargedChance": 0.9,
|
||||
"type": "hexcasting:amethyst_cluster"
|
||||
"item": "hexcasting:amethyst_dust",
|
||||
"functions": [
|
||||
{
|
||||
"function": "minecraft:apply_bonus",
|
||||
"enchantment": "minecraft:fortune",
|
||||
"formula": "minecraft:ore_drops"
|
||||
}
|
||||
],
|
||||
"type": "paucal:add_item"
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"name": "amethyst_dust_block",
|
||||
"rolls": 1.0,
|
||||
"bonus_rolls": 0.0,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "hexcasting:amethyst_dust_block"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"name": "amethyst_sconce",
|
||||
"rolls": 1.0,
|
||||
"bonus_rolls": 0.0,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "hexcasting:amethyst_sconce"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"name": "amethyst_tiles",
|
||||
"rolls": 1.0,
|
||||
"bonus_rolls": 0.0,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "hexcasting:amethyst_tiles"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"name": "ancient_scroll_paper",
|
||||
"rolls": 1.0,
|
||||
"bonus_rolls": 0.0,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "hexcasting:ancient_scroll_paper"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"name": "ancient_scroll_paper_lantern",
|
||||
"rolls": 1.0,
|
||||
"bonus_rolls": 0.0,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "hexcasting:ancient_scroll_paper_lantern"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"name": "scroll_paper",
|
||||
"rolls": 1.0,
|
||||
"bonus_rolls": 0.0,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "hexcasting:scroll_paper"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"name": "scroll_paper_lantern",
|
||||
"rolls": 1.0,
|
||||
"bonus_rolls": 0.0,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "hexcasting:scroll_paper_lantern"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,11 +1,12 @@
|
|||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"AA",
|
||||
"AA"
|
||||
"XX",
|
||||
"XX",
|
||||
"XX"
|
||||
],
|
||||
"key": {
|
||||
"A": {
|
||||
"X": {
|
||||
"item": "hexcasting:amethyst_dust"
|
||||
}
|
||||
},
|
|
@ -1,14 +1,14 @@
|
|||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"A",
|
||||
"C"
|
||||
"T",
|
||||
"B"
|
||||
],
|
||||
"key": {
|
||||
"A": {
|
||||
"T": {
|
||||
"item": "hexcasting:charged_amethyst"
|
||||
},
|
||||
"C": {
|
||||
"B": {
|
||||
"tag": "forge:ingots/copper"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,15 +1,18 @@
|
|||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"AAA",
|
||||
"ADA",
|
||||
"AAA"
|
||||
"DCD",
|
||||
"CIC",
|
||||
"DCD"
|
||||
],
|
||||
"key": {
|
||||
"A": {
|
||||
"C": {
|
||||
"item": "minecraft:amethyst_block"
|
||||
},
|
||||
"D": {
|
||||
"item": "minecraft:amethyst_block"
|
||||
},
|
||||
"I": {
|
||||
"item": "hexcasting:amethyst_dust"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"P",
|
||||
"T"
|
||||
"T",
|
||||
"B"
|
||||
],
|
||||
"key": {
|
||||
"P": {
|
||||
"T": {
|
||||
"item": "hexcasting:ancient_scroll_paper"
|
||||
},
|
||||
"T": {
|
||||
"B": {
|
||||
"item": "minecraft:torch"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,15 +1,18 @@
|
|||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
" F ",
|
||||
"FAF",
|
||||
" F "
|
||||
"DCD",
|
||||
"CIC",
|
||||
"DCD"
|
||||
],
|
||||
"key": {
|
||||
"F": {
|
||||
"item": "minecraft:copper_ingot"
|
||||
"C": {
|
||||
"tag": "forge:ingots/copper"
|
||||
},
|
||||
"A": {
|
||||
"D": {
|
||||
"tag": "forge:ingots/copper"
|
||||
},
|
||||
"I": {
|
||||
"item": "hexcasting:amethyst_dust"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"LQL",
|
||||
"QAQ",
|
||||
"LQL"
|
||||
"DCD",
|
||||
"CIC",
|
||||
"DCD"
|
||||
],
|
||||
"key": {
|
||||
"L": {
|
||||
"tag": "forge:leather"
|
||||
},
|
||||
"Q": {
|
||||
"C": {
|
||||
"tag": "forge:dusts/glowstone"
|
||||
},
|
||||
"A": {
|
||||
"D": {
|
||||
"tag": "forge:leather"
|
||||
},
|
||||
"I": {
|
||||
"item": "hexcasting:charged_amethyst"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,15 +1,18 @@
|
|||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
" G ",
|
||||
"GAG",
|
||||
" G "
|
||||
"DCD",
|
||||
"CIC",
|
||||
"DCD"
|
||||
],
|
||||
"key": {
|
||||
"G": {
|
||||
"tag": "forge:glass"
|
||||
"C": {
|
||||
"item": "minecraft:glass"
|
||||
},
|
||||
"A": {
|
||||
"D": {
|
||||
"item": "minecraft:glass"
|
||||
},
|
||||
"I": {
|
||||
"item": "hexcasting:amethyst_dust"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,15 +1,18 @@
|
|||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"PPP",
|
||||
"PAP",
|
||||
"PPP"
|
||||
"DCD",
|
||||
"CIC",
|
||||
"DCD"
|
||||
],
|
||||
"key": {
|
||||
"P": {
|
||||
"C": {
|
||||
"item": "minecraft:paper"
|
||||
},
|
||||
"A": {
|
||||
"D": {
|
||||
"item": "minecraft:paper"
|
||||
},
|
||||
"I": {
|
||||
"item": "minecraft:amethyst_shard"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"P",
|
||||
"T"
|
||||
"T",
|
||||
"B"
|
||||
],
|
||||
"key": {
|
||||
"P": {
|
||||
"T": {
|
||||
"item": "hexcasting:scroll_paper"
|
||||
},
|
||||
"T": {
|
||||
"B": {
|
||||
"item": "minecraft:torch"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,15 +1,18 @@
|
|||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"SSS",
|
||||
"SAS",
|
||||
"SSS"
|
||||
"DCD",
|
||||
"CIC",
|
||||
"DCD"
|
||||
],
|
||||
"key": {
|
||||
"S": {
|
||||
"C": {
|
||||
"item": "minecraft:deepslate"
|
||||
},
|
||||
"A": {
|
||||
"D": {
|
||||
"item": "minecraft:deepslate"
|
||||
},
|
||||
"I": {
|
||||
"item": "hexcasting:amethyst_dust"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,15 +1,18 @@
|
|||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
" F ",
|
||||
"FAF",
|
||||
" F "
|
||||
"DCD",
|
||||
"CIC",
|
||||
"DCD"
|
||||
],
|
||||
"key": {
|
||||
"F": {
|
||||
"C": {
|
||||
"tag": "forge:ingots/iron"
|
||||
},
|
||||
"A": {
|
||||
"D": {
|
||||
"tag": "forge:ingots/iron"
|
||||
},
|
||||
"I": {
|
||||
"item": "minecraft:amethyst_shard"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package at.petrak.hexcasting
|
||||
|
||||
import at.petrak.hexcasting.client.*
|
||||
import at.petrak.hexcasting.common.ContributorList
|
||||
import at.petrak.hexcasting.common.blocks.HexBlocks
|
||||
import at.petrak.hexcasting.common.casting.RegisterPatterns
|
||||
import at.petrak.hexcasting.common.casting.operators.spells.great.OpFlight
|
||||
|
@ -90,7 +89,6 @@ object HexMod {
|
|||
|
||||
// and then things that don't require busses
|
||||
HexMessages.register()
|
||||
ContributorList.loadContributors()
|
||||
|
||||
ModLoadingContext.get().registerConfig(ModConfig.Type.COMMON, CONFIG_SPEC)
|
||||
ModLoadingContext.get().registerConfig(ModConfig.Type.CLIENT, CLIENT_CONFIG_SPEC)
|
||||
|
|
|
@ -1,54 +0,0 @@
|
|||
package at.petrak.hexcasting.common
|
||||
|
||||
import at.petrak.hexcasting.HexMod
|
||||
import com.electronwill.nightconfig.core.AbstractConfig
|
||||
import com.electronwill.nightconfig.toml.TomlParser
|
||||
import net.minecraft.DefaultUncaughtExceptionHandler
|
||||
import java.io.IOException
|
||||
import java.net.URL
|
||||
import java.util.*
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
|
||||
object ContributorList {
|
||||
private val contributors = ConcurrentHashMap<UUID, ContributorInfo>()
|
||||
private var startedLoading = false
|
||||
|
||||
@JvmStatic
|
||||
fun getContributor(uuid: UUID): ContributorInfo? =
|
||||
this.contributors[uuid]
|
||||
|
||||
|
||||
fun loadContributors() {
|
||||
if (!startedLoading) {
|
||||
val thread = Thread(this::fetch)
|
||||
thread.name = "Hexcasting Contributor Fanciness Thread"
|
||||
thread.isDaemon = true
|
||||
thread.uncaughtExceptionHandler = DefaultUncaughtExceptionHandler(HexMod.getLogger())
|
||||
thread.start()
|
||||
|
||||
startedLoading = true
|
||||
}
|
||||
}
|
||||
|
||||
fun fetch() {
|
||||
try {
|
||||
val url = URL("https://raw.githubusercontent.com/gamma-delta/HexMod/main/contributors.toml")
|
||||
val toml = TomlParser().parse(url).unmodifiable()
|
||||
|
||||
val keys = toml.valueMap().keys
|
||||
for (key in keys) {
|
||||
val infoRaw: AbstractConfig = toml.get(key)
|
||||
val info = ContributorInfo(
|
||||
infoRaw.get<ArrayList<Int>>("colorizer").stream().mapToInt { i -> i or 0xFF_000000.toInt() }
|
||||
.toArray()
|
||||
)
|
||||
contributors[UUID.fromString(key)] = info
|
||||
}
|
||||
HexMod.getLogger().info("Loaded ${contributors.size} contributors!")
|
||||
} catch (e: IOException) {
|
||||
HexMod.getLogger().info("Couldn't load contributors.toml. Nothing to be done, carry on...\n$e")
|
||||
}
|
||||
}
|
||||
|
||||
data class ContributorInfo(val colorizer: IntArray)
|
||||
}
|
|
@ -2,6 +2,7 @@ package at.petrak.hexcasting.common.blocks;
|
|||
|
||||
import at.petrak.hexcasting.common.casting.colors.FrozenColorizer;
|
||||
import at.petrak.hexcasting.common.particles.ConjureParticleOptions;
|
||||
import at.petrak.paucal.api.PaucalBlockEntity;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
|
@ -10,7 +11,7 @@ import net.minecraft.world.phys.Vec3;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockEntityConjured extends ModBlockEntity {
|
||||
public class BlockEntityConjured extends PaucalBlockEntity {
|
||||
private static final Random RANDOM = new Random();
|
||||
private FrozenColorizer colorizer = FrozenColorizer.DEFAULT;
|
||||
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
package at.petrak.hexcasting.common.blocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.protocol.Packet;
|
||||
import net.minecraft.network.protocol.game.ClientGamePacketListener;
|
||||
import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public abstract class ModBlockEntity extends BlockEntity {
|
||||
public ModBlockEntity(BlockEntityType<?> pType, BlockPos pWorldPosition, BlockState pBlockState) {
|
||||
super(pType, pWorldPosition, pBlockState);
|
||||
}
|
||||
|
||||
protected abstract void saveModData(CompoundTag tag);
|
||||
|
||||
protected abstract void loadModData(CompoundTag tag);
|
||||
|
||||
@Override
|
||||
protected void saveAdditional(CompoundTag pTag) {
|
||||
saveModData(pTag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void load(CompoundTag pTag) {
|
||||
super.load(pTag);
|
||||
loadModData(pTag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompoundTag getUpdateTag() {
|
||||
var tag = new CompoundTag();
|
||||
saveModData(tag);
|
||||
return tag;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Packet<ClientGamePacketListener> getUpdatePacket() {
|
||||
return ClientboundBlockEntityDataPacket.create(this);
|
||||
}
|
||||
}
|
|
@ -2,8 +2,8 @@ package at.petrak.hexcasting.common.blocks.circles;
|
|||
|
||||
import at.petrak.hexcasting.client.RenderLib;
|
||||
import at.petrak.hexcasting.common.blocks.HexBlocks;
|
||||
import at.petrak.hexcasting.common.blocks.ModBlockEntity;
|
||||
import at.petrak.hexcasting.hexmath.HexPattern;
|
||||
import at.petrak.paucal.api.PaucalBlockEntity;
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.mojang.math.Quaternion;
|
||||
|
@ -21,7 +21,7 @@ import net.minecraft.world.level.block.state.properties.AttachFace;
|
|||
import net.minecraft.world.phys.Vec2;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class BlockEntitySlate extends ModBlockEntity {
|
||||
public class BlockEntitySlate extends PaucalBlockEntity {
|
||||
public static final String TAG_PATTERN = "pattern";
|
||||
|
||||
@Nullable
|
||||
|
|
|
@ -3,7 +3,6 @@ package at.petrak.hexcasting.common.blocks.circles.impetuses;
|
|||
import at.petrak.hexcasting.HexConfig;
|
||||
import at.petrak.hexcasting.api.BlockCircleComponent;
|
||||
import at.petrak.hexcasting.api.spell.ParticleSpray;
|
||||
import at.petrak.hexcasting.common.blocks.ModBlockEntity;
|
||||
import at.petrak.hexcasting.common.casting.CastingContext;
|
||||
import at.petrak.hexcasting.common.casting.CastingHarness;
|
||||
import at.petrak.hexcasting.common.casting.SpellCircleContext;
|
||||
|
@ -11,6 +10,7 @@ import at.petrak.hexcasting.common.casting.colors.FrozenColorizer;
|
|||
import at.petrak.hexcasting.common.items.HexItems;
|
||||
import at.petrak.hexcasting.common.lib.HexCapabilities;
|
||||
import at.petrak.hexcasting.common.lib.HexSounds;
|
||||
import at.petrak.paucal.api.PaucalBlockEntity;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
|
@ -45,7 +45,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
public abstract class BlockEntityAbstractImpetus extends ModBlockEntity implements ICapabilityProvider {
|
||||
public abstract class BlockEntityAbstractImpetus extends PaucalBlockEntity implements ICapabilityProvider {
|
||||
public static final String
|
||||
TAG_ACTIVATOR = "activator",
|
||||
TAG_COLORIZER = "colorizer",
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
package at.petrak.hexcasting.common.casting.colors;
|
||||
|
||||
import at.petrak.hexcasting.common.ContributorList;
|
||||
import at.petrak.hexcasting.HexMod;
|
||||
import at.petrak.hexcasting.common.items.HexItems;
|
||||
import at.petrak.hexcasting.common.items.colorizer.ItemDyeColorizer;
|
||||
import at.petrak.hexcasting.common.items.colorizer.ItemPrideColorizer;
|
||||
import at.petrak.paucal.api.contrib.Contributors;
|
||||
import net.minecraft.Util;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
@ -14,6 +15,9 @@ import net.minecraft.world.item.Item;
|
|||
import net.minecraft.world.phys.Vec3;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
|
||||
import java.awt.*;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
|
@ -61,16 +65,35 @@ public record FrozenColorizer(Item item, UUID owner) {
|
|||
var colors = politics.getColors();
|
||||
return morphBetweenColors(colors, new Vec3(0.1, 0.1, 0.1), time / 20 / 20, position);
|
||||
} else if (this.item == HexItems.UUID_COLORIZER.get()) {
|
||||
var info = ContributorList.getContributor(this.owner);
|
||||
if (info != null) {
|
||||
return morphBetweenColors(info.getColorizer(), new Vec3(0.1, 0.1, 0.1), time / 20 / 20, position);
|
||||
} else {
|
||||
// randomly scrungle the bits
|
||||
return FastColor.ARGB32.color(255,
|
||||
(int) (this.owner.getLeastSignificantBits() & 0xff),
|
||||
(int) (this.owner.getLeastSignificantBits() >>> 32 & 0xff),
|
||||
(int) (this.owner.getMostSignificantBits() & 0xff));
|
||||
var contributor = Contributors.getContributor(this.owner);
|
||||
if (contributor != null) {
|
||||
Object colorObj = contributor.getRaw("hexcasting:colorizer");
|
||||
if (colorObj instanceof List<?> colorList) {
|
||||
var colors = new int[colorList.size()];
|
||||
var ok = true;
|
||||
for (int i = 0; i < colorList.size(); i++) {
|
||||
Object elt = colorList.get(i);
|
||||
if (elt instanceof Number n) {
|
||||
colors[i] = n.intValue() | 0xff_000000;
|
||||
} else {
|
||||
ok = false;
|
||||
HexMod.getLogger().warn("Player {} had a bad colorizer", this.owner);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (ok) {
|
||||
return morphBetweenColors(colors, new Vec3(0.1, 0.1, 0.1), time / 20 / 20, position);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// randomly scrungle the bits
|
||||
var rand = new Random(this.owner.getLeastSignificantBits() ^ this.owner.getMostSignificantBits());
|
||||
var hue = rand.nextFloat();
|
||||
var saturation = rand.nextFloat(0.4f, 1.0f);
|
||||
var brightness = rand.nextFloat(0.5f, 1.0f);
|
||||
|
||||
return Color.HSBtoRGB(hue, saturation, brightness);
|
||||
}
|
||||
|
||||
return 0xff_ff00dc; // missing color
|
||||
|
|
|
@ -4,17 +4,16 @@ import at.petrak.hexcasting.HexMod;
|
|||
import at.petrak.hexcasting.api.BlockCircleComponent;
|
||||
import at.petrak.hexcasting.common.blocks.HexBlocks;
|
||||
import at.petrak.hexcasting.common.blocks.circles.BlockSlate;
|
||||
import at.petrak.paucal.api.datagen.PaucalBlockStateAndModelProvider;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.data.DataGenerator;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||
import net.minecraftforge.client.model.generators.BlockModelBuilder;
|
||||
import net.minecraftforge.client.model.generators.BlockStateProvider;
|
||||
import net.minecraftforge.client.model.generators.ConfiguredModel;
|
||||
import net.minecraftforge.common.data.ExistingFileHelper;
|
||||
|
||||
public class HexBlockStatesAndModels extends BlockStateProvider {
|
||||
public class HexBlockStatesAndModels extends PaucalBlockStateAndModelProvider {
|
||||
public HexBlockStatesAndModels(DataGenerator gen, ExistingFileHelper exFileHelper) {
|
||||
super(gen, HexMod.MOD_ID, exFileHelper);
|
||||
}
|
||||
|
@ -46,27 +45,18 @@ public class HexBlockStatesAndModels extends BlockStateProvider {
|
|||
slateTex);
|
||||
|
||||
blockAndItem(HexBlocks.SLATE_BLOCK.get(), models().cubeAll("slate_block", modLoc("block/slate")));
|
||||
reallySimpleBlockAndItem(HexBlocks.AMETHYST_DUST_BLOCK.get(), "amethyst_dust_block");
|
||||
reallySimpleBlockAndItem(HexBlocks.AMETHYST_TILES.get(), "amethyst_tiles");
|
||||
reallySimpleBlockAndItem(HexBlocks.SCROLL_PAPER.get(), "scroll_paper");
|
||||
reallySimpleBlockAndItem(HexBlocks.ANCIENT_SCROLL_PAPER.get(), "ancient_scroll_paper");
|
||||
reallySimpleBlockAndItem(HexBlocks.SCROLL_PAPER_LANTERN.get(), "scroll_paper_lantern");
|
||||
reallySimpleBlockAndItem(HexBlocks.ANCIENT_SCROLL_PAPER_LANTERN.get(), "ancient_scroll_paper_lantern");
|
||||
cubeBlockAndItem(HexBlocks.AMETHYST_DUST_BLOCK.get(), "amethyst_dust_block");
|
||||
cubeBlockAndItem(HexBlocks.AMETHYST_TILES.get(), "amethyst_tiles");
|
||||
cubeBlockAndItem(HexBlocks.SCROLL_PAPER.get(), "scroll_paper");
|
||||
cubeBlockAndItem(HexBlocks.ANCIENT_SCROLL_PAPER.get(), "ancient_scroll_paper");
|
||||
cubeBlockAndItem(HexBlocks.SCROLL_PAPER_LANTERN.get(), "scroll_paper_lantern");
|
||||
cubeBlockAndItem(HexBlocks.ANCIENT_SCROLL_PAPER_LANTERN.get(), "ancient_scroll_paper_lantern");
|
||||
|
||||
var sconceModel = models().getExistingFile(modLoc("amethyst_sconce"));
|
||||
simpleBlock(HexBlocks.SCONCE.get(), sconceModel);
|
||||
simpleBlockItem(HexBlocks.SCONCE.get(), sconceModel);
|
||||
}
|
||||
|
||||
private void blockAndItem(Block block, BlockModelBuilder model) {
|
||||
simpleBlock(block, model);
|
||||
simpleBlockItem(block, model);
|
||||
}
|
||||
|
||||
private void reallySimpleBlockAndItem(Block block, String name) {
|
||||
blockAndItem(block, models().cubeAll(name, modLoc("block/" + name)));
|
||||
}
|
||||
|
||||
private void arrowCircleBlock(Block block, String name, String stub, ResourceLocation particle) {
|
||||
getVariantBuilder(block).forAllStates(bs -> {
|
||||
var isLit = bs.getValue(BlockCircleComponent.ENERGIZED);
|
||||
|
|
|
@ -7,16 +7,16 @@ import at.petrak.hexcasting.common.items.ItemScroll;
|
|||
import at.petrak.hexcasting.common.items.ItemSlate;
|
||||
import at.petrak.hexcasting.common.items.magic.ItemManaBattery;
|
||||
import at.petrak.hexcasting.common.items.magic.ItemPackagedSpell;
|
||||
import at.petrak.paucal.api.datagen.PaucalItemModelProvider;
|
||||
import com.mojang.datafixers.util.Pair;
|
||||
import net.minecraft.data.DataGenerator;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraftforge.client.model.generators.ItemModelProvider;
|
||||
import net.minecraftforge.client.model.generators.ModelFile;
|
||||
import net.minecraftforge.common.data.ExistingFileHelper;
|
||||
import net.minecraftforge.registries.RegistryObject;
|
||||
|
||||
public class HexItemModels extends ItemModelProvider {
|
||||
public class HexItemModels extends PaucalItemModelProvider {
|
||||
public HexItemModels(DataGenerator generator, ExistingFileHelper existingFileHelper) {
|
||||
super(generator, HexMod.MOD_ID, existingFileHelper);
|
||||
}
|
||||
|
@ -126,22 +126,4 @@ public class HexItemModels extends ItemModelProvider {
|
|||
.model(new ModelFile.UncheckedModelFile(modLoc("item/slate_written")))
|
||||
.end();
|
||||
}
|
||||
|
||||
public void simpleItem(Item item) {
|
||||
simpleItem(item.getRegistryName());
|
||||
}
|
||||
|
||||
public void simpleItem(ResourceLocation path) {
|
||||
singleTexture(path.getPath(), new ResourceLocation("item/generated"),
|
||||
"layer0", new ResourceLocation(HexMod.MOD_ID, "item/" + path.getPath()));
|
||||
}
|
||||
|
||||
public void brandishedItem(Item item) {
|
||||
brandishedItem(item.getRegistryName());
|
||||
}
|
||||
|
||||
public void brandishedItem(ResourceLocation path) {
|
||||
singleTexture(path.getPath(), new ResourceLocation("item/handheld"),
|
||||
"layer0", new ResourceLocation(HexMod.MOD_ID, "item/" + path.getPath()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,45 +2,36 @@ package at.petrak.hexcasting.datagen;
|
|||
|
||||
import at.petrak.hexcasting.common.blocks.HexBlocks;
|
||||
import at.petrak.hexcasting.common.blocks.circles.BlockEntitySlate;
|
||||
import at.petrak.paucal.api.datagen.PaucalLootTableProvider;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import net.minecraft.data.DataGenerator;
|
||||
import net.minecraft.data.DataProvider;
|
||||
import net.minecraft.data.HashCache;
|
||||
import net.minecraft.data.loot.LootTableProvider;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.storage.loot.LootPool;
|
||||
import net.minecraft.world.level.storage.loot.LootTable;
|
||||
import net.minecraft.world.level.storage.loot.LootTables;
|
||||
import net.minecraft.world.level.storage.loot.entries.LootItem;
|
||||
import net.minecraft.world.level.storage.loot.functions.CopyNbtFunction;
|
||||
import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets;
|
||||
import net.minecraft.world.level.storage.loot.providers.nbt.ContextNbtProvider;
|
||||
import net.minecraft.world.level.storage.loot.providers.number.ConstantValue;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Path;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
// https://github.com/XuulMedia/Flint-Age/blob/4638289130ef80dafe9b6a3fdcb461a72688100f/src/main/java/xuul/flint/datagen/BaseLootTableProvider.java#L61
|
||||
// auugh mojang whyyyy
|
||||
public class HexLootTables extends LootTableProvider {
|
||||
public class HexLootTables extends PaucalLootTableProvider {
|
||||
private static final Gson GSON = new GsonBuilder().setPrettyPrinting().disableHtmlEscaping().create();
|
||||
|
||||
private final DataGenerator generator;
|
||||
protected final Map<Block, LootTable.Builder> lootTables = new HashMap<>();
|
||||
|
||||
public HexLootTables(DataGenerator pGenerator) {
|
||||
super(pGenerator);
|
||||
this.generator = pGenerator;
|
||||
}
|
||||
|
||||
protected void addTables() {
|
||||
dropSelfTable(HexBlocks.EMPTY_IMPETUS.get());
|
||||
dropSelfTable(HexBlocks.IMPETUS_RIGHTCLICK.get());
|
||||
dropSelfTable(HexBlocks.SLATE_BLOCK.get());
|
||||
@Override
|
||||
protected void makeLootTables(Map<Block, LootTable.Builder> lootTables) {
|
||||
dropSelfTable(lootTables, HexBlocks.EMPTY_IMPETUS, HexBlocks.IMPETUS_RIGHTCLICK,
|
||||
HexBlocks.SLATE_BLOCK, HexBlocks.AMETHYST_DUST_BLOCK, HexBlocks.AMETHYST_TILES, HexBlocks.SCROLL_PAPER,
|
||||
HexBlocks.ANCIENT_SCROLL_PAPER, HexBlocks.SCROLL_PAPER_LANTERN, HexBlocks.ANCIENT_SCROLL_PAPER_LANTERN,
|
||||
HexBlocks.SCONCE);
|
||||
|
||||
var slatePool = LootPool.lootPool().name("slate").
|
||||
setRolls(ConstantValue.exactly(1))
|
||||
|
@ -49,40 +40,4 @@ public class HexLootTables extends LootTableProvider {
|
|||
.copy(BlockEntitySlate.TAG_PATTERN, "BlockEntityTag." + BlockEntitySlate.TAG_PATTERN)));
|
||||
lootTables.put(HexBlocks.SLATE.get(), LootTable.lootTable().withPool(slatePool));
|
||||
}
|
||||
|
||||
protected void dropSelfTable(Block block) {
|
||||
dropSelfTable(block.getRegistryName().getPath(), block);
|
||||
}
|
||||
|
||||
protected void dropSelfTable(String name, Block block) {
|
||||
var pool = LootPool.lootPool()
|
||||
.name(name)
|
||||
.setRolls(ConstantValue.exactly(1))
|
||||
.add(LootItem.lootTableItem(block));
|
||||
var loot = LootTable.lootTable().withPool(pool);
|
||||
|
||||
lootTables.put(block, loot);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(HashCache cache) {
|
||||
addTables();
|
||||
|
||||
var tables = new HashMap<ResourceLocation, LootTable>();
|
||||
for (var entry : lootTables.entrySet()) {
|
||||
tables.put(entry.getKey().getLootTable(), entry.getValue().setParamSet(LootContextParamSets.BLOCK).build());
|
||||
}
|
||||
writeTables(cache, tables);
|
||||
}
|
||||
|
||||
private void writeTables(HashCache cache, Map<ResourceLocation, LootTable> tables) {
|
||||
Path outputFolder = this.generator.getOutputFolder();
|
||||
tables.forEach((key, lootTable) -> {
|
||||
Path path = outputFolder.resolve("data/" + key.getNamespace() + "/loot_tables/" + key.getPath() + ".json");
|
||||
try {
|
||||
DataProvider.save(GSON, cache, LootTables.serialize(lootTable), path);
|
||||
} catch (IOException e) {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ import at.petrak.hexcasting.common.recipe.SealFocusRecipe;
|
|||
import at.petrak.hexcasting.common.recipe.ingredient.StateIngredientHelper;
|
||||
import at.petrak.hexcasting.common.recipe.ingredient.VillagerIngredient;
|
||||
import at.petrak.hexcasting.datagen.recipebuilders.BrainsweepRecipeBuilder;
|
||||
import at.petrak.paucal.api.datagen.PaucalRecipeProvider;
|
||||
import net.minecraft.advancements.critereon.EntityPredicate;
|
||||
import net.minecraft.advancements.critereon.MinMaxBounds;
|
||||
import net.minecraft.core.Registry;
|
||||
|
@ -28,16 +29,15 @@ import java.util.function.Consumer;
|
|||
|
||||
import static at.petrak.hexcasting.common.lib.RegisterHelper.prefix;
|
||||
|
||||
public class HexRecipes extends RecipeProvider {
|
||||
public class HexRecipes extends PaucalRecipeProvider {
|
||||
public HexRecipes(DataGenerator pGenerator) {
|
||||
super(pGenerator);
|
||||
super(pGenerator, HexMod.MOD_ID);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void buildCraftingRecipes(Consumer<FinishedRecipe> recipes) {
|
||||
specialRecipe(recipes, SealFocusRecipe.SERIALIZER);
|
||||
|
||||
// this is actually the worst system i have ever seen
|
||||
ShapedRecipeBuilder.shaped(HexItems.WAND.get())
|
||||
.define('L', Tags.Items.LEATHER)
|
||||
.define('S', Items.STICK)
|
||||
|
@ -48,16 +48,10 @@ public class HexRecipes extends RecipeProvider {
|
|||
.unlockedBy("has_item", has(Items.AMETHYST_SHARD))
|
||||
.save(recipes);
|
||||
|
||||
ShapedRecipeBuilder.shaped(HexItems.FOCUS.get())
|
||||
.define('L', Tags.Items.LEATHER)
|
||||
.define('Q', Tags.Items.DUSTS_GLOWSTONE)
|
||||
.define('A', HexItems.CHARGED_AMETHYST.get())
|
||||
.pattern("LQL")
|
||||
.pattern("QAQ")
|
||||
.pattern("LQL")
|
||||
ringCornered(HexItems.FOCUS.get(), 1, Ingredient.of(Tags.Items.DUSTS_GLOWSTONE),
|
||||
Ingredient.of(Tags.Items.LEATHER), Ingredient.of(HexItems.CHARGED_AMETHYST.get()))
|
||||
.unlockedBy("has_item", has(HexItems.WAND.get()))
|
||||
.save(recipes);
|
||||
// i cannot believe they couldn't have thought of anything better
|
||||
|
||||
ShapedRecipeBuilder.shaped(HexItems.SPELLBOOK.get())
|
||||
.define('N', Tags.Items.NUGGETS_GOLD)
|
||||
|
@ -71,20 +65,11 @@ public class HexRecipes extends RecipeProvider {
|
|||
.unlockedBy("has_focus", has(HexItems.FOCUS.get()))
|
||||
.unlockedBy("has_chorus", has(Items.CHORUS_FRUIT)).save(recipes);
|
||||
|
||||
ShapedRecipeBuilder.shaped(HexItems.CYPHER.get())
|
||||
.define('F', Items.COPPER_INGOT) // f for frame
|
||||
.define('A', HexItems.AMETHYST_DUST.get())
|
||||
.pattern(" F ")
|
||||
.pattern("FAF")
|
||||
.pattern(" F ")
|
||||
ring(HexItems.CYPHER.get(), 1, Ingredient.of(Tags.Items.INGOTS_COPPER),
|
||||
Ingredient.of(HexItems.AMETHYST_DUST.get()))
|
||||
.unlockedBy("has_item", has(HexItems.WAND.get())).save(recipes);
|
||||
|
||||
ShapedRecipeBuilder.shaped(HexItems.TRINKET.get())
|
||||
.define('F', Tags.Items.INGOTS_IRON)
|
||||
.define('A', Items.AMETHYST_SHARD)
|
||||
.pattern(" F ")
|
||||
.pattern("FAF")
|
||||
.pattern(" F ")
|
||||
ring(HexItems.TRINKET.get(), 1, Ingredient.of(Tags.Items.INGOTS_IRON), Ingredient.of(Items.AMETHYST_SHARD))
|
||||
.unlockedBy("has_item", has(HexItems.WAND.get())).save(recipes);
|
||||
|
||||
ShapedRecipeBuilder.shaped(HexItems.ARTIFACT.get())
|
||||
|
@ -97,12 +82,7 @@ public class HexRecipes extends RecipeProvider {
|
|||
.pattern(" D ")
|
||||
.unlockedBy("has_item", has(HexItems.WAND.get())).save(recipes);
|
||||
|
||||
ShapedRecipeBuilder.shaped(HexItems.SCRYING_LENS.get())
|
||||
.define('G', Tags.Items.GLASS)
|
||||
.define('A', HexItems.AMETHYST_DUST.get())
|
||||
.pattern(" G ")
|
||||
.pattern("GAG")
|
||||
.pattern(" G ")
|
||||
ring(HexItems.SCRYING_LENS.get(), 1, Items.GLASS, HexItems.AMETHYST_DUST.get())
|
||||
.unlockedBy("has_item", has(HexItems.WAND.get())).save(recipes);
|
||||
|
||||
ShapedRecipeBuilder.shaped(HexItems.ABACUS.get())
|
||||
|
@ -194,57 +174,27 @@ public class HexRecipes extends RecipeProvider {
|
|||
.unlockedBy("has_item", has(HexItems.SLATE.get()))
|
||||
.save(recipes, modLoc("slate_block_from_slates"));
|
||||
|
||||
ShapedRecipeBuilder.shaped(HexBlocks.SLATE_BLOCK.get(), 8)
|
||||
.define('S', Blocks.DEEPSLATE)
|
||||
.define('A', HexItems.AMETHYST_DUST.get())
|
||||
.pattern("SSS")
|
||||
.pattern("SAS")
|
||||
.pattern("SSS")
|
||||
ringAll(HexBlocks.SLATE_BLOCK.get(), 8, Blocks.DEEPSLATE, HexItems.AMETHYST_DUST.get())
|
||||
.unlockedBy("has_item", has(HexItems.SLATE.get())).save(recipes);
|
||||
|
||||
ShapedRecipeBuilder.shaped(HexBlocks.AMETHYST_DUST_BLOCK.get())
|
||||
.define('A', HexItems.AMETHYST_DUST.get())
|
||||
.pattern("AA")
|
||||
.pattern("AA")
|
||||
.unlockedBy("has_item", has(HexItems.AMETHYST_DUST.get())).save(recipes);
|
||||
ShapelessRecipeBuilder.shapeless(HexItems.AMETHYST_DUST.get(), 4)
|
||||
.requires(HexBlocks.AMETHYST_DUST_BLOCK.get())
|
||||
.unlockedBy("has_item", has(HexItems.AMETHYST_DUST.get()))
|
||||
.save(recipes, modLoc("amethyst_dust_unpacking"));
|
||||
packing(HexItems.AMETHYST_DUST.get(), HexBlocks.AMETHYST_DUST_BLOCK.get().asItem(), "amethyst_dust",
|
||||
false, recipes);
|
||||
|
||||
ShapedRecipeBuilder.shaped(HexBlocks.AMETHYST_TILES.get(), 8)
|
||||
.define('A', Blocks.AMETHYST_BLOCK)
|
||||
.define('D', HexItems.AMETHYST_DUST.get())
|
||||
.pattern("AAA")
|
||||
.pattern("ADA")
|
||||
.pattern("AAA")
|
||||
ringAll(HexBlocks.AMETHYST_TILES.get(), 8, Blocks.AMETHYST_BLOCK, HexItems.AMETHYST_DUST.get())
|
||||
.unlockedBy("has_item", has(HexItems.AMETHYST_DUST.get())).save(recipes);
|
||||
SingleItemRecipeBuilder.stonecutting(Ingredient.of(Blocks.AMETHYST_BLOCK), HexBlocks.AMETHYST_TILES.get())
|
||||
.unlockedBy("has_item", has(Blocks.AMETHYST_BLOCK))
|
||||
.save(recipes, modLoc("stonecutting/amethyst_tiles"));
|
||||
|
||||
ShapedRecipeBuilder.shaped(HexBlocks.SCROLL_PAPER.get(), 8)
|
||||
.define('P', Items.PAPER)
|
||||
.define('A', Items.AMETHYST_SHARD)
|
||||
.pattern("PPP")
|
||||
.pattern("PAP")
|
||||
.pattern("PPP")
|
||||
ringAll(HexBlocks.SCROLL_PAPER.get(), 8, Items.PAPER, Items.AMETHYST_SHARD)
|
||||
.unlockedBy("has_item", has(Items.AMETHYST_SHARD)).save(recipes);
|
||||
ShapelessRecipeBuilder.shapeless(HexBlocks.ANCIENT_SCROLL_PAPER.get(), 8)
|
||||
.requires(Tags.Items.DYES_BROWN)
|
||||
.requires(HexBlocks.SCROLL_PAPER.get(), 8)
|
||||
.unlockedBy("has_item", has(HexBlocks.SCROLL_PAPER.get())).save(recipes);
|
||||
ShapedRecipeBuilder.shaped(HexBlocks.SCROLL_PAPER_LANTERN.get())
|
||||
.define('P', HexBlocks.SCROLL_PAPER.get())
|
||||
.define('T', Items.TORCH)
|
||||
.pattern("P")
|
||||
.pattern("T")
|
||||
stack(HexBlocks.SCROLL_PAPER_LANTERN.get(), 1, HexBlocks.SCROLL_PAPER.get(), Items.TORCH)
|
||||
.unlockedBy("has_item", has(HexBlocks.SCROLL_PAPER.get())).save(recipes);
|
||||
ShapedRecipeBuilder.shaped(HexBlocks.ANCIENT_SCROLL_PAPER_LANTERN.get())
|
||||
.define('P', HexBlocks.ANCIENT_SCROLL_PAPER.get())
|
||||
.define('T', Items.TORCH)
|
||||
.pattern("P")
|
||||
.pattern("T")
|
||||
stack(HexBlocks.ANCIENT_SCROLL_PAPER_LANTERN.get(), 1, HexBlocks.ANCIENT_SCROLL_PAPER.get(), Items.TORCH)
|
||||
.unlockedBy("has_item", has(HexBlocks.ANCIENT_SCROLL_PAPER.get())).save(recipes);
|
||||
ShapelessRecipeBuilder.shapeless(HexBlocks.ANCIENT_SCROLL_PAPER_LANTERN.get(), 8)
|
||||
.requires(Tags.Items.DYES_BROWN)
|
||||
|
@ -252,11 +202,8 @@ public class HexRecipes extends RecipeProvider {
|
|||
.unlockedBy("has_item", has(HexBlocks.SCROLL_PAPER_LANTERN.get()))
|
||||
.save(recipes, modLoc("ageing_scroll_paper_lantern"));
|
||||
|
||||
ShapedRecipeBuilder.shaped(HexBlocks.SCONCE.get(), 4)
|
||||
.define('A', HexItems.CHARGED_AMETHYST.get())
|
||||
.define('C', Tags.Items.INGOTS_COPPER)
|
||||
.pattern("A")
|
||||
.pattern("C")
|
||||
stack(HexBlocks.SCONCE.get(), 4, Ingredient.of(HexItems.CHARGED_AMETHYST.get()),
|
||||
Ingredient.of(Tags.Items.INGOTS_COPPER))
|
||||
.unlockedBy("has_item", has(HexItems.CHARGED_AMETHYST.get())).save(recipes);
|
||||
|
||||
var enlightenment = new OvercastTrigger.Instance(EntityPredicate.Composite.ANY,
|
||||
|
@ -289,10 +236,6 @@ public class HexRecipes extends RecipeProvider {
|
|||
.save(recipes, modLoc("brainsweep/budding_amethyst"));
|
||||
}
|
||||
|
||||
private ResourceLocation modLoc(String path) {
|
||||
return new ResourceLocation(HexMod.MOD_ID, path);
|
||||
}
|
||||
|
||||
protected void specialRecipe(Consumer<FinishedRecipe> consumer, SimpleRecipeSerializer<?> serializer) {
|
||||
var name = Registry.RECIPE_SERIALIZER.getKey(serializer);
|
||||
SpecialRecipeBuilder.special(serializer).save(consumer, prefix("dynamic/" + name.getPath()).toString());
|
||||
|
|
|
@ -1,12 +1,18 @@
|
|||
package at.petrak.hexcasting.datagen.lootmods;
|
||||
|
||||
import at.petrak.hexcasting.HexMod;
|
||||
import at.petrak.hexcasting.common.items.HexItems;
|
||||
import at.petrak.paucal.api.lootmod.PaucalAddItemModifier;
|
||||
import at.petrak.paucal.api.lootmod.PaucalLootMods;
|
||||
import net.minecraft.advancements.critereon.EnchantmentPredicate;
|
||||
import net.minecraft.advancements.critereon.ItemPredicate;
|
||||
import net.minecraft.advancements.critereon.MinMaxBounds;
|
||||
import net.minecraft.data.DataGenerator;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.enchantment.Enchantments;
|
||||
import net.minecraft.world.level.storage.loot.functions.ApplyBonusCount;
|
||||
import net.minecraft.world.level.storage.loot.functions.LootItemFunction;
|
||||
import net.minecraft.world.level.storage.loot.predicates.BonusLevelTableCondition;
|
||||
import net.minecraft.world.level.storage.loot.predicates.LootItemCondition;
|
||||
import net.minecraft.world.level.storage.loot.predicates.MatchTool;
|
||||
import net.minecraftforge.common.data.GlobalLootModifierProvider;
|
||||
|
@ -19,8 +25,6 @@ import net.minecraftforge.registries.RegistryObject;
|
|||
public class HexLootModifiers extends GlobalLootModifierProvider {
|
||||
public static final DeferredRegister<GlobalLootModifierSerializer<?>> LOOT_MODS = DeferredRegister.create(
|
||||
ForgeRegistries.Keys.LOOT_MODIFIER_SERIALIZERS, HexMod.MOD_ID);
|
||||
private static final RegistryObject<AmethystClusterModifier.Serializer> AMETHYST_CLUSTER = LOOT_MODS.register(
|
||||
"amethyst_cluster", AmethystClusterModifier.Serializer::new);
|
||||
private static final RegistryObject<PatternScrollModifier.Serializer> SCROLLS_IN_CHESTS = LOOT_MODS.register(
|
||||
"scrolls", PatternScrollModifier.Serializer::new);
|
||||
|
||||
|
@ -30,13 +34,26 @@ public class HexLootModifiers extends GlobalLootModifierProvider {
|
|||
|
||||
@Override
|
||||
protected void start() {
|
||||
add("amethyst_cluster", AMETHYST_CLUSTER.get(), new AmethystClusterModifier(new LootItemCondition[]{
|
||||
add("amethyst_cluster_dust", PaucalLootMods.ADD_ITEM.get(), new PaucalAddItemModifier(
|
||||
HexItems.AMETHYST_DUST.get(), new LootItemFunction[]{
|
||||
ApplyBonusCount.addOreBonusCount(Enchantments.BLOCK_FORTUNE).build()
|
||||
}, new LootItemCondition[]{
|
||||
LootTableIdCondition.builder(new ResourceLocation("minecraft:blocks/amethyst_cluster")).build(),
|
||||
MatchTool.toolMatches(
|
||||
ItemPredicate.Builder.item().hasEnchantment(
|
||||
new EnchantmentPredicate(Enchantments.SILK_TOUCH, MinMaxBounds.Ints.ANY)))
|
||||
.invert().build(),
|
||||
}, 0.9f));
|
||||
}
|
||||
));
|
||||
add("amethyst_cluster_charged", PaucalLootMods.ADD_ITEM.get(), new PaucalAddItemModifier(
|
||||
HexItems.CHARGED_AMETHYST.get(), 1, new LootItemCondition[]{
|
||||
LootTableIdCondition.builder(new ResourceLocation("minecraft:blocks/amethyst_cluster")).build(),
|
||||
MatchTool.toolMatches(
|
||||
ItemPredicate.Builder.item().hasEnchantment(
|
||||
new EnchantmentPredicate(Enchantments.SILK_TOUCH, MinMaxBounds.Ints.ANY)))
|
||||
.invert().build(),
|
||||
BonusLevelTableCondition.bonusLevelFlatChance(Enchantments.BLOCK_FORTUNE, 0.2f, 0.4f, 0.6f, 0.8f).build()
|
||||
}));
|
||||
|
||||
|
||||
add("scroll_jungle", SCROLLS_IN_CHESTS.get(), new PatternScrollModifier(new LootItemCondition[]{
|
||||
|
|
|
@ -34,3 +34,10 @@ mandatory = true
|
|||
versionRange = "[1.18.2-66,)"
|
||||
ordering = "NONE"
|
||||
side = "BOTH"
|
||||
|
||||
[[dependencies.hexcasting]]
|
||||
modId = "paucal"
|
||||
mandatory = true
|
||||
versionRange = "[0.1.2,)"
|
||||
ordering = "NONE"
|
||||
side = "BOTH"
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
},
|
||||
{
|
||||
"type": "patchouli:crafting",
|
||||
"recipe": "hexcasting:amethyst_dust_block",
|
||||
"recipe": "hexcasting:amethyst_dust_packing",
|
||||
"recipe2": "hexcasting:amethyst_dust_unpacking"
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue