custom wood

This commit is contained in:
Kaupenjoe
2023-10-09 09:15:29 +02:00
parent 31150720f8
commit 1913df4cc4
50 changed files with 637 additions and 8 deletions

View File

@@ -1,4 +1,6 @@
// 1.20.1 2023-08-28T16:11:02.6575435 Tags for minecraft:item mod id tutorialmod
// 1.20.1 2023-10-09T09:11:10.9792109 Tags for minecraft:item mod id tutorialmod
526ec127a145db02975e7ec564384fa0a5389523 data/minecraft/tags/items/creeper_drop_music_discs.json
c2b83641ed55fb63151b60b22efaa8a05b24629b data/minecraft/tags/items/logs_that_burn.json
526ec127a145db02975e7ec564384fa0a5389523 data/minecraft/tags/items/music_discs.json
6d2298526792ca18d84ed50a4b4d452e95f613e4 data/minecraft/tags/items/planks.json
2514998bb25494de346fa0d088b7e216d8165efd data/minecraft/tags/items/trimmable_armor.json

View File

@@ -1,10 +1,14 @@
// 1.20.1 2023-10-06T16:01:04.4071152 Block States: tutorialmod
// 1.20.1 2023-10-09T09:11:10.9781945 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
ff720ea0aea021144b8557786f6e7f9dead2fd78 assets/tutorialmod/blockstates/gem_polishing_station.json
0198f629d0db6eb40ebd91067bbe631626116b54 assets/tutorialmod/blockstates/nether_sapphire_ore.json
b56d75abb778cdd35622d3977f825c2693e38777 assets/tutorialmod/blockstates/pine_leaves.json
5615a2f4b8decb7e8e2bfef02d2e10cf95182e57 assets/tutorialmod/blockstates/pine_log.json
5a66e6c840d559e83f821cae22a3e48dd3785af1 assets/tutorialmod/blockstates/pine_planks.json
7f5690b866f0d2eec4954f4df7f48d210216227e assets/tutorialmod/blockstates/pine_wood.json
55ae2b8c248ffe83a87a26b6c0f87c784f9049db assets/tutorialmod/blockstates/potted_catmint.json
2f46112fe9e6610ea4c37e87e511da1849b54274 assets/tutorialmod/blockstates/raw_sapphire_block.json
d02d1f6c412fc7b220ed18e30956d68f9a29bbb3 assets/tutorialmod/blockstates/sapphire_block.json
@@ -20,6 +24,8 @@ 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
f6cd970826455b9f20c34835c56579f2cde3f2f8 assets/tutorialmod/blockstates/stripped_pine_log.json
c127412131c229accf94ac23dc4565b5039f7cf6 assets/tutorialmod/blockstates/stripped_pine_wood.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
@@ -33,6 +39,12 @@ 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
fe5a2155456cabb8f67e4afcb4a55b01fec6e87e assets/tutorialmod/models/block/pine_leaves.json
834bd48f42f632324bbdd52d47b17f5bf5bda70e assets/tutorialmod/models/block/pine_log.json
5f3487986c44906dbe95e549af4c31671a506916 assets/tutorialmod/models/block/pine_log_horizontal.json
dad917938a34a1cfbf24dedfb00622a33fe0ca39 assets/tutorialmod/models/block/pine_planks.json
429f7ef8fd5aa8b440239307ad7228404a709630 assets/tutorialmod/models/block/pine_wood.json
204ad0bc802884ab0b9a7e7c4ecbd9b87b15aaea assets/tutorialmod/models/block/pine_wood_horizontal.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
@@ -73,13 +85,23 @@ 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
d9f1262cb586a131f4ef9e6b15e1d052f934349c assets/tutorialmod/models/block/stripped_pine_log.json
2b4f1f0bdcad4f90690d4971294b54c6873de8c0 assets/tutorialmod/models/block/stripped_pine_log_horizontal.json
5c07883b8c76ffc56a4fde9747936c0098866c0c assets/tutorialmod/models/block/stripped_pine_wood.json
04534c445561ed2adeed241368439b9951780a3b assets/tutorialmod/models/block/stripped_pine_wood_horizontal.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
c6fe90ee84600fb9c1f42a398459a0d8b38fe198 assets/tutorialmod/models/item/gem_polishing_station.json
81ecae58cc575e9ce9d7f21881bbccb6bbfb4432 assets/tutorialmod/models/item/nether_sapphire_ore.json
2edec443a236a702d91b370bfa43f0dd789c7a6e assets/tutorialmod/models/item/pine_leaves.json
f8a200f45709b5a3e854d5d6885a848e58c7a355 assets/tutorialmod/models/item/pine_log.json
85005a9e827addf56424def15ec7987b034d7bf6 assets/tutorialmod/models/item/pine_planks.json
674ee7daf5f3e9a4d0fb1f75f819615a90fa1378 assets/tutorialmod/models/item/pine_wood.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
e1bcffd5dcbfb758a3668455d04d23c6efda02cf assets/tutorialmod/models/item/sound_block.json
ca27487cce3f5da1b4ea2be229b9505558ddedb1 assets/tutorialmod/models/item/stripped_pine_log.json
56b45a746bbd034511b81ff2691de0ac85a842e7 assets/tutorialmod/models/item/stripped_pine_wood.json

View File

@@ -1,10 +1,14 @@
// 1.20.1 2023-10-06T15:59:16.5165086 Loot Tables
// 1.20.1 2023-10-09T09:11:10.9766863 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
ae181fa3b2781be60d3127b43d33111085e53d7d data/tutorialmod/loot_tables/blocks/gem_polishing_station.json
c615daffa6bb4a20fd0f4d36534331bdbeff2746 data/tutorialmod/loot_tables/blocks/nether_sapphire_ore.json
abec125a87dc8cb635c88e4de835279131a17269 data/tutorialmod/loot_tables/blocks/pine_leaves.json
57ab8e1b21c0ed7823cb47210e9090f0e37ffd1a data/tutorialmod/loot_tables/blocks/pine_log.json
5e3fbaa8cb61660404a2a4449ab965d1c7940aa2 data/tutorialmod/loot_tables/blocks/pine_planks.json
0203579282aad7eb6c08abcf49145eec1bc33914 data/tutorialmod/loot_tables/blocks/pine_wood.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
@@ -20,3 +24,5 @@ b28a6c67228e945ebc84f0e867152b34facd8b16 data/tutorialmod/loot_tables/blocks/sap
900d403a6e84cc3d247e16f5dcb1fcf8802436a8 data/tutorialmod/loot_tables/blocks/sapphire_wall.json
4a8cfacccc2c162b32d7ced097c65185c5c5bc88 data/tutorialmod/loot_tables/blocks/sound_block.json
1f5745e65cfe5db7b41fcdf352e1a9f3378f9874 data/tutorialmod/loot_tables/blocks/strawberry_crop.json
8f124ad7aafb89b6a6bac5f235a72348c85ef7f5 data/tutorialmod/loot_tables/blocks/stripped_pine_log.json
c8e86fd6e644f2c0abfad143c43bbc294422c416 data/tutorialmod/loot_tables/blocks/stripped_pine_wood.json

View File

@@ -1,11 +1,13 @@
// 1.20.1 2023-08-07T08:23:43.2856618 Tags for minecraft:block mod id tutorialmod
// 1.20.1 2023-10-09T09:11:10.9781945 Tags for minecraft:block mod id tutorialmod
f7d4d746a89ba9704d89651d20d3b89098acdabd data/forge/tags/blocks/needs_netherite_tool.json
eb9c3bd4f434cd2ee198618689887868a03fc824 data/minecraft/tags/blocks/fences.json
0f23036eb868569b86c1fbde92de4c816b9df411 data/minecraft/tags/blocks/fence_gates.json
c2b83641ed55fb63151b60b22efaa8a05b24629b data/minecraft/tags/blocks/logs_that_burn.json
2c39ba5cecb79889f7925f62f972246a014552c8 data/minecraft/tags/blocks/mineable/pickaxe.json
b3dcb63d0640cd401308394400173ca7cb485665 data/minecraft/tags/blocks/needs_diamond_tool.json
025f458e5a24d4a0256cb9712e83d703d819dfdb data/minecraft/tags/blocks/needs_iron_tool.json
3a36f7f5f9de0d3325f1f444b84aa41eedfac5fc data/minecraft/tags/blocks/needs_stone_tool.json
6d2298526792ca18d84ed50a4b4d452e95f613e4 data/minecraft/tags/blocks/planks.json
39afac99ef2666de5a9686ccfc15e6f7611922c8 data/minecraft/tags/blocks/walls.json
031ec7111c8b7c57f798acd0b3605ceb1912498b data/tutorialmod/tags/blocks/metal_detector_valuables.json
047901bdc4a4ba4a4f71e4ed5689a158c75088e3 data/tutorialmod/tags/blocks/needs_sapphire_tool.json

View File

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

View File

@@ -0,0 +1,16 @@
{
"variants": {
"axis=x": {
"model": "tutorialmod:block/pine_log_horizontal",
"x": 90,
"y": 90
},
"axis=y": {
"model": "tutorialmod:block/pine_log"
},
"axis=z": {
"model": "tutorialmod:block/pine_log_horizontal",
"x": 90
}
}
}

View File

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

View File

@@ -0,0 +1,16 @@
{
"variants": {
"axis=x": {
"model": "tutorialmod:block/pine_wood_horizontal",
"x": 90,
"y": 90
},
"axis=y": {
"model": "tutorialmod:block/pine_wood"
},
"axis=z": {
"model": "tutorialmod:block/pine_wood_horizontal",
"x": 90
}
}
}

View File

@@ -0,0 +1,16 @@
{
"variants": {
"axis=x": {
"model": "tutorialmod:block/stripped_pine_log_horizontal",
"x": 90,
"y": 90
},
"axis=y": {
"model": "tutorialmod:block/stripped_pine_log"
},
"axis=z": {
"model": "tutorialmod:block/stripped_pine_log_horizontal",
"x": 90
}
}
}

View File

@@ -0,0 +1,16 @@
{
"variants": {
"axis=x": {
"model": "tutorialmod:block/stripped_pine_wood_horizontal",
"x": 90,
"y": 90
},
"axis=y": {
"model": "tutorialmod:block/stripped_pine_wood"
},
"axis=z": {
"model": "tutorialmod:block/stripped_pine_wood_horizontal",
"x": 90
}
}
}

View File

@@ -0,0 +1,7 @@
{
"parent": "minecraft:block/leaves",
"render_type": "minecraft:cutout",
"textures": {
"all": "tutorialmod:block/pine_leaves"
}
}

View File

@@ -0,0 +1,7 @@
{
"parent": "minecraft:block/cube_column",
"textures": {
"end": "tutorialmod:block/pine_log_top",
"side": "tutorialmod:block/pine_log"
}
}

View File

@@ -0,0 +1,7 @@
{
"parent": "minecraft:block/cube_column_horizontal",
"textures": {
"end": "tutorialmod:block/pine_log_top",
"side": "tutorialmod:block/pine_log"
}
}

View File

@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "tutorialmod:block/pine_planks"
}
}

View File

@@ -0,0 +1,7 @@
{
"parent": "minecraft:block/cube_column",
"textures": {
"end": "tutorialmod:block/pine_log",
"side": "tutorialmod:block/pine_log"
}
}

View File

@@ -0,0 +1,7 @@
{
"parent": "minecraft:block/cube_column_horizontal",
"textures": {
"end": "tutorialmod:block/pine_log",
"side": "tutorialmod:block/pine_log"
}
}

View File

@@ -0,0 +1,7 @@
{
"parent": "minecraft:block/cube_column",
"textures": {
"end": "tutorialmod:block/stripped_pine_log_top",
"side": "tutorialmod:block/stripped_pine_log"
}
}

View File

@@ -0,0 +1,7 @@
{
"parent": "minecraft:block/cube_column_horizontal",
"textures": {
"end": "tutorialmod:block/stripped_pine_log_top",
"side": "tutorialmod:block/stripped_pine_log"
}
}

View File

@@ -0,0 +1,7 @@
{
"parent": "minecraft:block/cube_column",
"textures": {
"end": "tutorialmod:block/stripped_pine_log",
"side": "tutorialmod:block/stripped_pine_log"
}
}

View File

@@ -0,0 +1,7 @@
{
"parent": "minecraft:block/cube_column_horizontal",
"textures": {
"end": "tutorialmod:block/stripped_pine_log",
"side": "tutorialmod:block/stripped_pine_log"
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,8 @@
{
"values": [
"tutorialmod:pine_log",
"tutorialmod:pine_wood",
"tutorialmod:stripped_pine_log",
"tutorialmod:stripped_pine_wood"
]
}

View File

@@ -0,0 +1,5 @@
{
"values": [
"tutorialmod:pine_planks"
]
}

View File

@@ -0,0 +1,8 @@
{
"values": [
"tutorialmod:pine_log",
"tutorialmod:pine_wood",
"tutorialmod:stripped_pine_log",
"tutorialmod:stripped_pine_wood"
]
}

View File

@@ -0,0 +1,5 @@
{
"values": [
"tutorialmod:pine_planks"
]
}

View File

@@ -0,0 +1,136 @@
{
"type": "minecraft:block",
"pools": [
{
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:alternatives",
"children": [
{
"type": "minecraft:item",
"conditions": [
{
"condition": "minecraft:any_of",
"terms": [
{
"condition": "minecraft:match_tool",
"predicate": {
"items": [
"minecraft:shears"
]
}
},
{
"condition": "minecraft:match_tool",
"predicate": {
"enchantments": [
{
"enchantment": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
]
}
],
"name": "tutorialmod:pine_leaves"
},
{
"type": "minecraft:item",
"conditions": [
{
"condition": "minecraft:survives_explosion"
},
{
"chances": [
0.05,
0.0625,
0.083333336,
0.1
],
"condition": "minecraft:table_bonus",
"enchantment": "minecraft:fortune"
}
],
"name": "tutorialmod:sapphire_block"
}
]
}
],
"rolls": 1.0
},
{
"bonus_rolls": 0.0,
"conditions": [
{
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:any_of",
"terms": [
{
"condition": "minecraft:match_tool",
"predicate": {
"items": [
"minecraft:shears"
]
}
},
{
"condition": "minecraft:match_tool",
"predicate": {
"enchantments": [
{
"enchantment": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
]
}
}
],
"entries": [
{
"type": "minecraft:item",
"conditions": [
{
"chances": [
0.02,
0.022222223,
0.025,
0.033333335,
0.1
],
"condition": "minecraft:table_bonus",
"enchantment": "minecraft:fortune"
}
],
"functions": [
{
"add": false,
"count": {
"type": "minecraft:uniform",
"max": 2.0,
"min": 1.0
},
"function": "minecraft:set_count"
},
{
"function": "minecraft:explosion_decay"
}
],
"name": "minecraft:stick"
}
],
"rolls": 1.0
}
],
"random_sequence": "tutorialmod:blocks/pine_leaves"
}

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:pine_log"
}
],
"rolls": 1.0
}
],
"random_sequence": "tutorialmod:blocks/pine_log"
}

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:pine_planks"
}
],
"rolls": 1.0
}
],
"random_sequence": "tutorialmod:blocks/pine_planks"
}

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:pine_wood"
}
],
"rolls": 1.0
}
],
"random_sequence": "tutorialmod:blocks/pine_wood"
}

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:stripped_pine_log"
}
],
"rolls": 1.0
}
],
"random_sequence": "tutorialmod:blocks/stripped_pine_log"
}

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:stripped_pine_wood"
}
],
"rolls": 1.0
}
],
"random_sequence": "tutorialmod:blocks/stripped_pine_wood"
}

View File

@@ -1,19 +1,20 @@
package net.kaupenjoe.tutorialmod.block;
import net.kaupenjoe.tutorialmod.TutorialMod;
import net.kaupenjoe.tutorialmod.block.custom.CornCropBlock;
import net.kaupenjoe.tutorialmod.block.custom.GemPolishingStationBlock;
import net.kaupenjoe.tutorialmod.block.custom.SoundBlock;
import net.kaupenjoe.tutorialmod.block.custom.StrawberryCropBlock;
import net.kaupenjoe.tutorialmod.block.custom.*;
import net.kaupenjoe.tutorialmod.item.ModItems;
import net.kaupenjoe.tutorialmod.sound.ModSounds;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
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.BlockGetter;
import net.minecraft.world.level.block.*;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.properties.BlockSetType;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.registries.DeferredRegister;
@@ -91,6 +92,50 @@ public class ModBlocks {
public static final RegistryObject<Block> GEM_POLISHING_STATION = registerBlock("gem_polishing_station",
() -> new GemPolishingStationBlock(BlockBehaviour.Properties.copy(Blocks.IRON_BLOCK).noOcclusion()));
public static final RegistryObject<Block> PINE_LOG = registerBlock("pine_log",
() -> new ModFlammableRotatedPillarBlock(BlockBehaviour.Properties.copy(Blocks.OAK_LOG).strength(3f)));
public static final RegistryObject<Block> PINE_WOOD = registerBlock("pine_wood",
() -> new ModFlammableRotatedPillarBlock(BlockBehaviour.Properties.copy(Blocks.OAK_WOOD).strength(3f)));
public static final RegistryObject<Block> STRIPPED_PINE_LOG = registerBlock("stripped_pine_log",
() -> new ModFlammableRotatedPillarBlock(BlockBehaviour.Properties.copy(Blocks.STRIPPED_OAK_LOG).strength(3f)));
public static final RegistryObject<Block> STRIPPED_PINE_WOOD = registerBlock("stripped_pine_wood",
() -> new ModFlammableRotatedPillarBlock(BlockBehaviour.Properties.copy(Blocks.STRIPPED_OAK_WOOD).strength(3f)));
public static final RegistryObject<Block> PINE_PLANKS = registerBlock("pine_planks",
() -> new Block(BlockBehaviour.Properties.copy(Blocks.OAK_PLANKS)) {
@Override
public boolean isFlammable(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
return true;
}
@Override
public int getFlammability(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
return 20;
}
@Override
public int getFireSpreadSpeed(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
return 5;
}
});
public static final RegistryObject<Block> PINE_LEAVES = registerBlock("pine_leaves",
() -> new LeavesBlock(BlockBehaviour.Properties.copy(Blocks.OAK_LEAVES)){
@Override
public boolean isFlammable(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
return true;
}
@Override
public int getFlammability(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
return 60;
}
@Override
public int getFireSpreadSpeed(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
return 30;
}
});
private static <T extends Block> RegistryObject<T> registerBlock(String name, Supplier<T> block) {

View File

@@ -0,0 +1,49 @@
package net.kaupenjoe.tutorialmod.block.custom;
import net.kaupenjoe.tutorialmod.block.ModBlocks;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.item.AxeItem;
import net.minecraft.world.item.context.UseOnContext;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.block.RotatedPillarBlock;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraftforge.common.ToolAction;
import org.checkerframework.checker.units.qual.A;
import org.jetbrains.annotations.Nullable;
public class ModFlammableRotatedPillarBlock extends RotatedPillarBlock {
public ModFlammableRotatedPillarBlock(Properties pProperties) {
super(pProperties);
}
@Override
public boolean isFlammable(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
return true;
}
@Override
public int getFlammability(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
return 5;
}
@Override
public int getFireSpreadSpeed(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
return 5;
}
@Override
public @Nullable BlockState getToolModifiedState(BlockState state, UseOnContext context, ToolAction toolAction, boolean simulate) {
if(context.getItemInHand().getItem() instanceof AxeItem) {
if(state.is(ModBlocks.PINE_LOG.get())) {
return ModBlocks.STRIPPED_PINE_LOG.get().defaultBlockState().setValue(AXIS, state.getValue(AXIS));
}
if(state.is(ModBlocks.PINE_WOOD.get())) {
return ModBlocks.STRIPPED_PINE_WOOD.get().defaultBlockState().setValue(AXIS, state.getValue(AXIS));
}
}
return super.getToolModifiedState(state, context, toolAction, simulate);
}
}

View File

@@ -13,6 +13,7 @@ import net.minecraftforge.client.model.generators.BlockStateProvider;
import net.minecraftforge.client.model.generators.ConfiguredModel;
import net.minecraftforge.client.model.generators.ModelFile;
import net.minecraftforge.common.data.ExistingFileHelper;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;
import java.util.function.Function;
@@ -57,8 +58,35 @@ public class ModBlockStateProvider extends BlockStateProvider {
simpleBlockWithItem(ModBlocks.GEM_POLISHING_STATION.get(),
new ModelFile.UncheckedModelFile(modLoc("block/gem_polishing_station")));
logBlock(((RotatedPillarBlock) ModBlocks.PINE_LOG.get()));
axisBlock(((RotatedPillarBlock) ModBlocks.PINE_WOOD.get()), blockTexture(ModBlocks.PINE_LOG.get()), blockTexture(ModBlocks.PINE_LOG.get()));
axisBlock(((RotatedPillarBlock) ModBlocks.STRIPPED_PINE_LOG.get()), blockTexture(ModBlocks.STRIPPED_PINE_LOG.get()),
new ResourceLocation(TutorialMod.MOD_ID, "block/stripped_pine_log_top"));
axisBlock(((RotatedPillarBlock) ModBlocks.STRIPPED_PINE_WOOD.get()), blockTexture(ModBlocks.STRIPPED_PINE_LOG.get()),
blockTexture(ModBlocks.STRIPPED_PINE_LOG.get()));
blockItem(ModBlocks.PINE_LOG);
blockItem(ModBlocks.PINE_WOOD);
blockItem(ModBlocks.STRIPPED_PINE_LOG);
blockItem(ModBlocks.STRIPPED_PINE_WOOD);
blockWithItem(ModBlocks.PINE_PLANKS);
leavesBlock(ModBlocks.PINE_LEAVES);
}
private void leavesBlock(RegistryObject<Block> blockRegistryObject) {
simpleBlockWithItem(blockRegistryObject.get(),
models().singleTexture(ForgeRegistries.BLOCKS.getKey(blockRegistryObject.get()).getPath(), new ResourceLocation("minecraft:block/leaves"),
"all", blockTexture(blockRegistryObject.get())).renderType("cutout"));
}
private void blockItem(RegistryObject<Block> blockRegistryObject) {
simpleBlockItem(blockRegistryObject.get(), new ModelFile.UncheckedModelFile(TutorialMod.MOD_ID +
":block/" + ForgeRegistries.BLOCKS.getKey(blockRegistryObject.get()).getPath()));
}
public void makeStrawberryCrop(CropBlock block, String modelName, String textureName) {
Function<BlockState, ConfiguredModel[]> function = state -> strawberryStates(state, block, modelName, textureName);

View File

@@ -55,6 +55,13 @@ public class ModBlockTagGenerator extends BlockTagsProvider {
this.tag(BlockTags.WALLS)
.add(ModBlocks.SAPPHIRE_WALL.get());
this.tag(BlockTags.LOGS_THAT_BURN)
.add(ModBlocks.PINE_LOG.get())
.add(ModBlocks.PINE_WOOD.get())
.add(ModBlocks.STRIPPED_PINE_LOG.get())
.add(ModBlocks.STRIPPED_PINE_WOOD.get());
this.tag(BlockTags.PLANKS)
.add(ModBlocks.PINE_PLANKS.get());
}
}

View File

@@ -1,6 +1,7 @@
package net.kaupenjoe.tutorialmod.datagen;
import net.kaupenjoe.tutorialmod.TutorialMod;
import net.kaupenjoe.tutorialmod.block.ModBlocks;
import net.kaupenjoe.tutorialmod.item.ModItems;
import net.minecraft.core.HolderLookup;
import net.minecraft.data.PackOutput;
@@ -31,5 +32,14 @@ public class ModItemTagGenerator extends ItemTagsProvider {
this.tag(ItemTags.CREEPER_DROP_MUSIC_DISCS)
.add(ModItems.BAR_BRAWL_MUSIC_DISC.get());
this.tag(ItemTags.LOGS_THAT_BURN)
.add(ModBlocks.PINE_LOG.get().asItem())
.add(ModBlocks.PINE_WOOD.get().asItem())
.add(ModBlocks.STRIPPED_PINE_LOG.get().asItem())
.add(ModBlocks.STRIPPED_PINE_WOOD.get().asItem());
this.tag(ItemTags.PLANKS)
.add(ModBlocks.PINE_PLANKS.get().asItem());
}
}

View File

@@ -82,6 +82,16 @@ public class ModBlockLootTables extends BlockLootSubProvider {
this.add(ModBlocks.POTTED_CATMINT.get(), createPotFlowerItemTable(ModBlocks.CATMINT.get()));
this.dropSelf(ModBlocks.GEM_POLISHING_STATION.get());
this.dropSelf(ModBlocks.PINE_LOG.get());
this.dropSelf(ModBlocks.PINE_WOOD.get());
this.dropSelf(ModBlocks.STRIPPED_PINE_LOG.get());
this.dropSelf(ModBlocks.STRIPPED_PINE_WOOD.get());
this.dropSelf(ModBlocks.PINE_PLANKS.get());
this.add(ModBlocks.PINE_LEAVES.get(), block ->
createLeavesDrops(block, ModBlocks.SAPPHIRE_BLOCK.get(), NORMAL_LEAVES_SAPLING_CHANCES)); // TODO: Change to Sapling!
}
protected LootTable.Builder createCopperLikeOreDrops(Block pBlock, Item item) {

View File

@@ -74,6 +74,14 @@ public class ModCreativeModTabs {
pOutput.accept(ModBlocks.CATMINT.get());
pOutput.accept(ModBlocks.GEM_POLISHING_STATION.get());
pOutput.accept(ModBlocks.PINE_LOG.get());
pOutput.accept(ModBlocks.PINE_WOOD.get());
pOutput.accept(ModBlocks.STRIPPED_PINE_LOG.get());
pOutput.accept(ModBlocks.STRIPPED_PINE_WOOD.get());
pOutput.accept(ModBlocks.PINE_PLANKS.get());
pOutput.accept(ModBlocks.PINE_LEAVES.get());
})
.build());

View File

@@ -50,6 +50,14 @@
"block.tutorialmod.gem_polishing_station": "Gem Polishing Station",
"block.tutorialmod.pine_log": "Pine Log",
"block.tutorialmod.pine_planks": "Pine Planks",
"block.tutorialmod.pine_wood": "Pine Wood",
"block.tutorialmod.stripped_pine_log": "Stripped Pine Log",
"block.tutorialmod.stripped_pine_wood": "Stripped Pine Wood",
"block.tutorialmod.pine_leaves": "Pine Leaves",
"tooltip.tutorialmod.metal_detector.tooltip": "Finds valuables underground!",
"entity.minecraft.villager.tutorialmod.soundmaster": "Sound Master",

Binary file not shown.

After

Width:  |  Height:  |  Size: 600 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 503 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 532 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 429 B