generated from NeoForgeMDKs/MDK-1.21-NeoGradle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main'
- Loading branch information
Showing
27 changed files
with
1,169 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/generated/resources/.cache/7383b985a2cdbb3a068dc5fd3ae4ba545545c370
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/generated/resources/.cache/9419a4a367f91ae64b7a192c54b5d646e8c9a939
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// 1.21.1 2024-09-10T20:26:46.030593 Global Loot Modifiers : modjam | ||
e7f11a46f5a3672b7ccab65e075c363596d0bf4b data/modjam/loot_modifiers/elder_guardian_modifier.json | ||
197ecc005cf8fcaa86f4fedcff635b94804f9aa2 data/modjam/loot_modifiers/guardian_modifier.json | ||
4c83e5f61706ea5181128230627d9cfff7e3c15b data/modjam/loot_modifiers/ocean_ruins_modifier.json | ||
c011af8fc50a517e0473e9113f9a2672c854d882 data/modjam/loot_modifiers/shipwreck_modifier.json | ||
655a48f63f1b41627dd1fc25c31ad537eb8da0ca data/modjam/loot_modifiers/suspicious_ruins_sand_modifier.json | ||
15f14af3dcb92ee9a8901ef211bd4feb415420bf data/neoforge/loot_modifiers/global_loot_modifiers.json |
6 changes: 6 additions & 0 deletions
6
src/generated/resources/assets/modjam/models/item/etching_acid_bucket.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"parent": "minecraft:item/generated", | ||
"textures": { | ||
"layer0": "modjam:item/etching_acid_bucket" | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
src/generated/resources/data/modjam/loot_modifiers/elder_guardian_modifier.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"type": "modjam:add_item", | ||
"conditions": [ | ||
{ | ||
"condition": "neoforge:loot_table_id", | ||
"loot_table_id": "minecraft:entities/elder_guardian" | ||
}, | ||
{ | ||
"chance": 1.0, | ||
"condition": "minecraft:random_chance" | ||
} | ||
], | ||
"item": { | ||
"components": { | ||
"minecraft:container_loot": { | ||
"loot_table": "modjam:chests/crate" | ||
} | ||
}, | ||
"count": 1, | ||
"id": "modjam:crate" | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/generated/resources/data/modjam/loot_modifiers/guardian_modifier.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"type": "neoforge:add_table", | ||
"conditions": [ | ||
{ | ||
"condition": "neoforge:loot_table_id", | ||
"loot_table_id": "minecraft:entities/guardian" | ||
}, | ||
{ | ||
"chance": 0.2, | ||
"condition": "minecraft:random_chance" | ||
} | ||
], | ||
"table": "modjam:entities/guardian" | ||
} |
31 changes: 31 additions & 0 deletions
31
src/generated/resources/data/modjam/loot_modifiers/ocean_ruins_modifier.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"type": "modjam:add_item", | ||
"conditions": [ | ||
{ | ||
"condition": "minecraft:any_of", | ||
"terms": [ | ||
{ | ||
"condition": "neoforge:loot_table_id", | ||
"loot_table_id": "minecraft:chests/underwater_ruin_big" | ||
}, | ||
{ | ||
"condition": "neoforge:loot_table_id", | ||
"loot_table_id": "minecraft:chests/underwater_ruin_small" | ||
} | ||
] | ||
}, | ||
{ | ||
"chance": 0.33, | ||
"condition": "minecraft:random_chance" | ||
} | ||
], | ||
"item": { | ||
"components": { | ||
"minecraft:container_loot": { | ||
"loot_table": "modjam:chests/crate" | ||
} | ||
}, | ||
"count": 1, | ||
"id": "modjam:crate" | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
src/generated/resources/data/modjam/loot_modifiers/shipwreck_modifier.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"type": "modjam:add_item", | ||
"conditions": [ | ||
{ | ||
"condition": "neoforge:loot_table_id", | ||
"loot_table_id": "minecraft:chests/shipwreck_treasure" | ||
}, | ||
{ | ||
"chance": 0.33, | ||
"condition": "minecraft:random_chance" | ||
} | ||
], | ||
"item": { | ||
"components": { | ||
"minecraft:container_loot": { | ||
"loot_table": "modjam:chests/crate" | ||
} | ||
}, | ||
"count": 1, | ||
"id": "modjam:crate" | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
src/generated/resources/data/modjam/loot_modifiers/suspicious_ruins_sand_modifier.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"type": "modjam:add_item", | ||
"conditions": [ | ||
{ | ||
"condition": "neoforge:loot_table_id", | ||
"loot_table_id": "minecraft:archaeology/ocean_ruin_warm" | ||
}, | ||
{ | ||
"chance": 0.05, | ||
"condition": "minecraft:random_chance" | ||
} | ||
], | ||
"item": { | ||
"components": { | ||
"minecraft:container_loot": { | ||
"loot_table": "modjam:chests/crate" | ||
} | ||
}, | ||
"count": 1, | ||
"id": "modjam:crate" | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
src/generated/resources/data/neoforge/loot_modifiers/global_loot_modifiers.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"entries": [ | ||
"modjam:ocean_ruins_modifier", | ||
"modjam:guardian_modifier", | ||
"modjam:elder_guardian_modifier", | ||
"modjam:suspicious_ruins_sand_modifier", | ||
"modjam:shipwreck_modifier" | ||
], | ||
"replace": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
src/main/java/com/portingdeadmods/modjam/content/items/DivingSuitArmorItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package com.portingdeadmods.modjam.content.items; | ||
|
||
import com.portingdeadmods.modjam.registries.MJItems; | ||
import net.minecraft.ChatFormatting; | ||
import net.minecraft.core.Holder; | ||
import net.minecraft.network.chat.Component; | ||
import net.minecraft.world.entity.Entity; | ||
import net.minecraft.world.entity.EquipmentSlot; | ||
import net.minecraft.world.entity.player.Player; | ||
import net.minecraft.world.item.ArmorItem; | ||
import net.minecraft.world.item.ArmorMaterial; | ||
import net.minecraft.world.item.ItemStack; | ||
import net.minecraft.world.item.TooltipFlag; | ||
import net.minecraft.world.level.Level; | ||
|
||
import java.util.List; | ||
|
||
public class DivingSuitArmorItem extends ArmorItem { | ||
|
||
public DivingSuitArmorItem(Holder<ArmorMaterial> material, Type type, Properties properties) { | ||
super(material, type, properties); | ||
} | ||
|
||
@Override | ||
public int getMaxStackSize(ItemStack stack) { | ||
return 1; | ||
} | ||
|
||
@Override | ||
public void inventoryTick(ItemStack stack, Level level, Entity entity, int slotId, boolean isSelected) { | ||
if(entity instanceof Player player) { | ||
if(player.getItemBySlot(EquipmentSlot.HEAD).is(MJItems.DIVING_HELMET) && player.getItemBySlot(EquipmentSlot.CHEST).is(MJItems.DIVING_CHESTPLATE) && player.getItemBySlot(EquipmentSlot.LEGS).is(MJItems.DIVING_LEGGINGS) && player.getItemBySlot(EquipmentSlot.FEET).is(MJItems.DIVING_BOOTS)) { | ||
if(player.isUnderWater()) { | ||
player.setAirSupply(player.getMaxAirSupply()); | ||
} | ||
} | ||
} | ||
} | ||
|
||
@Override | ||
public void appendHoverText(ItemStack stack, TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) { | ||
if(stack.is(MJItems.DIVING_HELMET.get())) { | ||
tooltipComponents.add(Component.literal("Allows you to see better underwater.").withStyle(ChatFormatting.GRAY)); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
src/main/java/com/portingdeadmods/modjam/datagen/LootModifierProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package com.portingdeadmods.modjam.datagen; | ||
|
||
import com.portingdeadmods.modjam.ModJam; | ||
import com.portingdeadmods.modjam.loot.AddItemModifier; | ||
import com.portingdeadmods.modjam.registries.MJBlocks; | ||
import com.portingdeadmods.modjam.registries.MJLootTables; | ||
import net.minecraft.core.HolderLookup; | ||
import net.minecraft.core.component.DataComponents; | ||
import net.minecraft.data.PackOutput; | ||
import net.minecraft.resources.ResourceLocation; | ||
import net.minecraft.world.item.ItemStack; | ||
import net.minecraft.world.item.component.SeededContainerLoot; | ||
import net.minecraft.world.level.storage.loot.predicates.LootItemCondition; | ||
import net.minecraft.world.level.storage.loot.predicates.LootItemRandomChanceCondition; | ||
import net.neoforged.neoforge.common.data.GlobalLootModifierProvider; | ||
import net.neoforged.neoforge.common.loot.AddTableLootModifier; | ||
import net.neoforged.neoforge.common.loot.LootTableIdCondition; | ||
|
||
import java.util.Random; | ||
import java.util.concurrent.CompletableFuture; | ||
|
||
public class LootModifierProvider extends GlobalLootModifierProvider { | ||
public LootModifierProvider(PackOutput output, CompletableFuture<HolderLookup.Provider> registries) { | ||
super(output, registries, ModJam.MODID); | ||
} | ||
|
||
@Override | ||
protected void start() { | ||
ItemStack crate = MJBlocks.CRATE.toStack(); | ||
crate.set(DataComponents.CONTAINER_LOOT,new SeededContainerLoot(MJLootTables.CRATE,0)); | ||
add("elder_guardian_modifier", | ||
new AddItemModifier(new LootItemCondition[]{ | ||
LootTableIdCondition.builder(ResourceLocation.parse("entities/elder_guardian")).build(), | ||
LootItemRandomChanceCondition.randomChance(1.0f).build()} | ||
,crate)); | ||
add("guardian_modifier", | ||
new AddTableLootModifier(new LootItemCondition[]{ | ||
LootTableIdCondition.builder(ResourceLocation.parse("entities/guardian")).build(), | ||
LootItemRandomChanceCondition.randomChance(0.20f).build()} | ||
,MJLootTables.GUARDIAN)); | ||
add("shipwreck_modifier", | ||
new AddItemModifier(new LootItemCondition[]{ | ||
LootTableIdCondition.builder(ResourceLocation.parse("chests/shipwreck_treasure")).build(), | ||
LootItemRandomChanceCondition.randomChance(0.33f).build()} | ||
,crate)); | ||
add("ocean_ruins_modifier", | ||
new AddItemModifier(new LootItemCondition[]{ | ||
LootTableIdCondition.builder(ResourceLocation.parse("chests/underwater_ruin_big")).or(LootTableIdCondition.builder(ResourceLocation.parse("chests/underwater_ruin_small"))).build(), | ||
LootItemRandomChanceCondition.randomChance(0.33f).build()} | ||
,crate)); | ||
add("suspicious_ruins_sand_modifier", | ||
new AddItemModifier(new LootItemCondition[]{ | ||
LootTableIdCondition.builder(ResourceLocation.parse("archaeology/ocean_ruin_warm")).build(), | ||
LootItemRandomChanceCondition.randomChance(0.05f).build()} | ||
,crate)); | ||
|
||
} | ||
} |
Oops, something went wrong.