mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-23 08:59:27 +00:00
修改
This commit is contained in:
@@ -7,50 +7,43 @@ import net.momirealms.craftengine.core.block.BlockBehavior;
|
|||||||
import net.momirealms.craftengine.core.block.CustomBlock;
|
import net.momirealms.craftengine.core.block.CustomBlock;
|
||||||
import net.momirealms.craftengine.core.block.behavior.BlockBehaviorFactory;
|
import net.momirealms.craftengine.core.block.behavior.BlockBehaviorFactory;
|
||||||
import net.momirealms.craftengine.core.sound.SoundData;
|
import net.momirealms.craftengine.core.sound.SoundData;
|
||||||
|
import net.momirealms.craftengine.core.util.Pair;
|
||||||
import net.momirealms.craftengine.core.util.RandomUtils;
|
import net.momirealms.craftengine.core.util.RandomUtils;
|
||||||
import net.momirealms.craftengine.core.util.ResourceConfigUtils;
|
import net.momirealms.craftengine.core.util.ResourceConfigUtils;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
|
|
||||||
public class ChimeBlockBehavior extends BukkitBlockBehavior {
|
public class ChimeBlockBehavior extends BukkitBlockBehavior {
|
||||||
public static final Factory FACTORY = new Factory();
|
public static final Factory FACTORY = new Factory();
|
||||||
private final SoundData hitSound;
|
private final List<Pair<SoundData, Float>> hitSounds;
|
||||||
private final boolean randomPitch;
|
|
||||||
private final float randomMultiplier;
|
|
||||||
|
|
||||||
public ChimeBlockBehavior(CustomBlock customBlock, SoundData hitSound, boolean randomPitch, float randomMultiplier) {
|
public ChimeBlockBehavior(CustomBlock customBlock, List<Pair<SoundData, Float>> hitSounds) {
|
||||||
super(customBlock);
|
super(customBlock);
|
||||||
this.hitSound = hitSound;
|
this.hitSounds = hitSounds;
|
||||||
this.randomPitch = randomPitch;
|
|
||||||
this.randomMultiplier = randomMultiplier;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onProjectileHit(Object thisBlock, Object[] args, Callable<Object> superMethod) {
|
public void onProjectileHit(Object thisBlock, Object[] args, Callable<Object> superMethod) {
|
||||||
|
Pair<SoundData, Float> hitSound = hitSounds.get(RandomUtils.generateRandomInt(0, hitSounds.size()));
|
||||||
Object blockPos = FastNMS.INSTANCE.field$BlockHitResult$blockPos(args[2]);
|
Object blockPos = FastNMS.INSTANCE.field$BlockHitResult$blockPos(args[2]);
|
||||||
Object sound = FastNMS.INSTANCE.constructor$SoundEvent(KeyUtils.toResourceLocation(hitSound.id()), Optional.empty());
|
Object sound = FastNMS.INSTANCE.constructor$SoundEvent(KeyUtils.toResourceLocation(hitSound.left().id()), Optional.empty());
|
||||||
float pitch = hitSound.pitch().get();
|
float pitch = hitSound.left().pitch().get() + RandomUtils.generateRandomInt(0, 1) * hitSound.right();
|
||||||
if (randomPitch) {
|
FastNMS.INSTANCE.method$LevelAccessor$playSound(args[0], null, blockPos, sound, CoreReflections.instance$SoundSource$BLOCKS, hitSound.left().volume().get(), pitch);
|
||||||
pitch = pitch + RandomUtils.generateRandomInt(0, 1) * this.randomMultiplier;
|
|
||||||
}
|
|
||||||
FastNMS.INSTANCE.method$LevelAccessor$playSound(args[0], null, blockPos, sound, CoreReflections.instance$SoundSource$BLOCKS, hitSound.volume().get(), pitch);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Factory implements BlockBehaviorFactory {
|
public static class Factory implements BlockBehaviorFactory {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BlockBehavior create(CustomBlock block, Map<String, Object> arguments) {
|
public BlockBehavior create(CustomBlock block, Map<String, Object> arguments) {
|
||||||
SoundData hitSound = SoundData.create(ResourceConfigUtils.requireNonNullOrThrow(arguments.get("hit-sound"), "warning.config.block.behavior.chime.missing_hit_sound"), SoundData.SoundValue.FIXED_1, SoundData.SoundValue.ranged(0.9f, 1f));
|
List<Pair<SoundData, Float>> hitSounds = ResourceConfigUtils.parseConfigAsList(arguments.get("hit-sounds"), map -> {
|
||||||
Map<String, Object> randomPitch = ResourceConfigUtils.getAsMapOrNull(arguments.get("random-pitch"), "random-pitch");
|
SoundData hitSound = SoundData.create(ResourceConfigUtils.requireNonNullOrThrow(arguments.get("sound"), "warning.config.block.behavior.chime.missing_hit_sound"), SoundData.SoundValue.FIXED_1, SoundData.SoundValue.ranged(0.9f, 1f));
|
||||||
boolean enableRandomPitch = false;
|
float randomMultiplier = ResourceConfigUtils.getAsFloat(arguments.get("random-pitch-multiplier"), "random-pitch-multiplier");
|
||||||
float randomMultiplier = 1f;
|
return Pair.of(hitSound, randomMultiplier);
|
||||||
if (randomPitch != null) {
|
});
|
||||||
enableRandomPitch = true;
|
return new ChimeBlockBehavior(block, hitSounds);
|
||||||
randomMultiplier = ResourceConfigUtils.getAsFloat(arguments.getOrDefault("multiplier", 1f), "multiplier");
|
|
||||||
}
|
|
||||||
return new ChimeBlockBehavior(block, hitSound, enableRandomPitch, randomMultiplier);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,30 @@ items:
|
|||||||
parent: minecraft:block/custom/palm_log
|
parent: minecraft:block/custom/palm_log
|
||||||
behavior:
|
behavior:
|
||||||
type: block_item
|
type: block_item
|
||||||
block: default:palm_log
|
block:
|
||||||
|
behavior:
|
||||||
|
type: strippable_block
|
||||||
|
stripped: default:stripped_palm_log
|
||||||
|
loot:
|
||||||
|
template: default:loot_table/self
|
||||||
|
settings:
|
||||||
|
template: default:settings/wood
|
||||||
|
states:
|
||||||
|
template: default:block_state/pillar
|
||||||
|
arguments:
|
||||||
|
base_block: note_block
|
||||||
|
texture_top_path: minecraft:block/custom/palm_log_top
|
||||||
|
texture_side_path: minecraft:block/custom/palm_log
|
||||||
|
model_vertical_path: minecraft:block/custom/palm_log
|
||||||
|
model_horizontal_path: minecraft:block/custom/palm_log_horizontal
|
||||||
|
vanilla_id:
|
||||||
|
type: self_increase_int
|
||||||
|
from: 0
|
||||||
|
to: 2
|
||||||
|
internal_id:
|
||||||
|
type: self_increase_int
|
||||||
|
from: 0
|
||||||
|
to: 2
|
||||||
default:stripped_palm_log:
|
default:stripped_palm_log:
|
||||||
material: nether_brick
|
material: nether_brick
|
||||||
custom-model-data: 1001
|
custom-model-data: 1001
|
||||||
@@ -36,7 +59,27 @@ items:
|
|||||||
parent: minecraft:block/custom/stripped_palm_log
|
parent: minecraft:block/custom/stripped_palm_log
|
||||||
behavior:
|
behavior:
|
||||||
type: block_item
|
type: block_item
|
||||||
block: default:stripped_palm_log
|
block:
|
||||||
|
loot:
|
||||||
|
template: default:loot_table/self
|
||||||
|
settings:
|
||||||
|
template: default:settings/wood
|
||||||
|
states:
|
||||||
|
template: default:block_state/pillar
|
||||||
|
arguments:
|
||||||
|
base_block: note_block
|
||||||
|
texture_top_path: minecraft:block/custom/stripped_palm_log_top
|
||||||
|
texture_side_path: minecraft:block/custom/stripped_palm_log
|
||||||
|
model_vertical_path: minecraft:block/custom/stripped_palm_log
|
||||||
|
model_horizontal_path: minecraft:block/custom/stripped_palm_log_horizontal
|
||||||
|
vanilla_id:
|
||||||
|
type: self_increase_int
|
||||||
|
from: 3
|
||||||
|
to: 5
|
||||||
|
internal_id:
|
||||||
|
type: self_increase_int
|
||||||
|
from: 3
|
||||||
|
to: 5
|
||||||
default:palm_wood:
|
default:palm_wood:
|
||||||
material: nether_brick
|
material: nether_brick
|
||||||
custom-model-data: 1002
|
custom-model-data: 1002
|
||||||
@@ -55,7 +98,30 @@ items:
|
|||||||
parent: minecraft:block/custom/palm_wood
|
parent: minecraft:block/custom/palm_wood
|
||||||
behavior:
|
behavior:
|
||||||
type: block_item
|
type: block_item
|
||||||
block: default:palm_wood
|
block:
|
||||||
|
behavior:
|
||||||
|
type: strippable_block
|
||||||
|
stripped: default:stripped_palm_wood
|
||||||
|
loot:
|
||||||
|
template: default:loot_table/self
|
||||||
|
settings:
|
||||||
|
template: default:settings/wood
|
||||||
|
states:
|
||||||
|
template: default:block_state/pillar
|
||||||
|
arguments:
|
||||||
|
base_block: note_block
|
||||||
|
texture_top_path: minecraft:block/custom/palm_log
|
||||||
|
texture_side_path: minecraft:block/custom/palm_log
|
||||||
|
model_vertical_path: minecraft:block/custom/palm_wood
|
||||||
|
model_horizontal_path: minecraft:block/custom/palm_wood_horizontal
|
||||||
|
vanilla_id:
|
||||||
|
type: self_increase_int
|
||||||
|
from: 6
|
||||||
|
to: 8
|
||||||
|
internal_id:
|
||||||
|
type: self_increase_int
|
||||||
|
from: 6
|
||||||
|
to: 8
|
||||||
default:stripped_palm_wood:
|
default:stripped_palm_wood:
|
||||||
material: nether_brick
|
material: nether_brick
|
||||||
custom-model-data: 1003
|
custom-model-data: 1003
|
||||||
@@ -74,306 +140,11 @@ items:
|
|||||||
parent: minecraft:block/custom/stripped_palm_wood
|
parent: minecraft:block/custom/stripped_palm_wood
|
||||||
behavior:
|
behavior:
|
||||||
type: block_item
|
type: block_item
|
||||||
block: default:stripped_palm_wood
|
block:
|
||||||
default:palm_planks:
|
|
||||||
material: nether_brick
|
|
||||||
custom-model-data: 1004
|
|
||||||
settings:
|
|
||||||
fuel-time: 300
|
|
||||||
tags:
|
|
||||||
- minecraft:planks
|
|
||||||
- minecraft:wooden_tool_materials
|
|
||||||
data:
|
|
||||||
item-name: <!i><i18n:item.palm_planks>
|
|
||||||
model:
|
|
||||||
type: minecraft:model
|
|
||||||
path: minecraft:item/custom/palm_planks
|
|
||||||
generation:
|
|
||||||
parent: minecraft:block/custom/palm_planks
|
|
||||||
behavior:
|
|
||||||
type: block_item
|
|
||||||
block: default:palm_planks
|
|
||||||
default:palm_sapling:
|
|
||||||
material: nether_brick
|
|
||||||
custom-model-data: 1005
|
|
||||||
settings:
|
|
||||||
fuel-time: 100
|
|
||||||
data:
|
|
||||||
item-name: <!i><i18n:item.palm_sapling>
|
|
||||||
model:
|
|
||||||
template: default:model/generated
|
|
||||||
arguments:
|
|
||||||
model: minecraft:item/custom/palm_sapling
|
|
||||||
texture: minecraft:block/custom/palm_sapling
|
|
||||||
behavior:
|
|
||||||
type: block_item
|
|
||||||
block: default:palm_sapling
|
|
||||||
default:palm_leaves:
|
|
||||||
material: oak_leaves
|
|
||||||
custom-model-data: 1000
|
|
||||||
data:
|
|
||||||
item-name: <!i><i18n:item.palm_leaves>
|
|
||||||
components:
|
|
||||||
minecraft:block_state:
|
|
||||||
distance: "1"
|
|
||||||
persistent: "false"
|
|
||||||
waterlogged: "false"
|
|
||||||
model:
|
|
||||||
type: minecraft:model
|
|
||||||
path: minecraft:item/custom/palm_leaves
|
|
||||||
generation:
|
|
||||||
parent: minecraft:block/custom/palm_leaves
|
|
||||||
tints:
|
|
||||||
- type: minecraft:constant
|
|
||||||
value: -12012264
|
|
||||||
behavior:
|
|
||||||
type: block_item
|
|
||||||
block: default:palm_leaves
|
|
||||||
default:palm_trapdoor:
|
|
||||||
material: nether_brick
|
|
||||||
custom-model-data: 1006
|
|
||||||
data:
|
|
||||||
item-name: <!i><i18n:item.palm_trapdoor>
|
|
||||||
settings:
|
|
||||||
fuel-time: 300
|
|
||||||
model:
|
|
||||||
type: minecraft:model
|
|
||||||
path: minecraft:item/custom/palm_trapdoor
|
|
||||||
generation:
|
|
||||||
parent: minecraft:block/custom/palm_trapdoor_bottom
|
|
||||||
behavior:
|
|
||||||
type: block_item
|
|
||||||
block: default:palm_trapdoor
|
|
||||||
default:palm_door:
|
|
||||||
material: nether_brick
|
|
||||||
custom-model-data: 1007
|
|
||||||
data:
|
|
||||||
item-name: <!i><i18n:item.palm_door>
|
|
||||||
settings:
|
|
||||||
fuel-time: 200
|
|
||||||
model:
|
|
||||||
template: default:model/simplified_generated
|
|
||||||
arguments:
|
|
||||||
path: minecraft:item/custom/palm_door
|
|
||||||
behavior:
|
|
||||||
type: double_high_block_item
|
|
||||||
block: default:palm_door
|
|
||||||
default:palm_fence_gate:
|
|
||||||
material: nether_brick
|
|
||||||
custom-model-data: 1008
|
|
||||||
data:
|
|
||||||
item-name: <!i><i18n:item.palm_fence_gate>
|
|
||||||
settings:
|
|
||||||
fuel-time: 300
|
|
||||||
model:
|
|
||||||
type: minecraft:model
|
|
||||||
path: minecraft:item/custom/palm_fence_gate
|
|
||||||
generation:
|
|
||||||
parent: minecraft:block/custom/palm_fence_gate
|
|
||||||
behavior:
|
|
||||||
type: block_item
|
|
||||||
block: default:palm_fence_gate
|
|
||||||
default:palm_slab:
|
|
||||||
material: nether_brick
|
|
||||||
custom-model-data: 1009
|
|
||||||
data:
|
|
||||||
item-name: <!i><i18n:item.palm_slab>
|
|
||||||
settings:
|
|
||||||
fuel-time: 150
|
|
||||||
model:
|
|
||||||
type: minecraft:model
|
|
||||||
path: minecraft:item/custom/palm_slab
|
|
||||||
generation:
|
|
||||||
parent: minecraft:block/custom/palm_slab
|
|
||||||
behavior:
|
|
||||||
type: block_item
|
|
||||||
block: default:palm_slab
|
|
||||||
default:palm_stairs:
|
|
||||||
material: nether_brick
|
|
||||||
custom-model-data: 1013
|
|
||||||
model:
|
|
||||||
type: minecraft:model
|
|
||||||
path: minecraft:item/custom/palm_stairs
|
|
||||||
generation:
|
|
||||||
parent: minecraft:block/custom/palm_stairs
|
|
||||||
data:
|
|
||||||
item-name: <!i><i18n:item.palm_stairs>
|
|
||||||
settings:
|
|
||||||
fuel-time: 300
|
|
||||||
behavior:
|
|
||||||
type: block_item
|
|
||||||
block: default:palm_stairs
|
|
||||||
default:palm_pressure_plate:
|
|
||||||
material: nether_brick
|
|
||||||
custom-model-data: 1014
|
|
||||||
model:
|
|
||||||
type: minecraft:model
|
|
||||||
path: minecraft:item/custom/palm_pressure_plate
|
|
||||||
generation:
|
|
||||||
parent: minecraft:block/custom/palm_pressure_plate
|
|
||||||
data:
|
|
||||||
item-name: <!i><i18n:item.palm_pressure_plate>
|
|
||||||
settings:
|
|
||||||
fuel-time: 300
|
|
||||||
behavior:
|
|
||||||
type: block_item
|
|
||||||
block: default:palm_pressure_plate
|
|
||||||
default:palm_button:
|
|
||||||
material: nether_brick
|
|
||||||
custom-model-data: 1015
|
|
||||||
model:
|
|
||||||
type: minecraft:model
|
|
||||||
path: minecraft:item/custom/palm_button
|
|
||||||
generation:
|
|
||||||
parent: minecraft:block/button_inventory
|
|
||||||
textures:
|
|
||||||
texture: minecraft:block/custom/palm_planks
|
|
||||||
data:
|
|
||||||
item-name: <!i><i18n:item.palm_button>
|
|
||||||
settings:
|
|
||||||
fuel-time: 100
|
|
||||||
behavior:
|
|
||||||
type: block_item
|
|
||||||
block: default:palm_button
|
|
||||||
default:palm_button_pressed:
|
|
||||||
material: nether_brick
|
|
||||||
custom-model-data: 1016
|
|
||||||
model:
|
|
||||||
type: minecraft:model
|
|
||||||
path: minecraft:block/custom/palm_button_pressed
|
|
||||||
generation:
|
|
||||||
parent: minecraft:block/button_pressed
|
|
||||||
textures:
|
|
||||||
texture: minecraft:block/custom/palm_planks
|
|
||||||
default:palm_button_not_pressed:
|
|
||||||
material: nether_brick
|
|
||||||
custom-model-data: 1017
|
|
||||||
model:
|
|
||||||
type: minecraft:model
|
|
||||||
path: minecraft:block/custom/palm_button_not_pressed
|
|
||||||
generation:
|
|
||||||
parent: minecraft:block/button
|
|
||||||
textures:
|
|
||||||
texture: minecraft:block/custom/palm_planks
|
|
||||||
default:palm_fence:
|
|
||||||
material: nether_brick
|
|
||||||
custom-model-data: 1018
|
|
||||||
data:
|
|
||||||
item-name: <!i><i18n:item.palm_fence>
|
|
||||||
model:
|
|
||||||
type: minecraft:model
|
|
||||||
path: minecraft:item/custom/palm_fence_inventory
|
|
||||||
generation:
|
|
||||||
parent: minecraft:block/fence_inventory
|
|
||||||
textures:
|
|
||||||
texture: minecraft:block/custom/palm_planks
|
|
||||||
behavior:
|
|
||||||
type: block_item
|
|
||||||
block: default:palm_fence
|
|
||||||
default:palm_fence_post:
|
|
||||||
material: nether_brick
|
|
||||||
custom-model-data: 1019
|
|
||||||
model:
|
|
||||||
type: minecraft:model
|
|
||||||
path: minecraft:block/custom/palm_fence_post
|
|
||||||
generation:
|
|
||||||
parent: minecraft:block/fence_post
|
|
||||||
textures:
|
|
||||||
texture: minecraft:block/custom/palm_planks
|
|
||||||
default:palm_fence_side:
|
|
||||||
material: nether_brick
|
|
||||||
custom-model-data: 1020
|
|
||||||
model:
|
|
||||||
type: minecraft:model
|
|
||||||
path: minecraft:block/custom/palm_fence_side
|
|
||||||
generation:
|
|
||||||
parent: minecraft:block/custom/fence_side
|
|
||||||
textures:
|
|
||||||
texture: minecraft:block/custom/palm_planks
|
|
||||||
|
|
||||||
blocks:
|
|
||||||
default:palm_log:
|
|
||||||
behavior:
|
|
||||||
type: strippable_block
|
|
||||||
stripped: default:stripped_palm_log
|
|
||||||
loot:
|
loot:
|
||||||
template: default:loot_table/self
|
template: default:loot_table/self
|
||||||
settings:
|
settings:
|
||||||
template: default:settings/wood
|
template: default:settings/wood
|
||||||
overrides:
|
|
||||||
map-color: 2
|
|
||||||
states:
|
|
||||||
template: default:block_state/pillar
|
|
||||||
arguments:
|
|
||||||
base_block: note_block
|
|
||||||
texture_top_path: minecraft:block/custom/palm_log_top
|
|
||||||
texture_side_path: minecraft:block/custom/palm_log
|
|
||||||
model_vertical_path: minecraft:block/custom/palm_log
|
|
||||||
model_horizontal_path: minecraft:block/custom/palm_log_horizontal
|
|
||||||
vanilla_id:
|
|
||||||
type: self_increase_int
|
|
||||||
from: 0
|
|
||||||
to: 2
|
|
||||||
internal_id:
|
|
||||||
type: self_increase_int
|
|
||||||
from: 0
|
|
||||||
to: 2
|
|
||||||
default:stripped_palm_log:
|
|
||||||
loot:
|
|
||||||
template: default:loot_table/self
|
|
||||||
settings:
|
|
||||||
template: default:settings/wood
|
|
||||||
overrides:
|
|
||||||
map-color: 2
|
|
||||||
states:
|
|
||||||
template: default:block_state/pillar
|
|
||||||
arguments:
|
|
||||||
base_block: note_block
|
|
||||||
texture_top_path: minecraft:block/custom/stripped_palm_log_top
|
|
||||||
texture_side_path: minecraft:block/custom/stripped_palm_log
|
|
||||||
model_vertical_path: minecraft:block/custom/stripped_palm_log
|
|
||||||
model_horizontal_path: minecraft:block/custom/stripped_palm_log_horizontal
|
|
||||||
vanilla_id:
|
|
||||||
type: self_increase_int
|
|
||||||
from: 3
|
|
||||||
to: 5
|
|
||||||
internal_id:
|
|
||||||
type: self_increase_int
|
|
||||||
from: 3
|
|
||||||
to: 5
|
|
||||||
default:palm_wood:
|
|
||||||
behavior:
|
|
||||||
type: strippable_block
|
|
||||||
stripped: default:stripped_palm_wood
|
|
||||||
loot:
|
|
||||||
template: default:loot_table/self
|
|
||||||
settings:
|
|
||||||
template: default:settings/wood
|
|
||||||
overrides:
|
|
||||||
map-color: 2
|
|
||||||
states:
|
|
||||||
template: default:block_state/pillar
|
|
||||||
arguments:
|
|
||||||
base_block: note_block
|
|
||||||
texture_top_path: minecraft:block/custom/palm_log
|
|
||||||
texture_side_path: minecraft:block/custom/palm_log
|
|
||||||
model_vertical_path: minecraft:block/custom/palm_wood
|
|
||||||
model_horizontal_path: minecraft:block/custom/palm_wood_horizontal
|
|
||||||
vanilla_id:
|
|
||||||
type: self_increase_int
|
|
||||||
from: 6
|
|
||||||
to: 8
|
|
||||||
internal_id:
|
|
||||||
type: self_increase_int
|
|
||||||
from: 6
|
|
||||||
to: 8
|
|
||||||
default:stripped_palm_wood:
|
|
||||||
loot:
|
|
||||||
template: default:loot_table/self
|
|
||||||
settings:
|
|
||||||
template: default:settings/wood
|
|
||||||
overrides:
|
|
||||||
map-color: 2
|
|
||||||
states:
|
states:
|
||||||
template: default:block_state/pillar
|
template: default:block_state/pillar
|
||||||
arguments:
|
arguments:
|
||||||
@@ -391,10 +162,25 @@ blocks:
|
|||||||
from: 9
|
from: 9
|
||||||
to: 11
|
to: 11
|
||||||
default:palm_planks:
|
default:palm_planks:
|
||||||
|
material: nether_brick
|
||||||
|
custom-model-data: 1004
|
||||||
|
settings:
|
||||||
|
fuel-time: 300
|
||||||
|
tags:
|
||||||
|
- minecraft:planks
|
||||||
|
- minecraft:wooden_tool_materials
|
||||||
|
data:
|
||||||
|
item-name: <!i><i18n:item.palm_planks>
|
||||||
|
model:
|
||||||
|
type: minecraft:model
|
||||||
|
path: minecraft:item/custom/palm_planks
|
||||||
|
generation:
|
||||||
|
parent: minecraft:block/custom/palm_planks
|
||||||
|
behavior:
|
||||||
|
type: block_item
|
||||||
|
block:
|
||||||
settings:
|
settings:
|
||||||
template: default:settings/planks
|
template: default:settings/planks
|
||||||
overrides:
|
|
||||||
map-color: 2
|
|
||||||
loot:
|
loot:
|
||||||
template: default:loot_table/self
|
template: default:loot_table/self
|
||||||
state:
|
state:
|
||||||
@@ -405,6 +191,20 @@ blocks:
|
|||||||
id: 12
|
id: 12
|
||||||
state: note_block:12
|
state: note_block:12
|
||||||
default:palm_sapling:
|
default:palm_sapling:
|
||||||
|
material: nether_brick
|
||||||
|
custom-model-data: 1005
|
||||||
|
settings:
|
||||||
|
fuel-time: 100
|
||||||
|
data:
|
||||||
|
item-name: <!i><i18n:item.palm_sapling>
|
||||||
|
model:
|
||||||
|
template: default:model/generated
|
||||||
|
arguments:
|
||||||
|
model: minecraft:item/custom/palm_sapling
|
||||||
|
texture: minecraft:block/custom/palm_sapling
|
||||||
|
behavior:
|
||||||
|
type: block_item
|
||||||
|
block:
|
||||||
settings:
|
settings:
|
||||||
template: default:settings/sapling
|
template: default:settings/sapling
|
||||||
behaviors:
|
behaviors:
|
||||||
@@ -441,6 +241,26 @@ blocks:
|
|||||||
appearance: default
|
appearance: default
|
||||||
id: 1
|
id: 1
|
||||||
default:palm_leaves:
|
default:palm_leaves:
|
||||||
|
material: oak_leaves
|
||||||
|
custom-model-data: 1000
|
||||||
|
data:
|
||||||
|
item-name: <!i><i18n:item.palm_leaves>
|
||||||
|
components:
|
||||||
|
minecraft:block_state:
|
||||||
|
distance: '1'
|
||||||
|
persistent: 'false'
|
||||||
|
waterlogged: 'false'
|
||||||
|
model:
|
||||||
|
type: minecraft:model
|
||||||
|
path: minecraft:item/custom/palm_leaves
|
||||||
|
generation:
|
||||||
|
parent: minecraft:block/custom/palm_leaves
|
||||||
|
tints:
|
||||||
|
- type: minecraft:constant
|
||||||
|
value: -12012264
|
||||||
|
behavior:
|
||||||
|
type: block_item
|
||||||
|
block:
|
||||||
behavior:
|
behavior:
|
||||||
type: leaves_block
|
type: leaves_block
|
||||||
loot:
|
loot:
|
||||||
@@ -450,8 +270,6 @@ blocks:
|
|||||||
sapling: default:palm_sapling
|
sapling: default:palm_sapling
|
||||||
settings:
|
settings:
|
||||||
template: default:settings/leaves
|
template: default:settings/leaves
|
||||||
overrides:
|
|
||||||
map-color: 19
|
|
||||||
states:
|
states:
|
||||||
template: default:block_state/leaves
|
template: default:block_state/leaves
|
||||||
arguments:
|
arguments:
|
||||||
@@ -464,6 +282,20 @@ blocks:
|
|||||||
from: 0
|
from: 0
|
||||||
to: 27
|
to: 27
|
||||||
default:palm_trapdoor:
|
default:palm_trapdoor:
|
||||||
|
material: nether_brick
|
||||||
|
custom-model-data: 1006
|
||||||
|
data:
|
||||||
|
item-name: <!i><i18n:item.palm_trapdoor>
|
||||||
|
settings:
|
||||||
|
fuel-time: 300
|
||||||
|
model:
|
||||||
|
type: minecraft:model
|
||||||
|
path: minecraft:item/custom/palm_trapdoor
|
||||||
|
generation:
|
||||||
|
parent: minecraft:block/custom/palm_trapdoor_bottom
|
||||||
|
behavior:
|
||||||
|
type: block_item
|
||||||
|
block:
|
||||||
behavior:
|
behavior:
|
||||||
type: trapdoor_block
|
type: trapdoor_block
|
||||||
can-open-with-hand: true
|
can-open-with-hand: true
|
||||||
@@ -505,6 +337,19 @@ blocks:
|
|||||||
textures:
|
textures:
|
||||||
texture: minecraft:block/custom/palm_trapdoor
|
texture: minecraft:block/custom/palm_trapdoor
|
||||||
default:palm_door:
|
default:palm_door:
|
||||||
|
material: nether_brick
|
||||||
|
custom-model-data: 1007
|
||||||
|
data:
|
||||||
|
item-name: <!i><i18n:item.palm_door>
|
||||||
|
settings:
|
||||||
|
fuel-time: 200
|
||||||
|
model:
|
||||||
|
template: default:model/simplified_generated
|
||||||
|
arguments:
|
||||||
|
path: minecraft:item/custom/palm_door
|
||||||
|
behavior:
|
||||||
|
type: double_high_block_item
|
||||||
|
block:
|
||||||
behavior:
|
behavior:
|
||||||
type: door_block
|
type: door_block
|
||||||
can-open-with-hand: true
|
can-open-with-hand: true
|
||||||
@@ -567,6 +412,20 @@ blocks:
|
|||||||
parent: minecraft:block/door_bottom_right_open
|
parent: minecraft:block/door_bottom_right_open
|
||||||
textures: *textures
|
textures: *textures
|
||||||
default:palm_fence_gate:
|
default:palm_fence_gate:
|
||||||
|
material: nether_brick
|
||||||
|
custom-model-data: 1008
|
||||||
|
data:
|
||||||
|
item-name: <!i><i18n:item.palm_fence_gate>
|
||||||
|
settings:
|
||||||
|
fuel-time: 300
|
||||||
|
model:
|
||||||
|
type: minecraft:model
|
||||||
|
path: minecraft:item/custom/palm_fence_gate
|
||||||
|
generation:
|
||||||
|
parent: minecraft:block/custom/palm_fence_gate
|
||||||
|
behavior:
|
||||||
|
type: block_item
|
||||||
|
block:
|
||||||
behaviors:
|
behaviors:
|
||||||
type: fence_gate_block
|
type: fence_gate_block
|
||||||
can-open-with-hand: true
|
can-open-with-hand: true
|
||||||
@@ -610,6 +469,20 @@ blocks:
|
|||||||
parent: minecraft:block/template_fence_gate_wall_open
|
parent: minecraft:block/template_fence_gate_wall_open
|
||||||
textures: *textures
|
textures: *textures
|
||||||
default:palm_slab:
|
default:palm_slab:
|
||||||
|
material: nether_brick
|
||||||
|
custom-model-data: 1009
|
||||||
|
data:
|
||||||
|
item-name: <!i><i18n:item.palm_slab>
|
||||||
|
settings:
|
||||||
|
fuel-time: 150
|
||||||
|
model:
|
||||||
|
type: minecraft:model
|
||||||
|
path: minecraft:item/custom/palm_slab
|
||||||
|
generation:
|
||||||
|
parent: minecraft:block/custom/palm_slab
|
||||||
|
behavior:
|
||||||
|
type: block_item
|
||||||
|
block:
|
||||||
behaviors:
|
behaviors:
|
||||||
type: slab_block
|
type: slab_block
|
||||||
loot:
|
loot:
|
||||||
@@ -643,6 +516,20 @@ blocks:
|
|||||||
textures: *textures
|
textures: *textures
|
||||||
model_double_path: minecraft:block/custom/palm_planks
|
model_double_path: minecraft:block/custom/palm_planks
|
||||||
default:palm_stairs:
|
default:palm_stairs:
|
||||||
|
material: nether_brick
|
||||||
|
custom-model-data: 1013
|
||||||
|
model:
|
||||||
|
type: minecraft:model
|
||||||
|
path: minecraft:item/custom/palm_stairs
|
||||||
|
generation:
|
||||||
|
parent: minecraft:block/custom/palm_stairs
|
||||||
|
data:
|
||||||
|
item-name: <!i><i18n:item.palm_stairs>
|
||||||
|
settings:
|
||||||
|
fuel-time: 300
|
||||||
|
behavior:
|
||||||
|
type: block_item
|
||||||
|
block:
|
||||||
loot:
|
loot:
|
||||||
template: default:loot_table/self
|
template: default:loot_table/self
|
||||||
settings:
|
settings:
|
||||||
@@ -679,6 +566,20 @@ blocks:
|
|||||||
parent: minecraft:block/stairs
|
parent: minecraft:block/stairs
|
||||||
textures: *textures
|
textures: *textures
|
||||||
default:palm_pressure_plate:
|
default:palm_pressure_plate:
|
||||||
|
material: nether_brick
|
||||||
|
custom-model-data: 1014
|
||||||
|
model:
|
||||||
|
type: minecraft:model
|
||||||
|
path: minecraft:item/custom/palm_pressure_plate
|
||||||
|
generation:
|
||||||
|
parent: minecraft:block/custom/palm_pressure_plate
|
||||||
|
data:
|
||||||
|
item-name: <!i><i18n:item.palm_pressure_plate>
|
||||||
|
settings:
|
||||||
|
fuel-time: 300
|
||||||
|
behavior:
|
||||||
|
type: block_item
|
||||||
|
block:
|
||||||
loot:
|
loot:
|
||||||
template: default:loot_table/self
|
template: default:loot_table/self
|
||||||
settings:
|
settings:
|
||||||
@@ -719,40 +620,45 @@ blocks:
|
|||||||
parent: minecraft:block/pressure_plate_down
|
parent: minecraft:block/pressure_plate_down
|
||||||
textures:
|
textures:
|
||||||
texture: minecraft:block/custom/palm_planks
|
texture: minecraft:block/custom/palm_planks
|
||||||
default:palm_button:
|
|
||||||
loot:
|
items#palm_fence:
|
||||||
template: default:loot_table/self
|
default:palm_fence:
|
||||||
settings:
|
material: nether_brick
|
||||||
template:
|
custom-model-data: 1018
|
||||||
- default:sound/wood
|
data:
|
||||||
- default:hardness/button
|
item-name: <!i><i18n:item.palm_fence>
|
||||||
overrides:
|
model:
|
||||||
burnable: true
|
type: minecraft:model
|
||||||
push-reaction: destroy
|
path: minecraft:item/custom/palm_fence_inventory
|
||||||
map-color: 2
|
generation:
|
||||||
instrument: harp
|
parent: minecraft:block/fence_inventory
|
||||||
tags:
|
textures:
|
||||||
- minecraft:buttons
|
texture: minecraft:block/custom/palm_planks
|
||||||
- minecraft:mineable/axe
|
behavior:
|
||||||
- minecraft:wooden_buttons
|
type: block_item
|
||||||
behaviors:
|
block: default:palm_fence
|
||||||
- type: face_attached_horizontal_directional_block
|
default:palm_fence_post:
|
||||||
- type: button_block
|
material: nether_brick
|
||||||
ticks-to-stay-pressed: 30
|
custom-model-data: 1019
|
||||||
can-button-be-activated-by-arrows: true
|
model:
|
||||||
sounds:
|
type: minecraft:model
|
||||||
on: minecraft:block.wooden_button.click_on
|
path: minecraft:block/custom/palm_fence_post
|
||||||
off: minecraft:block.wooden_button.click_off
|
generation:
|
||||||
states:
|
parent: minecraft:block/fence_post
|
||||||
template: default:block_state/button
|
textures:
|
||||||
arguments:
|
texture: minecraft:block/custom/palm_planks
|
||||||
base_block: birch_button
|
default:palm_fence_side:
|
||||||
pressed_item: default:palm_button_pressed
|
material: nether_brick
|
||||||
not_pressed_item: default:palm_button_not_pressed
|
custom-model-data: 1020
|
||||||
internal_id:
|
model:
|
||||||
type: self_increase_int
|
type: minecraft:model
|
||||||
from: 0
|
path: minecraft:block/custom/palm_fence_side
|
||||||
to: 23
|
generation:
|
||||||
|
parent: minecraft:block/custom/fence_side
|
||||||
|
textures:
|
||||||
|
texture: minecraft:block/custom/palm_planks
|
||||||
|
|
||||||
|
blocks#palm_fence:
|
||||||
default:palm_fence:
|
default:palm_fence:
|
||||||
loot:
|
loot:
|
||||||
template: default:loot_table/self
|
template: default:loot_table/self
|
||||||
|
|||||||
@@ -54,10 +54,6 @@ i18n:
|
|||||||
item.hami_melon_seeds: Hami Melon Seeds
|
item.hami_melon_seeds: Hami Melon Seeds
|
||||||
item.palm_button: Palm Button
|
item.palm_button: Palm Button
|
||||||
item.palm_fence: Palm Fence
|
item.palm_fence: Palm Fence
|
||||||
item.infected_palm_log: Infected Palm Log
|
|
||||||
item.small_mushroom: Small Mushroom
|
|
||||||
item.medium_mushroom: Medium Mushroom
|
|
||||||
item.large_mushroom: Large Mushroom
|
|
||||||
category.default.name: Default Assets
|
category.default.name: Default Assets
|
||||||
category.default.lore: Contains the default configuration of CraftEngine
|
category.default.lore: Contains the default configuration of CraftEngine
|
||||||
category.palm_tree: Palm Tree
|
category.palm_tree: Palm Tree
|
||||||
@@ -121,10 +117,6 @@ i18n:
|
|||||||
item.hami_melon_seeds: 哈密瓜种子
|
item.hami_melon_seeds: 哈密瓜种子
|
||||||
item.palm_button: 棕榈木按钮
|
item.palm_button: 棕榈木按钮
|
||||||
item.palm_fence: 棕榈木栅栏
|
item.palm_fence: 棕榈木栅栏
|
||||||
item.infected_palm_log: 菌蚀棕榈原木
|
|
||||||
item.small_mushroom: 小型蘑菇
|
|
||||||
item.medium_mushroom: 中型蘑菇
|
|
||||||
item.large_mushroom: 大型蘑菇
|
|
||||||
category.default.name: 默认资产
|
category.default.name: 默认资产
|
||||||
category.default.lore: 包含了CraftEngine的默认配置
|
category.default.lore: 包含了CraftEngine的默认配置
|
||||||
category.palm_tree: 棕榈树
|
category.palm_tree: 棕榈树
|
||||||
@@ -172,10 +164,6 @@ lang:
|
|||||||
block_name:default:default:attached_hami_melon_stem: Hami Melon Stem
|
block_name:default:default:attached_hami_melon_stem: Hami Melon Stem
|
||||||
block_name:default:palm_button: Palm Button
|
block_name:default:palm_button: Palm Button
|
||||||
block_name:default:palm_fence: Palm Fence
|
block_name:default:palm_fence: Palm Fence
|
||||||
block_name:default:infected_palm_log: Infected Palm Log
|
|
||||||
block_name:default:small_mushroom: Small Mushroom
|
|
||||||
block_name:default:medium_mushroom: Medium Mushroom
|
|
||||||
block_name:default:large_mushroom: Large Mushroom
|
|
||||||
zh_cn:
|
zh_cn:
|
||||||
block_name:default:chinese_lantern: 灯笼
|
block_name:default:chinese_lantern: 灯笼
|
||||||
block_name:default:netherite_anvil: 下界合金砧
|
block_name:default:netherite_anvil: 下界合金砧
|
||||||
@@ -211,7 +199,3 @@ lang:
|
|||||||
block_name:default:default:attached_hami_melon_stem: 哈密瓜茎
|
block_name:default:default:attached_hami_melon_stem: 哈密瓜茎
|
||||||
block_name:default:palm_button: 棕榈木按钮
|
block_name:default:palm_button: 棕榈木按钮
|
||||||
block_name:default:palm_fence: 棕榈木栅栏
|
block_name:default:palm_fence: 棕榈木栅栏
|
||||||
block_name:default:infected_palm_log: 菌蚀棕榈原木
|
|
||||||
block_name:default:small_mushroom: 小型蘑菇
|
|
||||||
block_name:default:medium_mushroom: 中型蘑菇
|
|
||||||
block_name:default:large_mushroom: 大型蘑菇
|
|
||||||
|
|||||||
@@ -171,6 +171,6 @@ public abstract class Property<T extends Comparable<T>> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return MoreObjects.toStringHelper(this).add("name", this.name).add("clazz", this.clazz).add("values", this.possibleValues()).toString();
|
return this.getClass().getSimpleName() + "{clazz=" + this.clazz + ", name='" + this.name + "', values=" + this.possibleValues() + '}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user