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

grower 和贴图修复 #104

Merged
merged 2 commits into from
Mar 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import net.minecraft.world.level.block.*;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.grower.TreeGrower;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.block.state.properties.NoteBlockInstrument;
import net.minecraft.world.level.material.MapColor;
Expand Down Expand Up @@ -445,13 +444,13 @@ public class ModBlocks {
//TODO: TreeGrower
@I18n(en_us = "Palm Sapling", zh_cn = "棕榈树苗", zh_tw = "棕櫚樹苗")
public static final DeferredBlock<SaplingBlock> PALM_SAPLING =
register("palm_sapling", props -> new SaplingBlock(TreeGrower.OAK, props), BlockBehaviour.Properties.ofFullCopy(Blocks.SPRUCE_SAPLING));
register("palm_sapling", props -> new SaplingBlock(ModTreeGrowers.PALM, props), BlockBehaviour.Properties.ofFullCopy(Blocks.SPRUCE_SAPLING));
@BasicBlockLocatedItem
public static final DeferredItem<BlockItem> PALM_SAPLING_ITEM =
register("palm_sapling", PALM_SAPLING);
@I18n(en_us = "Baobab Sapling", zh_cn = "猴面包树苗", zh_tw = "猴麵包樹苗")
public static final DeferredBlock<SaplingBlock> BAOBAB_SAPLING =
register("baobab_sapling", props -> new SaplingBlock(TreeGrower.OAK, props), BlockBehaviour.Properties.ofFullCopy(Blocks.ACACIA_SAPLING));
register("baobab_sapling", props -> new SaplingBlock(ModTreeGrowers.BAOBAB, props), BlockBehaviour.Properties.ofFullCopy(Blocks.ACACIA_SAPLING));
@BasicBlockLocatedItem
public static final DeferredItem<BlockItem> BAOBAB_SAPLING_ITEM =
register("baobab_sapling", BAOBAB_SAPLING);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package org.polaris2023.wild_wind.common.init;

import net.minecraft.data.worldgen.features.TreeFeatures;
import net.minecraft.world.level.block.grower.TreeGrower;

import java.util.Optional;

public class ModTreeGrowers {
public static final TreeGrower PALM = new TreeGrower(
"palm",
0.1F,
Optional.empty(),
Optional.empty(),
Optional.of(TreeFeatures.OAK),
Optional.of(TreeFeatures.FANCY_OAK),
Optional.of(TreeFeatures.OAK_BEES_005),
Optional.of(TreeFeatures.FANCY_OAK_BEES_005)
);
public static final TreeGrower BAOBAB = new TreeGrower(
"baobab",
0.1F,
Optional.empty(),
Optional.empty(),
Optional.of(TreeFeatures.OAK),
Optional.of(TreeFeatures.FANCY_OAK),
Optional.of(TreeFeatures.OAK_BEES_005),
Optional.of(TreeFeatures.FANCY_OAK_BEES_005)
);
}
59 changes: 5 additions & 54 deletions src/main/resources/assets/wild_wind/models/block/sculk_jaw.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"credit": "By KeepMeow",
"parent": "block/block",
"textures": {
"particle": "wild_wind:block/sculk_catalyst_side",
"teeth": "wild_wind:block/sculk_jaw_teeth",
"top": "wild_wind:block/sculk_jaw_top",
"bottom": "minecraft:block/sculk_catalyst_bottom",
"particle": "minecraft:block/sculk_catalyst_side",
"side": "minecraft:block/sculk_catalyst_side"
"bottom": "wild_wind:block/sculk_catalyst_bottom",
"side": "wild_wind:block/sculk_catalyst_side"
},
"elements": [
{
Expand All @@ -20,19 +20,6 @@
"down": {"uv": [0, 0, 16, 16], "texture": "#bottom"}
}
},
{
"from": [0, 0, 0],
"to": [16, 16, 16],
"color": 8,
"faces": {
"north": {"uv": [0, 0, 16, 16], "texture": "#missing"},
"east": {"uv": [0, 0, 16, 16], "texture": "#missing"},
"south": {"uv": [0, 0, 16, 16], "texture": "#missing"},
"west": {"uv": [0, 0, 16, 16], "texture": "#missing"},
"up": {"uv": [0, 0, 16, 16], "texture": "#missing"},
"down": {"uv": [0, 0, 16, 16], "texture": "#missing"}
}
},
{
"from": [2.75, 20.5, 0],
"to": [7.75, 20.5, 16],
Expand All @@ -59,41 +46,5 @@
"down": {"uv": [0, 0, 6, 16], "texture": "#teeth"}
}
}
],
"display": {
"thirdperson_righthand": {
"rotation": [-110, 45, -180],
"translation": [0, 2.75, -1.25],
"scale": [0.4, 0.4, 0.4]
},
"thirdperson_lefthand": {
"rotation": [-110, 45, -180],
"translation": [0, 2.75, -1.25],
"scale": [0.4, 0.4, 0.4]
},
"firstperson_righthand": {
"rotation": [0, 45, 0],
"translation": [4.25, 0, -2.25],
"scale": [0.4, 0.4, 0.4]
},
"firstperson_lefthand": {
"rotation": [0, 45, 0],
"translation": [4.25, 0, -2.25],
"scale": [0.4, 0.4, 0.4]
},
"ground": {
"translation": [0, 2, 0],
"scale": [0.3, 0.3, 0.3]
},
"gui": {
"rotation": [45, 45, 0],
"scale": [0.6, 0.6, 0.6]
},
"head": {
"rotation": [-90, 0, 0]
},
"fixed": {
"scale": [0.5, 0.5, 0.5]
}
}
]
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"credit": "By KeepMeow",
"parent": "block/block",
"textures": {
"particle": "wild_wind:block/sculk_catalyst_side",
"tendril": "wild_wind:block/sculk_jaw_tendril_active",
"teeth": "wild_wind:block/sculk_jaw_teeth",
"top": "wild_wind:block/sculk_jaw_top",
"bottom": "wild_wind:block/sculk_catalyst_bottom",
"tendril": "wild_wind:block/sculk_jaw_tendril_active",
"particle": "wild_wind:block/sculk_catalyst_side",
"side": "wild_wind:block/sculk_catalyst_side"
},
"elements": [
Expand All @@ -15,11 +15,7 @@
"rotation": {"angle": 0, "axis": "y", "origin": [0, -3, 0]},
"faces": {
"north": {"uv": [0, 0, 16, 16], "texture": "#tendril"},
"east": {"uv": [0, 0, 1, 16], "texture": "#missing"},
"south": {"uv": [0, 0, 16, 16], "texture": "#tendril"},
"west": {"uv": [0, 0, 1, 16], "texture": "#missing"},
"up": {"uv": [0, 0, 1, 16], "texture": "#missing"},
"down": {"uv": [0, 0, 1, 16], "texture": "#missing"}
"south": {"uv": [0, 0, 16, 16], "texture": "#tendril"}
}
},
{
Expand All @@ -34,19 +30,6 @@
"down": {"uv": [0, 0, 16, 16], "texture": "#bottom"}
}
},
{
"from": [0, 0, 0],
"to": [16, 16, 16],
"color": 3,
"faces": {
"north": {"uv": [0, 0, 16, 16], "texture": "#missing"},
"east": {"uv": [0, 0, 16, 16], "texture": "#missing"},
"south": {"uv": [0, 0, 16, 16], "texture": "#missing"},
"west": {"uv": [0, 0, 16, 16], "texture": "#missing"},
"up": {"uv": [0, 0, 16, 16], "texture": "#missing"},
"down": {"uv": [0, 0, 16, 16], "texture": "#missing"}
}
},
{
"from": [2.75, 20.5, 0],
"to": [7.75, 20.5, 16],
Expand All @@ -73,54 +56,5 @@
"down": {"uv": [0, 0, 6, 16], "texture": "#teeth"}
}
}
],
"display": {
"thirdperson_righthand": {
"rotation": [-110, 45, -180],
"translation": [0, 2.75, -1.25],
"scale": [0.4, 0.4, 0.4]
},
"thirdperson_lefthand": {
"rotation": [-110, 45, -180],
"translation": [0, 2.75, -1.25],
"scale": [0.4, 0.4, 0.4]
},
"firstperson_righthand": {
"rotation": [0, 45, 0],
"translation": [4.25, 0, -2.25],
"scale": [0.4, 0.4, 0.4]
},
"firstperson_lefthand": {
"rotation": [0, 45, 0],
"translation": [4.25, 0, -2.25],
"scale": [0.4, 0.4, 0.4]
},
"ground": {
"translation": [0, 2, 0],
"scale": [0.3, 0.3, 0.3]
},
"gui": {
"rotation": [45, 45, 0],
"scale": [0.6, 0.6, 0.6]
},
"head": {
"rotation": [-90, 0, 0]
},
"fixed": {
"scale": [0.5, 0.5, 0.5]
}
},
"groups": [
0,
{
"name": "group",
"origin": [8, 8, 8],
"color": 0,
"children": []
},
1,
2,
3,
4
]
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"credit": "By KeepMeow",
"parent": "block/block",
"textures": {
"4": "wild_wind:block/sculk_jaw_tendril_extend",
"particle": "wild_wind:block/sculk_catalyst_side",
"tendril": "wild_wind:block/sculk_jaw_tendril_extend",
"teeth": "wild_wind:block/sculk_jaw_teeth",
"top": "wild_wind:block/sculk_jaw_top",
"bottom": "wild_wind:block/sculk_catalyst_bottom",
"particle": "wild_wind:block/sculk_catalyst_side",
"side": "wild_wind:block/sculk_catalyst_side"
},
"elements": [
Expand All @@ -14,12 +14,8 @@
"to": [15.75, 32, 8],
"rotation": {"angle": 0, "axis": "y", "origin": [0, -3, 0]},
"faces": {
"north": {"uv": [0, 0, 16, 16], "texture": "#4"},
"east": {"uv": [0, 0, 1, 16], "texture": "#missing"},
"south": {"uv": [0, 0, 16, 16], "texture": "#4"},
"west": {"uv": [0, 0, 1, 16], "texture": "#missing"},
"up": {"uv": [0, 0, 1, 16], "texture": "#missing"},
"down": {"uv": [0, 0, 1, 16], "texture": "#missing"}
"north": {"uv": [0, 0, 16, 16], "texture": "#tendril"},
"south": {"uv": [0, 0, 16, 16], "texture": "#tendril"}
}
},
{
Expand All @@ -34,19 +30,6 @@
"down": {"uv": [0, 0, 16, 16], "texture": "#bottom"}
}
},
{
"from": [0, 0, 0],
"to": [16, 16, 16],
"color": 3,
"faces": {
"north": {"uv": [0, 0, 16, 16], "texture": "#missing"},
"east": {"uv": [0, 0, 16, 16], "texture": "#missing"},
"south": {"uv": [0, 0, 16, 16], "texture": "#missing"},
"west": {"uv": [0, 0, 16, 16], "texture": "#missing"},
"up": {"uv": [0, 0, 16, 16], "texture": "#missing"},
"down": {"uv": [0, 0, 16, 16], "texture": "#missing"}
}
},
{
"from": [2.75, 20.5, 0],
"to": [7.75, 20.5, 16],
Expand All @@ -73,41 +56,5 @@
"down": {"uv": [0, 0, 6, 16], "texture": "#teeth"}
}
}
],
"display": {
"thirdperson_righthand": {
"rotation": [-110, 45, -180],
"translation": [0, 2.75, -1.25],
"scale": [0.4, 0.4, 0.4]
},
"thirdperson_lefthand": {
"rotation": [-110, 45, -180],
"translation": [0, 2.75, -1.25],
"scale": [0.4, 0.4, 0.4]
},
"firstperson_righthand": {
"rotation": [0, 45, 0],
"translation": [4.25, 0, -2.25],
"scale": [0.4, 0.4, 0.4]
},
"firstperson_lefthand": {
"rotation": [0, 45, 0],
"translation": [4.25, 0, -2.25],
"scale": [0.4, 0.4, 0.4]
},
"ground": {
"translation": [0, 2, 0],
"scale": [0.3, 0.3, 0.3]
},
"gui": {
"rotation": [45, 45, 0],
"scale": [0.6, 0.6, 0.6]
},
"head": {
"rotation": [-90, 0, 0]
},
"fixed": {
"scale": [0.5, 0.5, 0.5]
}
}
]
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"credit": "By KeepMeow",
"parent": "block/block",
"textures": {
"particle": "wild_wind:block/sculk_catalyst_side",
"tendril": "wild_wind:block/sculk_jaw_tendril_inactive",
"teeth": "wild_wind:block/sculk_jaw_teeth",
"top": "wild_wind:block/sculk_jaw_top",
"bottom": "wild_wind:block/sculk_catalyst_bottom",
"tendril": "wild_wind:block/sculk_jaw_tendril_inactive",
"particle": "wild_wind:block/sculk_catalyst_side",
"side": "wild_wind:block/sculk_catalyst_side"
},
"elements": [
Expand All @@ -21,30 +21,13 @@
"down": {"uv": [0, 0, 16, 16], "texture": "#bottom"}
}
},
{
"from": [0, 0, 0],
"to": [16, 16, 16],
"color": 8,
"faces": {
"north": {"uv": [0, 0, 16, 16], "texture": "#missing"},
"east": {"uv": [0, 0, 16, 16], "texture": "#missing"},
"south": {"uv": [0, 0, 16, 16], "texture": "#missing"},
"west": {"uv": [0, 0, 16, 16], "texture": "#missing"},
"up": {"uv": [0, 0, 16, 16], "texture": "#missing"},
"down": {"uv": [0, 0, 16, 16], "texture": "#missing"}
}
},
{
"from": [-0.25, 16, 8],
"to": [15.75, 32, 8],
"rotation": {"angle": 0, "axis": "y", "origin": [0, -3, 0]},
"faces": {
"north": {"uv": [0, 0, 16, 16], "texture": "#tendril"},
"east": {"uv": [0, 0, 1, 16], "texture": "#missing"},
"south": {"uv": [0, 0, 16, 16], "texture": "#tendril"},
"west": {"uv": [0, 0, 1, 16], "texture": "#missing"},
"up": {"uv": [0, 0, 1, 16], "texture": "#missing"},
"down": {"uv": [0, 0, 1, 16], "texture": "#missing"}
"south": {"uv": [0, 0, 16, 16], "texture": "#tendril"}
}
},
{
Expand Down
Loading
Loading