Skip to content

Commit

Permalink
Merge pull request #310 from Direwolf20-MC/polymorphicwand
Browse files Browse the repository at this point in the history
Polymorphicwand
  • Loading branch information
Direwolf20-MC authored Dec 8, 2024
2 parents 9a881a0 + 3d2b024 commit 415df05
Show file tree
Hide file tree
Showing 37 changed files with 832 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.21.1 2024-12-04T17:22:22.4686514 Item Models: justdirethings
// 1.21.1 2024-12-08T14:36:24.9489547 Item Models: justdirethings
c197a1b2a5ae31fcfabfe6cab9ab95a9dc0e1af6 assets/justdirethings/models/item/blazegold_axe.json
dddf215922d40d92c2d8bce4229f2e2af8b3c7ba assets/justdirethings/models/item/blazegold_axe_active.json
6396fb6e503760080534bc26337236d4d09a4cb8 assets/justdirethings/models/item/blazegold_block.json
Expand Down Expand Up @@ -292,6 +292,8 @@ b10bbca68270e48599af7174531b0235c8e7c9a4 assets/justdirethings/models/item/playe
86e8b463737ba209a47a1f3544b51525598d38a3 assets/justdirethings/models/item/pocket_generator_active.json
6ac490fc1ca0a7b3663a770a09e3cd3ade652bb5 assets/justdirethings/models/item/polymorphic_catalyst.json
c51b41b9c484aa6724dfe24732b06a196ee05ffe assets/justdirethings/models/item/polymorphic_fluid_bucket.json
af285bda921f3fea66dd01b7b30fadfd8669ee14 assets/justdirethings/models/item/polymorphic_wand.json
481f0aeeff37a0ab6393bd83161537fd688e0a2e assets/justdirethings/models/item/polymorphic_wand_v2.json
403d14795debb89f422eefb10f3b8188e148190a assets/justdirethings/models/item/portal_fluid_bucket.json
ea9b4416ff95371822cbc5808fd425323b170cc9 assets/justdirethings/models/item/portal_fluid_catalyst.json
d8ea68a75b8b49f7765e715d62ad23c2f1939281 assets/justdirethings/models/item/raw_blazegold.json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
// 1.21.1 2024-09-25T19:43:29.0537222 Tags for minecraft:entity_type mod id justdirethings
// 1.21.1 2024-12-08T14:36:24.946453 Tags for minecraft:entity_type mod id justdirethings
b7ee8eaecff151e619b9a22ecae620a5b3ce15a0 data/c/tags/entity_type/teleporting_not_supported.json
e00f2931577049b9a4400a87ed9c249373be376c data/justdirethings/tags/entity_type/creature_catcher_deny.json
669025814936e708d42d9d0a5b88c11e62cf12ef data/justdirethings/tags/entity_type/no_ai_deny.json
669025814936e708d42d9d0a5b88c11e62cf12ef data/justdirethings/tags/entity_type/no_earthquake.json
b7ee8eaecff151e619b9a22ecae620a5b3ce15a0 data/justdirethings/tags/entity_type/paradox_absorb_deny.json
b7ee8eaecff151e619b9a22ecae620a5b3ce15a0 data/justdirethings/tags/entity_type/paradox_deny.json
263995270039da950f2e27b535f1b7c71a5f5423 data/justdirethings/tags/entity_type/polymorphic_hostile.json
d53ddb5be22b17ec02beda6e2e3695f074abc70f data/justdirethings/tags/entity_type/polymorphic_peaceful.json
669025814936e708d42d9d0a5b88c11e62cf12ef data/justdirethings/tags/entity_type/polymorphic_target_deny.json
6a890ea62d03cc1110fa8d1fe5a0669082d9d96b data/minecraft/tags/entity_type/arrows.json
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// 1.21.1 2024-12-05T15:28:54.1394864 Languages: en_us for mod: justdirethings
34988637a21b45b6d93036e8fe9525ffdd8c9e97 assets/justdirethings/lang/en_us.json
// 1.21.1 2024-12-08T15:06:57.5943778 Languages: en_us for mod: justdirethings
95e97e5674d08f0f4e96cc7bef842e9923332325 assets/justdirethings/lang/en_us.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.21.1 2024-11-02T12:45:23.0801389 Recipes
// 1.21.1 2024-12-08T14:36:24.9704735 Recipes
39cd44c838de7f56aeac73aec8b3bfb64ad7fec2 data/justdirethings/advancement/recipes/building_blocks/blazegold_ingot_9x9.json
2f2a0f948f272df9713010dbcb75beb81c328b01 data/justdirethings/advancement/recipes/building_blocks/celestigem_9x9.json
4c183b67eff4bc24117606cdc45ebcd987dd4138 data/justdirethings/advancement/recipes/building_blocks/charcoal_9x9.json
Expand Down Expand Up @@ -307,6 +307,8 @@ dad2a7782e9a1e1d8e7099a6596640b309925ed9 data/justdirethings/advancement/recipes
2cf19ff627966b28128eb42fd47c9b9e84bc43d8 data/justdirethings/advancement/recipes/misc/pocket_generator.json
858af81155eff55f8b4cff67f9bade9f64071902 data/justdirethings/advancement/recipes/misc/polymorphic_catalyst.json
d028ad197c2078a4c30eafcbde2282aff17f1df1 data/justdirethings/advancement/recipes/misc/polymorphic_fluid_block-fluiddrop.json
8d77029166db109c5f6f34ecd68888bbb458b36f data/justdirethings/advancement/recipes/misc/polymorphic_wand.json
cbd75ef6a410d18537c75609ed9a8dc03e4eedf6 data/justdirethings/advancement/recipes/misc/polymorphic_wand_v2.json
5570c3f5f6bf47c6d6026ead547ac4516bad5da9 data/justdirethings/advancement/recipes/misc/portalgun.json
f921713cd6dfa2ad74a0b7144f7778c2fe33bc72 data/justdirethings/advancement/recipes/misc/portalgun_v2.json
c811419aba5aeaf1be214e7f29492a7ccb300ddd data/justdirethings/advancement/recipes/misc/portal_fluid_block-goospread.json
Expand Down Expand Up @@ -696,6 +698,8 @@ de4d6dd744789b903d6828fec4ce5847a1dfef60 data/justdirethings/recipe/paradoxmachi
cc73b7c24448814a0e8663c8065a6625cbd30072 data/justdirethings/recipe/pocket_generator.json
035ed5c68eac114352b166d38b7f8308e5db63c0 data/justdirethings/recipe/polymorphic_catalyst.json
6cfafeb9ae58abc121bd78f1c67b11aedec8297b data/justdirethings/recipe/polymorphic_fluid_block-fluiddrop.json
52f1c1f4d04ba53cc38b2dbfc49fb1d19a35b344 data/justdirethings/recipe/polymorphic_wand.json
f0837b24753abb981c18893958974a4306f8b4d8 data/justdirethings/recipe/polymorphic_wand_v2.json
1494fe69edb92207b18a251b9c4a4d7ef2487b45 data/justdirethings/recipe/portalgun.json
4ed1bcc18461694ef969bb8820a6a4433cec054f data/justdirethings/recipe/portalgun_v2.json
881053ecbb4f27590666128cfd52f2c212cf6a37 data/justdirethings/recipe/portal_fluid_block-goospread.json
Expand Down
7 changes: 7 additions & 0 deletions src/generated/resources/assets/justdirethings/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@
"item.justdirethings.pocket_generator": "Pocket Generator",
"item.justdirethings.polymorphic_catalyst": "Polymorphic Catalyst",
"item.justdirethings.polymorphic_fluid_bucket": "Polymorphic Fluid Bucket",
"item.justdirethings.polymorphic_wand": "Polymorphic Wand",
"item.justdirethings.polymorphic_wand_v2": "Advanced Polymorphic Wand",
"item.justdirethings.portal_fluid_bucket": "Portal Fluid Bucket",
"item.justdirethings.portal_fluid_catalyst": "Portal Fluid Catalyst",
"item.justdirethings.portalgun": "Portal Gun",
Expand Down Expand Up @@ -252,6 +254,8 @@
"justdirethings.ability.orescanner": "Ore Scanner",
"justdirethings.ability.orexray": "X-Ray",
"justdirethings.ability.phase": "Phase",
"justdirethings.ability.polymorph_random": "Random Polymorph",
"justdirethings.ability.polymorph_target": "Targeted Polymorph",
"justdirethings.ability.potionarrow": "Potion Arrow",
"justdirethings.ability.runspeed": "Run Speed",
"justdirethings.ability.skysweeper": "Sky Sweeper",
Expand Down Expand Up @@ -316,6 +320,7 @@
"justdirethings.hint.dropinwater": "Drop in Water",
"justdirethings.homing.detailtext": "Arrows seek their targets",
"justdirethings.instabreak.detailtext": "Instantly break all blocks",
"justdirethings.invalidpolymorphentity": "Invalid Entity for Polymorphing",
"justdirethings.invulnerability.detailtext": "Activate for a few seconds of invulnerability",
"justdirethings.invulnerability.flavortext": "Bring it!!",
"justdirethings.jumpboost.detailtext": "Jump Higher",
Expand Down Expand Up @@ -349,6 +354,8 @@
"justdirethings.pocketgeneratorburntime": "Burn Time: %f / %f",
"justdirethings.pocketgeneratorfuelstack": "Fuel: %f %s",
"justdirethings.pocketgeneratornofuel": "Fuel Empty",
"justdirethings.polymorphicfluidamt": "Polymorphic Fluid: %s / %s",
"justdirethings.polymorphset": "Polymorph Target: %s",
"justdirethings.portalfluidamt": "Portal Fluid: %s / %s",
"justdirethings.potionarrow.detailtext": "Insert a Potion Canister to apply effects to enemies",
"justdirethings.potionarrow.flavortext": "Like Vanilla, without inventory issues...",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "justdirethings:item/polymorphic_wand"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "justdirethings:item/polymorphic_wand_v2"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_blazegold_ingot": {
"conditions": {
"items": [
{
"items": "justdirethings:blazegold_ingot"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "justdirethings:polymorphic_wand"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_the_recipe",
"has_blazegold_ingot"
]
],
"rewards": {
"recipes": [
"justdirethings:polymorphic_wand"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_eclipsealloy_ingot": {
"conditions": {
"items": [
{
"items": "justdirethings:eclipsealloy_ingot"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "justdirethings:polymorphic_wand_v2"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_the_recipe",
"has_eclipsealloy_ingot"
]
],
"rewards": {
"recipes": [
"justdirethings:polymorphic_wand_v2"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"group": "justdirethings",
"key": {
"b": {
"item": "justdirethings:fluid_canister"
},
"i": {
"item": "justdirethings:blazegold_ingot"
},
"r": {
"item": "justdirethings:polymorphic_catalyst"
}
},
"pattern": [
" b",
" r ",
"i "
],
"result": {
"count": 1,
"id": "justdirethings:polymorphic_wand"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"group": "justdirethings",
"key": {
"b": {
"item": "justdirethings:eclipsealloy_ingot"
},
"i": {
"item": "justdirethings:celestigem"
},
"r": {
"item": "justdirethings:polymorphic_wand"
}
},
"pattern": [
" b",
" r ",
"i "
],
"result": {
"count": 1,
"id": "justdirethings:polymorphic_wand_v2"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"values": [
"minecraft:zombie",
"minecraft:skeleton",
"minecraft:creeper",
"minecraft:spider",
"minecraft:enderman",
"minecraft:silverfish",
"minecraft:zombified_piglin",
"minecraft:piglin",
"minecraft:piglin_brute",
"minecraft:hoglin",
"minecraft:zoglin",
"minecraft:ghast",
"minecraft:blaze",
"minecraft:slime",
"minecraft:witch",
"minecraft:rabbit",
"minecraft:endermite",
"minecraft:stray",
"minecraft:wither_skeleton",
"minecraft:skeleton_horse",
"minecraft:zombie_horse",
"minecraft:zombie_villager",
"minecraft:husk",
"minecraft:guardian",
"minecraft:evoker",
"minecraft:vex",
"minecraft:vindicator",
"minecraft:shulker",
"minecraft:drowned",
"minecraft:phantom",
"minecraft:pillager"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"values": [
"minecraft:sheep",
"minecraft:pig",
"minecraft:cow",
"minecraft:mooshroom",
"minecraft:chicken",
"minecraft:bat",
"minecraft:villager",
"minecraft:squid",
"minecraft:ocelot",
"minecraft:wolf",
"minecraft:horse",
"minecraft:rabbit",
"minecraft:donkey",
"minecraft:mule",
"minecraft:polar_bear",
"minecraft:llama",
"minecraft:parrot",
"minecraft:dolphin",
"minecraft:cod",
"minecraft:salmon",
"minecraft:pufferfish",
"minecraft:tropical_fish",
"minecraft:turtle",
"minecraft:cat",
"minecraft:fox",
"minecraft:panda",
"minecraft:trader_llama",
"minecraft:wandering_trader",
"minecraft:strider",
"minecraft:glow_squid",
"minecraft:goat",
"minecraft:bee",
"minecraft:frog",
"minecraft:tadpole",
"minecraft:camel",
"minecraft:axolotl"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"values": [
"minecraft:ender_dragon",
"minecraft:wither",
"minecraft:warden"
]
}
39 changes: 34 additions & 5 deletions src/main/java/com/direwolf20/justdirethings/JustDireThings.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
import com.direwolf20.justdirethings.common.capabilities.ExperienceHolderFluidTank;
import com.direwolf20.justdirethings.common.containers.handlers.PotionCanisterHandler;
import com.direwolf20.justdirethings.common.entities.DecoyEntity;
import com.direwolf20.justdirethings.common.items.FluidCanister;
import com.direwolf20.justdirethings.common.items.PortalGunV2;
import com.direwolf20.justdirethings.common.items.TimeWand;
import com.direwolf20.justdirethings.common.items.*;
import com.direwolf20.justdirethings.common.items.datacomponents.JustDireDataComponents;
import com.direwolf20.justdirethings.common.items.interfaces.PoweredItem;
import com.direwolf20.justdirethings.common.network.PacketHandler;
Expand Down Expand Up @@ -136,7 +134,8 @@ private void registerCapabilities(RegisterCapabilitiesEvent event) {
Registration.EclipseAlloyHelmet.get(),
Registration.CelestigemBow.get(),
Registration.EclipseAlloyBow.get(),
Registration.TimeWand.get()
Registration.TimeWand.get(),
Registration.PolymorphicWandV2.get()
);

event.registerItem(Capabilities.FluidHandler.ITEM, (itemStack, context) -> {
Expand Down Expand Up @@ -168,14 +167,44 @@ public boolean canFillFluidType(FluidStack fluid) {

};
}
if (itemStack.getItem() instanceof PolymorphicWand polymorphicWand) {
return new FluidHandlerItemStack(JustDireDataComponents.FLUID_CONTAINER, itemStack, polymorphicWand.getMaxMB()) {
@Override
public boolean isFluidValid(int tank, FluidStack stack) {
return stack.is(Registration.POLYMORPHIC_FLUID_TYPE.get());
}

@Override
public boolean canFillFluidType(FluidStack fluid) {
return fluid.is(Registration.POLYMORPHIC_FLUID_TYPE.get());
}

};
}
if (itemStack.getItem() instanceof PolymorphicWandV2 polymorphicWandv2) {
return new FluidHandlerItemStack(JustDireDataComponents.FLUID_CONTAINER, itemStack, polymorphicWandv2.getMaxMB()) {
@Override
public boolean isFluidValid(int tank, FluidStack stack) {
return stack.is(Registration.POLYMORPHIC_FLUID_TYPE.get());
}

@Override
public boolean canFillFluidType(FluidStack fluid) {
return fluid.is(Registration.POLYMORPHIC_FLUID_TYPE.get());
}

};
}
if (itemStack.getItem() instanceof FluidCanister fluidCanister) {
return new FluidHandlerItemStack(JustDireDataComponents.FLUID_CONTAINER, itemStack, fluidCanister.getMaxMB());
}
return null;
},
Registration.PortalGunV2.get(),
Registration.FluidCanister.get(),
Registration.TimeWand.get()
Registration.TimeWand.get(),
Registration.PolymorphicWand.get(),
Registration.PolymorphicWandV2.get()
);

//Blocks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ public boolean render(GuiGraphics guiGraphics, Font font, ItemStack stack, int x
if (stack.getItem() instanceof PoweredItem poweredItem) {
isPowerBarVisible = poweredItem.isPowerBarVisible(stack);
}
if (stack.isBarVisible())
isPowerBarVisible = true;

// Retrieve fluid capability
boolean isFluidBarVisible = fluidContainingItem.isFluidBarVisible(stack);
Expand Down
Loading

0 comments on commit 415df05

Please sign in to comment.