Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add divination rods #61

Merged
merged 30 commits into from
Dec 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
dae685f
Add particles
klikli-dev Nov 26, 2022
9ea87b8
Add projectile particle entity
klikli-dev Nov 26, 2022
584562e
Set entity to spawn client side only
klikli-dev Nov 27, 2022
9bb2f12
Add scanner from occultism
klikli-dev Nov 27, 2022
b8ed4bb
Add divination rod item
klikli-dev Nov 27, 2022
54581f2
Fixes for divination rod
klikli-dev Nov 27, 2022
197a2a9
fix item model overrides order
klikli-dev Nov 27, 2022
93178dd
Fix network messages
klikli-dev Nov 27, 2022
f23b6ec
increase particle age and decrease speed
klikli-dev Nov 27, 2022
fa16f18
fix serverside usage, introduce configurable duration and range
klikli-dev Nov 27, 2022
4129f28
Improve divination rod chat rendering
klikli-dev Nov 27, 2022
b2b9038
Add tiering config for divination rod
klikli-dev Nov 27, 2022
11cfa32
implement tag filter and display only mode
klikli-dev Nov 27, 2022
b2d4e58
rename to match mapping
klikli-dev Nov 27, 2022
a45c423
Enable durability reduction on full use
klikli-dev Nov 27, 2022
122a00e
reformat
klikli-dev Nov 27, 2022
3d0c363
Add divination rod tooltip
klikli-dev Nov 27, 2022
ce1e828
Fix showing distance for display-only use
klikli-dev Nov 27, 2022
39fdf71
Add attuned block to item name
klikli-dev Nov 27, 2022
df1abca
Merge branch 'version/1.19' into feature/divination-rod
klikli-dev Dec 2, 2022
6a38f71
Merge branch 'version/1.19' into feature/divination-rod
klikli-dev Dec 2, 2022
25500fe
feat: move divination rod settings to nbt
klikli-dev Dec 2, 2022
bd407ec
feat: fill item category based on recipes
klikli-dev Dec 2, 2022
25fef91
feat: add attuning allowed/not allowed handling
klikli-dev Dec 2, 2022
7167eb9
feat: add jei subtype processing
klikli-dev Dec 2, 2022
d1e07a4
feat: add divination rod from sulfur crafting
klikli-dev Dec 2, 2022
7c5772e
chore: fix reuse headers
klikli-dev Dec 2, 2022
58ebaba
feat: auto-search deepslate ores when scanning for ores
klikli-dev Dec 2, 2022
0ce370e
feat: add linked block handling from recipe for jei preview
klikli-dev Dec 7, 2022
640a181
feat: add disallowed blocks tag for divination rod
klikli-dev Dec 7, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
304 changes: 304 additions & 0 deletions LICENSES/LGPL-3.0-only.txt

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty '
minecraft {
mappings channel: mapping_channel, version: mapping_version

// accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') // Currently, this location cannot be changed from the default.
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') // Currently, this location cannot be changed from the default.

// Default run configurations.
// These can be tweaked, removed, or duplicated as needed.
Expand Down Expand Up @@ -121,8 +121,8 @@ dependencies {
minecraft "net.minecraftforge:forge:${forge_version}"

//Jei
// compileOnly fg.deobf("mezz.jei:jei-${jei_mc_version}-common-api:${jei_version}")
// compileOnly fg.deobf("mezz.jei:jei-${jei_mc_version}-forge-api:${jei_version}")
compileOnly fg.deobf("mezz.jei:jei-${jei_mc_version}-common-api:${jei_version}")
compileOnly fg.deobf("mezz.jei:jei-${jei_mc_version}-forge-api:${jei_version}")
runtimeOnly fg.deobf("mezz.jei:jei-${jei_mc_version}-forge:${jei_version}")

compileOnly fg.deobf("com.klikli_dev:modonomicon:${modonomicon_mc_version}-${modonomicon_version}") //we build against full jar because we NEED IT ALL
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// 1.19.2 2022-12-02T15:19:45.1711053 Recipes
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// 1.19.2 2022-12-02T11:10:25.2129867 Languages: en_us
b298ffdbf8a9d56a42c852a77bd095fb502ed899 assets/theurgy/lang/en_us.json
// 1.19.2 2022-12-07T17:42:33.8512255 Languages: en_us
eda78b9049e529d9eb8067159895112c201b43c6 assets/theurgy/lang/en_us.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
// 1.19.2 2022-12-02T11:08:10.2237385 Item Models: theurgy
// 1.19.2 2022-12-02T18:09:21.9843341 Item Models: theurgy
e0f7b66a84e6588f01abbbce75b1803ffe5d46e2 assets/theurgy/models/item/alchemical_sulfur.json
14a2ccdc5007ad52d74e22c1018a1a2d767df32f assets/theurgy/models/item/divination_rod_t1.json
56cbd2e62794dbad75babc62f07448c34813b99c assets/theurgy/models/item/divination_rod_t1_0.json
561e1235ed07f6cc1bbb5d36e2d85d8d467134cd assets/theurgy/models/item/divination_rod_t1_1.json
dbdc73496f0e2c1c562173def9afaa3fe6594cab assets/theurgy/models/item/divination_rod_t1_2.json
d7c53bd9d3ee54dc7063d1ac9c8ccd74b51b8bd0 assets/theurgy/models/item/divination_rod_t1_3.json
a481fc6d70d3b7d94b0ecbb522f56c67108db698 assets/theurgy/models/item/divination_rod_t1_4.json
e8c9cb3aa96ac7846ba5e43bceaf664a25824cc6 assets/theurgy/models/item/divination_rod_t1_5.json
239601888e1fbc066b825a7d71cb663b8c007796 assets/theurgy/models/item/divination_rod_t1_6.json
7bb03e19874ab49883313120fe439408807569d1 assets/theurgy/models/item/divination_rod_t1_7.json
81476c0120bc1bb7997b5af3f26f338552674c92 assets/theurgy/models/item/divination_rod_t1_searching.json
ef87ecd4c9ddd1788448af6731e87c7aaa5ef713 assets/theurgy/models/item/divination_rod_t4.json
b95a478b24da791ae7c255e72a3370ee5f9b25c0 assets/theurgy/models/item/divination_rod_t4_0.json
96f5bad4dc75ecce2fd64ee27ca9f3ad861cad72 assets/theurgy/models/item/divination_rod_t4_1.json
ea7358fbb5bc502d969d9b56ad9a90fa67d369db assets/theurgy/models/item/divination_rod_t4_2.json
760d6647521ac9bd91ce7d333b2013cfea6d1a12 assets/theurgy/models/item/divination_rod_t4_3.json
afed8e3d6ecfd5ae2c9351ab528451080fa44382 assets/theurgy/models/item/divination_rod_t4_4.json
02160294e7bc7530e876fef3fce5db741df8b22a assets/theurgy/models/item/divination_rod_t4_5.json
46d1626a0c27280cbf141421f5134c2b02e7de7b assets/theurgy/models/item/divination_rod_t4_6.json
3237ccbf7ab79080fd9769cf3adea5e69c615619 assets/theurgy/models/item/divination_rod_t4_7.json
ea3053a9add02634af5fd7d9aef50801c48b32b2 assets/theurgy/models/item/divination_rod_t4_searching.json
e0d7667ce794b40e193ecf66945c505733faf3f8 assets/theurgy/models/item/empty_jar.json
c7428fa39a7d54d5b732ad9dbe9f78ac26eb0f85 assets/theurgy/models/item/empty_jar_labeled.json
94bfa4f4e6caf28d6f20cee65ac10387f5b115e2 assets/theurgy/models/item/jar_label.json
20 changes: 19 additions & 1 deletion src/generated/resources/assets/theurgy/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,30 @@
"item.theurgy.alchemical_sulfur": "Alchemical Sulfur %s",
"item.theurgy.alchemical_sulfur.tooltip": "Alchemical sulfur crafted from %s.",
"item.theurgy.alchemical_sulfur.tooltip.extended": "Sulfur represents the \"idea\" or \"soul\" of an object and is the key to replication and transmutation.",
"item.theurgy.divination_rod_t1": "Glass Divination Rod",
"item.theurgy.divination_rod_t1.linked": "Glass Divination Rod %s",
"item.theurgy.divination_rod_t1.tooltip.extended": "Divination rods can be attuned to a block and are then used to find other blocks of the same type.",
"item.theurgy.divination_rod_t1.tooltip.usage": "§aShift-Click§7 a block to attune the rod to it.\n§aRight-Click and hold§7 and hold to let the rod search for blocks.\n§aRight-Click§7 without holding after a successful search to let the rod show the last found block without consuming durability.",
"item.theurgy.divination_rod_t4": "Emerald Divination Rod",
"item.theurgy.divination_rod_t4.linked": "Emerald Divination Rod %s",
"item.theurgy.divination_rod_t4.tooltip.extended": "This divination rod type cannot be manually attuned, instead comes pre-attuned after crafting..",
"item.theurgy.divination_rod_t4.tooltip.usage": "§aRight-Click and hold§7 and hold to let the rod search for blocks.\n§aRight-Click§7 without holding after a successful search to let the rod show the last found block without consuming durability.",
"item.theurgy.empty_jar": "Empty Jar",
"item.theurgy.empty_jar_labeled": "Labeled Empty Jar",
"item.theurgy.empty_jar_labeled.tooltip": "Dummy item for rendering Alchemical Sulfur if source items are not shown.",
"item.theurgy.jar_label": "Jar Label",
"item.theurgy.jar_label.tooltip": "Dummy item for rendering Alchemical Sulfur if source items are shown.",
"itemGroup.theurgy": "Theurgy",
"message.theurgy.divination_rod.attuning_not_allowed": "§4Warning§r: This type of divination rod cannot be manually attuned.",
"message.theurgy.divination_rod.block_disallowed": "§4Warning§r: The divination rod cannot be attuned to this type of block: %s.",
"message.theurgy.divination_rod.block_not_allowed": "§4Warning§r: The divination rod cannot be attuned to this type of block: %s.",
"message.theurgy.divination_rod.linked": "§aSuccess§r: The divination rod is now attuned to %s.",
"message.theurgy.divination_rod.no_link": "The divination rod is not attuned to any material.",
"message.theurgy.divination_rod.tier_too_low": "§4Warning§r: You need a higher tier divination rod to attune to %s.",
"theurgy.subtitle.tuning_fork": "Using Divination Rod",
"tooltip.theurgy..divination_rod.last_result": "Found %s at %s.",
"tooltip.theurgy..divination_rod.linked_to": "The divination rod is attuned to %s",
"tooltip.theurgy..divination_rod.no_link": "The divination rod is §cnot attuned§r to any material.",
"tooltip.theurgy.show_extended": "§6[§dshift §7read more§6]",
"tooltip.theurgy.show_usage": "§6[§dctrl-shift §7show usage§6]"
"tooltip.theurgy.show_usage": "§6[§dctrl §7show usage§6]"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"parent": "theurgy:item/divination_rod_t1_0",
"overrides": [
{
"model": "theurgy:item/divination_rod_t1_7",
"predicate": {
"theurgy:divination_distance": 0.0
}
},
{
"model": "theurgy:item/divination_rod_t1_6",
"predicate": {
"theurgy:divination_distance": 1.0
}
},
{
"model": "theurgy:item/divination_rod_t1_5",
"predicate": {
"theurgy:divination_distance": 2.0
}
},
{
"model": "theurgy:item/divination_rod_t1_4",
"predicate": {
"theurgy:divination_distance": 3.0
}
},
{
"model": "theurgy:item/divination_rod_t1_3",
"predicate": {
"theurgy:divination_distance": 4.0
}
},
{
"model": "theurgy:item/divination_rod_t1_2",
"predicate": {
"theurgy:divination_distance": 5.0
}
},
{
"model": "theurgy:item/divination_rod_t1_1",
"predicate": {
"theurgy:divination_distance": 6.0
}
},
{
"model": "theurgy:item/divination_rod_t1_0",
"predicate": {
"theurgy:divination_distance": 7.0
}
},
{
"model": "theurgy:item/divination_rod_t1_searching",
"predicate": {
"theurgy:divination_distance": 8.0
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "theurgy:item/divination_rod_t1/divination_rod_0"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "theurgy:item/divination_rod_t1/divination_rod_1"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "theurgy:item/divination_rod_t1/divination_rod_2"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "theurgy:item/divination_rod_t1/divination_rod_3"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "theurgy:item/divination_rod_t1/divination_rod_4"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "theurgy:item/divination_rod_t1/divination_rod_5"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "theurgy:item/divination_rod_t1/divination_rod_6"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "theurgy:item/divination_rod_t1/divination_rod_7"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "theurgy:item/divination_rod_t1/divination_rod_searching"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"parent": "theurgy:item/divination_rod_t4_0",
"overrides": [
{
"model": "theurgy:item/divination_rod_t4_7",
"predicate": {
"theurgy:divination_distance": 0.0
}
},
{
"model": "theurgy:item/divination_rod_t4_6",
"predicate": {
"theurgy:divination_distance": 1.0
}
},
{
"model": "theurgy:item/divination_rod_t4_5",
"predicate": {
"theurgy:divination_distance": 2.0
}
},
{
"model": "theurgy:item/divination_rod_t4_4",
"predicate": {
"theurgy:divination_distance": 3.0
}
},
{
"model": "theurgy:item/divination_rod_t4_3",
"predicate": {
"theurgy:divination_distance": 4.0
}
},
{
"model": "theurgy:item/divination_rod_t4_2",
"predicate": {
"theurgy:divination_distance": 5.0
}
},
{
"model": "theurgy:item/divination_rod_t4_1",
"predicate": {
"theurgy:divination_distance": 6.0
}
},
{
"model": "theurgy:item/divination_rod_t4_0",
"predicate": {
"theurgy:divination_distance": 7.0
}
},
{
"model": "theurgy:item/divination_rod_t4_searching",
"predicate": {
"theurgy:divination_distance": 8.0
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "theurgy:item/divination_rod_t4/divination_rod_0"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "theurgy:item/divination_rod_t4/divination_rod_1"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "theurgy:item/divination_rod_t4/divination_rod_2"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "theurgy:item/divination_rod_t4/divination_rod_3"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "theurgy:item/divination_rod_t4/divination_rod_4"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "theurgy:item/divination_rod_t4/divination_rod_5"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "theurgy:item/divination_rod_t4/divination_rod_6"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "theurgy:item/divination_rod_t4/divination_rod_7"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "theurgy:item/divination_rod_t4/divination_rod_searching"
}
}
12 changes: 11 additions & 1 deletion src/main/java/com/klikli_dev/theurgy/Theurgy.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
import com.klikli_dev.theurgy.config.ServerConfig;
import com.klikli_dev.theurgy.datagen.DataGenerators;
import com.klikli_dev.theurgy.item.TheurgyCreativeModeTab;
import com.klikli_dev.theurgy.registry.ItemRegistry;
import com.klikli_dev.theurgy.network.Networking;
import com.klikli_dev.theurgy.registry.*;
import com.klikli_dev.theurgy.tooltips.TooltipHandler;
import com.mojang.logging.LogUtils;
import net.minecraft.resources.ResourceLocation;
Expand Down Expand Up @@ -48,6 +49,11 @@ public Theurgy() {
IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();

ItemRegistry.ITEMS.register(modEventBus);
EntityRegistry.ENTITIES.register(modEventBus);
EntityDataSerializerRegistry.ENTITY_DATA_SERIALIZERS.register(modEventBus);
ParticleRegistry.PARTICLES.register(modEventBus);
SoundRegistry.SOUNDS.register(modEventBus);
RecipeRegistry.RECIPE_SERIALIZERS.register(modEventBus);

modEventBus.addListener(this::onCommonSetup);
modEventBus.addListener(this::onServerSetup);
Expand All @@ -58,6 +64,8 @@ public Theurgy() {

if (FMLEnvironment.dist == Dist.CLIENT) {
modEventBus.addListener(ClientSetupEventHandler::onClientSetup);
modEventBus.addListener(ParticleRegistry::registerFactories);
modEventBus.addListener(ClientSetupEventHandler::onRegisterEntityRenderers);
}
}

Expand All @@ -66,6 +74,8 @@ public static ResourceLocation loc(String path) {
}

public void onCommonSetup(FMLCommonSetupEvent event) {
Networking.registerMessages();

LOGGER.info("Common setup complete.");
}

Expand Down
Loading