This commit is contained in:
Kaupenjoe
2023-08-25 20:03:01 +02:00
parent f14aa69ed7
commit a4d66ec1fc
19 changed files with 137 additions and 4 deletions

View File

@@ -1,4 +1,5 @@
// 1.20.1 2023-08-25T18:43:33.7676698 Item Models: tutorialmod
// 1.20.1 2023-08-25T20:00:29.1439601 Item Models: tutorialmod
d3e9cad00ae44c9319dfbb411667eb4a09a63e57 assets/tutorialmod/models/item/catmint.json
6126e26da373f9113d9e9be875b14a0d13857444 assets/tutorialmod/models/item/corn.json
4c5c277fa6360b149d6c3ab20584fcc4450cda27 assets/tutorialmod/models/item/corn_seeds.json
93719e53df04c62d91023fe733206eb93b7aac86 assets/tutorialmod/models/item/metal_detector.json

View File

@@ -1,8 +1,10 @@
// 1.20.1 2023-08-25T18:43:33.7666559 Block States: tutorialmod
// 1.20.1 2023-08-25T20:00:29.1439601 Block States: tutorialmod
4f6f6f43eb03fe4d9e5ce223f245812e0d7eae93 assets/tutorialmod/blockstates/catmint.json
d537bf85846bd7eeffa314408c867cc1a7d531d5 assets/tutorialmod/blockstates/corn_crop.json
a3ad172be3e203ff6840db063558f809a86ca15a assets/tutorialmod/blockstates/deepslate_sapphire_ore.json
890efea75d7398469e0d7d5704472303c35fae62 assets/tutorialmod/blockstates/end_stone_sapphire_ore.json
0198f629d0db6eb40ebd91067bbe631626116b54 assets/tutorialmod/blockstates/nether_sapphire_ore.json
55ae2b8c248ffe83a87a26b6c0f87c784f9049db assets/tutorialmod/blockstates/potted_catmint.json
2f46112fe9e6610ea4c37e87e511da1849b54274 assets/tutorialmod/blockstates/raw_sapphire_block.json
d02d1f6c412fc7b220ed18e30956d68f9a29bbb3 assets/tutorialmod/blockstates/sapphire_block.json
70b8dc38442f9b57d24a192f9f33ae184e440f1d assets/tutorialmod/blockstates/sapphire_button.json
@@ -17,6 +19,7 @@ f0189f740d5f66bdbf03bf833b7f89a0439615f8 assets/tutorialmod/blockstates/sapphire
2af36ae7d141d045a91f520bcc8da0c216bf2ccb assets/tutorialmod/blockstates/sapphire_wall.json
7e439f9c39ea91be588ddc78cf4cd903b5b9cb70 assets/tutorialmod/blockstates/sound_block.json
e7f53e64f659401806aad6003e5356aac69c0a08 assets/tutorialmod/blockstates/strawberry_crop.json
20a742ea61b61bfcdcce006fd7b87dd9ad257a2f assets/tutorialmod/models/block/catmint.json
1052548f03dcd89a42fba5f0b6255dbb94ccc937 assets/tutorialmod/models/block/corn_stage_0.json
2c3b6838a486dcc1685dc9909d0bd7dbcdadd587 assets/tutorialmod/models/block/corn_stage_1.json
823aa05ad0633dc6fa1f8eb719f161a3d6ade1a1 assets/tutorialmod/models/block/corn_stage_2.json
@@ -29,6 +32,7 @@ cf760df02741eab6d508ac36d3ffecdef636ce0a assets/tutorialmod/models/block/corn_st
f98cb6175399c28ce46a77b4e68664303bc2c3d3 assets/tutorialmod/models/block/deepslate_sapphire_ore.json
0c40efccb23d85e5bdf98a041a64a110359aed7c assets/tutorialmod/models/block/end_stone_sapphire_ore.json
5df59719eaf8bf42bcfeee7e2154e96a044c2703 assets/tutorialmod/models/block/nether_sapphire_ore.json
9c70f1f42c44d3c9344dfa19467f7131bc66610b assets/tutorialmod/models/block/potted_catmint.json
44cf187b6c956a3e79927dd84615b47b1bfe4ff0 assets/tutorialmod/models/block/raw_sapphire_block.json
7fbf9623622901217c1f548068b550115551eb45 assets/tutorialmod/models/block/sapphire_block.json
30598644a76a45a2883a5b1dca9e271d809081b9 assets/tutorialmod/models/block/sapphire_button.json
@@ -68,9 +72,11 @@ b6bd6b99d1b444b7f23c3ff006f58fe5db405ca1 assets/tutorialmod/models/block/strawbe
4bea81641ddb82a0a78e324c05ddb794ffcd8cb4 assets/tutorialmod/models/block/strawberry_stage3.json
d980ad62eb5f6b15090ea6557bc28483ad68f0ff assets/tutorialmod/models/block/strawberry_stage4.json
b14b9dd2aa2d96cbbb4d20f9d0741c1bf4476786 assets/tutorialmod/models/block/strawberry_stage5.json
71616f74a5e0922f50c9869941f63040b82c0499 assets/tutorialmod/models/item/catmint.json
251495c94fbf35dd43cd773e6cf31533a8b72f09 assets/tutorialmod/models/item/deepslate_sapphire_ore.json
bf5cdde3dfa3effdde9c4358ecb01c39922d7945 assets/tutorialmod/models/item/end_stone_sapphire_ore.json
81ecae58cc575e9ce9d7f21881bbccb6bbfb4432 assets/tutorialmod/models/item/nether_sapphire_ore.json
1a7f76b967a6270a0443871f08ca1a655740a97d assets/tutorialmod/models/item/potted_catmint.json
a7f864f8f8c67b25b34627c0dd8357e96b5d5c79 assets/tutorialmod/models/item/raw_sapphire_block.json
2bf7f614770184be679bb0313dc04832b7fdd577 assets/tutorialmod/models/item/sapphire_block.json
9607e08401cad098096f2d09cf41f23d6af6217a assets/tutorialmod/models/item/sapphire_ore.json

View File

@@ -1,8 +1,10 @@
// 1.20.1 2023-08-25T18:43:33.7656337 Loot Tables
// 1.20.1 2023-08-25T20:00:29.1418946 Loot Tables
a5308914890f4fbc6d39248caa834f368767be60 data/tutorialmod/loot_tables/blocks/catmint.json
6c9ebf0160580ee21535fe3b1a2a5cd808cacb89 data/tutorialmod/loot_tables/blocks/corn_crop.json
3655045aeb4e2ae62e9069b0db07927965a12389 data/tutorialmod/loot_tables/blocks/deepslate_sapphire_ore.json
629bc7af98fd6a08d902f9c3e46896fc09101f43 data/tutorialmod/loot_tables/blocks/end_stone_sapphire_ore.json
c615daffa6bb4a20fd0f4d36534331bdbeff2746 data/tutorialmod/loot_tables/blocks/nether_sapphire_ore.json
64ba5568715cb39bbac17bf9a847cf65f79bec13 data/tutorialmod/loot_tables/blocks/potted_catmint.json
81e9322ae4c5141fd110a8f87cc92d7af008fd1e data/tutorialmod/loot_tables/blocks/raw_sapphire_block.json
d844cbb192590a5e4278fd1a5c5906e40c594e24 data/tutorialmod/loot_tables/blocks/sapphire_block.json
9f5a63f9e0753091ae43e39315eba445f05571cd data/tutorialmod/loot_tables/blocks/sapphire_button.json

View File

@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "tutorialmod:block/catmint"
}
}
}

View File

@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "tutorialmod:block/potted_catmint"
}
}
}

View File

@@ -0,0 +1,7 @@
{
"parent": "minecraft:block/cross",
"render_type": "minecraft:cutout",
"textures": {
"cross": "tutorialmod:block/catmint"
}
}

View File

@@ -0,0 +1,7 @@
{
"parent": "minecraft:block/flower_pot_cross",
"render_type": "minecraft:cutout",
"textures": {
"plant": "tutorialmod:block/catmint"
}
}

View File

@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "tutorialmod:block/catmint"
}
}

View File

@@ -0,0 +1,3 @@
{
"parent": "tutorialmod:block/potted_catmint"
}

View File

@@ -0,0 +1,21 @@
{
"type": "minecraft:block",
"pools": [
{
"bonus_rolls": 0.0,
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
],
"entries": [
{
"type": "minecraft:item",
"name": "tutorialmod:catmint"
}
],
"rolls": 1.0
}
],
"random_sequence": "tutorialmod:blocks/catmint"
}

View File

@@ -0,0 +1,36 @@
{
"type": "minecraft:block",
"pools": [
{
"bonus_rolls": 0.0,
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
],
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:flower_pot"
}
],
"rolls": 1.0
},
{
"bonus_rolls": 0.0,
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
],
"entries": [
{
"type": "minecraft:item",
"name": "tutorialmod:catmint"
}
],
"rolls": 1.0
}
],
"random_sequence": "tutorialmod:blocks/potted_catmint"
}

View File

@@ -6,6 +6,8 @@ import net.kaupenjoe.tutorialmod.item.ModCreativeModTabs;
import net.kaupenjoe.tutorialmod.item.ModItems;
import net.kaupenjoe.tutorialmod.loot.ModLootModifiers;
import net.minecraft.world.item.CreativeModeTabs;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.FlowerPotBlock;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.BuildCreativeModeTabContentsEvent;
@@ -41,7 +43,9 @@ public class TutorialMod {
}
private void commonSetup(final FMLCommonSetupEvent event) {
event.enqueueWork(() -> {
((FlowerPotBlock) Blocks.FLOWER_POT).addPlant(ModBlocks.CATMINT.getId(), ModBlocks.POTTED_CATMINT);
});
}
private void addCreative(BuildCreativeModeTabContentsEvent event) {

View File

@@ -7,6 +7,7 @@ import net.kaupenjoe.tutorialmod.block.custom.StrawberryCropBlock;
import net.kaupenjoe.tutorialmod.item.ModItems;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.util.valueproviders.UniformInt;
import net.minecraft.world.effect.MobEffects;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.block.*;
@@ -77,6 +78,12 @@ public class ModBlocks {
() -> new CornCropBlock(BlockBehaviour.Properties.copy(Blocks.WHEAT).noOcclusion().noCollission()));
public static final RegistryObject<Block> CATMINT = registerBlock("catmint",
() -> new FlowerBlock(() -> MobEffects.LUCK, 5,
BlockBehaviour.Properties.copy(Blocks.ALLIUM).noOcclusion().noCollission()));
public static final RegistryObject<Block> POTTED_CATMINT = BLOCKS.register("potted_catmint",
() -> new FlowerPotBlock(() -> ((FlowerPotBlock) Blocks.FLOWER_POT), ModBlocks.CATMINT,
BlockBehaviour.Properties.copy(Blocks.POTTED_ALLIUM).noOcclusion()));
private static <T extends Block> RegistryObject<T> registerBlock(String name, Supplier<T> block) {

View File

@@ -47,6 +47,11 @@ public class ModBlockStateProvider extends BlockStateProvider {
makeStrawberryCrop((CropBlock) ModBlocks.STRAWBERRY_CROP.get(), "strawberry_stage", "strawberry_stage");
makeCornCrop(((CropBlock) ModBlocks.CORN_CROP.get()), "corn_stage_", "corn_stage_");
simpleBlockWithItem(ModBlocks.CATMINT.get(), models().cross(blockTexture(ModBlocks.CATMINT.get()).getPath(),
blockTexture(ModBlocks.CATMINT.get())).renderType("cutout"));
simpleBlockWithItem(ModBlocks.POTTED_CATMINT.get(), models().singleTexture("potted_catmint", new ResourceLocation("flower_pot_cross"), "plant",
blockTexture(ModBlocks.CATMINT.get())).renderType("cutout"));
}

View File

@@ -76,6 +76,8 @@ public class ModItemModelProvider extends ItemModelProvider {
trimmedArmorItem(ModItems.SAPPHIRE_CHESTPLATE);
trimmedArmorItem(ModItems.SAPPHIRE_LEGGINGS);
trimmedArmorItem(ModItems.SAPPHIRE_BOOTS);
simpleBlockItemBlockTexture(ModBlocks.CATMINT);
}
// Shoutout to El_Redstoniano for making this
@@ -168,4 +170,10 @@ public class ModItemModelProvider extends ItemModelProvider {
new ResourceLocation("item/generated")).texture("layer0",
new ResourceLocation(TutorialMod.MOD_ID,"item/" + item.getId().getPath()));
}
private ItemModelBuilder simpleBlockItemBlockTexture(RegistryObject<Block> item) {
return withExistingParent(item.getId().getPath(),
new ResourceLocation("item/generated")).texture("layer0",
new ResourceLocation(TutorialMod.MOD_ID,"block/" + item.getId().getPath()));
}
}

View File

@@ -78,6 +78,8 @@ public class ModBlockLootTables extends BlockLootSubProvider {
this.add(ModBlocks.CORN_CROP.get(), createCropDrops(ModBlocks.CORN_CROP.get(), ModItems.CORN.get(),
ModItems.CORN_SEEDS.get(), lootitemcondition$builder2));
this.dropSelf(ModBlocks.CATMINT.get());
this.add(ModBlocks.POTTED_CATMINT.get(), createPotFlowerItemTable(ModBlocks.CATMINT.get()));
}
protected LootTable.Builder createCopperLikeOreDrops(Block pBlock, Item item) {

View File

@@ -68,6 +68,8 @@ public class ModCreativeModTabs {
pOutput.accept(ModBlocks.SAPPHIRE_DOOR.get());
pOutput.accept(ModBlocks.SAPPHIRE_TRAPDOOR.get());
pOutput.accept(ModBlocks.CATMINT.get());
})
.build());

View File

@@ -42,6 +42,8 @@
"block.tutorialmod.sapphire_wall": "Sapphire Wall",
"block.tutorialmod.sapphire_door": "Sapphire Door",
"block.tutorialmod.sapphire_trapdoor": "Sapphire Trapdoor",
"block.tutorialmod.catmint": "Catmint",
"tooltip.tutorialmod.metal_detector.tooltip": "Finds valuables underground!",

Binary file not shown.

After

Width:  |  Height:  |  Size: 435 B