mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 07:17:58 +01:00
Added hive block
This commit is contained in:
parent
0a1429fd60
commit
c23fead5f2
28 changed files with 447 additions and 125 deletions
1
assets/models/hive_core.bbmodel
Normal file
1
assets/models/hive_core.bbmodel
Normal file
|
@ -0,0 +1 @@
|
|||
{"meta":{"format_version":"4.5","model_format":"java_block","box_uv":false},"name":"hive_core","parent":"","ambientocclusion":true,"front_gui_light":false,"visible_box":[1,1,0],"variable_placeholders":"","variable_placeholder_buttons":[],"unhandled_root_fields":{},"resolution":{"width":16,"height":16},"elements":[{"name":"core","box_uv":false,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[1,1,1],"to":[15,15,15],"autouv":0,"color":6,"origin":[0,0,0],"faces":{"north":{"uv":[0,0,16,16],"texture":0},"east":{"uv":[0,0,16,16],"texture":0},"south":{"uv":[0,0,16,16],"texture":0},"west":{"uv":[0,0,16,16],"texture":0},"up":{"uv":[0,0,16,16],"texture":0},"down":{"uv":[0,0,16,16],"texture":0}},"type":"cube","uuid":"494e4b71-f1df-46c1-f373-aa720b94be5e"},{"name":"activity","box_uv":false,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[0,0,0],"to":[16,16,2],"autouv":0,"color":1,"origin":[0,0,0],"faces":{"north":{"uv":[0,0,16,16],"texture":1},"east":{"uv":[14,0,16,16],"texture":1},"south":{"uv":[0,0,16,16],"texture":1},"west":{"uv":[0,0,2,16],"texture":1},"up":{"uv":[16,2,0,0],"texture":1},"down":{"uv":[16,14,0,16],"texture":1}},"type":"cube","uuid":"13733a81-bd87-34dc-d9b6-05392c74222a"}],"outliner":["494e4b71-f1df-46c1-f373-aa720b94be5e","13733a81-bd87-34dc-d9b6-05392c74222a"],"textures":[{"path":"/home/sollace/Desktop/hive_core.png","name":"hive_core.png","folder":"","namespace":"unicopia","id":"0","particle":true,"render_mode":"default","render_sides":"auto","frame_time":1,"frame_order_type":"loop","frame_order":"","frame_interpolate":false,"visible":true,"mode":"bitmap","saved":true,"uuid":"b6416600-de7b-5a1b-2752-6724918266ab","relative_path":"../../../../../../../Desktop/hive_core.png","source":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAqBJREFUOE9tk0tvHEUURs+t6qqenkfs8Qy2I4GwRCQiFJIYzCKxQLDgB8Ce/w0SYgFexMFtu3um3111UTtIySLLKtWt+u6tc+TLp89UVQlBERFmswznPGdnX3B9fcVdnuO8w1rPbl8ynbVWHs4aY5EXLy80RmUYBo6Ojui7jmpXcvLJKUNVIQJVWXBy9oSq3XOT5yTOYYww1cn3P/ysef4W72fUZYFXxUkkljsSa8nmc/q6YjAJQ5Iw3x5Tdw3rzTFVtUcuvrvU6ZUwDoRyD/lb5qkjiiUMA6vlgr7tGIaewTr84SF+fUgThaZtkGdfX6j3jiq/YVbeYw3MjMEnnr7vcM4Sgz70romjt0IggaMNbj5Hzr95rfX+HtO2LMJIliZoWYEBExVjLWMYkcQRxNBqwPoZ7vgxu65Ffvn1N/33zRXXf/1BFkcWUZAYiUaYOw+q9BqQEBliRMQQ5gvG1YqTz58gry5/0qEoGIs7tCqxEQQlS1OcTgkMVgzNOEKakqYZTddgtqfoYoV89fS5ZmFE6x02RrquBYVHzpGa6SolBhhFHuZjjHkYZphl9MsVcv78W+2LO2Yu5dFyw+0/vxNUWfgUh+CNPKw1BrxNGKISZ3NClnEXAnJ+/koPFkvyv//EVnv6EPDGYjXibMJEkhEhhJE0y1AS6jjgjrasHn+GvL78Udu6ocuvkWFAx5FsijsGkqlwShAFf3BAW9xiXIKs1iTrNWVTvwPJGiFRpb0vcDIidUdT7Zj24xR/Yt7P0YmA5RJ1KaQz2r57j3KWZgxNQyqGsSmJdYM1hnHoiYnF+Ix+amu5IghstqfvUP5Qpu1mwziMNLuC7eaYIr+hbvY0Xcfxp2fTf1BMvvj0vUwf09n/r/Ob6ytuP9B5/xGd/wPFiXTP8ca0JAAAAABJRU5ErkJggg=="},{"path":"/home/sollace/Desktop/hive_activity.png","name":"hive_activity.png","folder":"","namespace":"unicopia","id":"1","particle":false,"render_mode":"default","render_sides":"auto","frame_time":1,"frame_order_type":"loop","frame_order":"","frame_interpolate":false,"visible":true,"mode":"bitmap","saved":true,"uuid":"8c57b642-7139-0ef2-7e98-d580239ce477","relative_path":"../../../../../../../Desktop/hive_activity.png","source":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAkhJREFUOE+tk0tv00AUhb9x4vgV23k1LW1FKlV9SLSlhbIoFQgW/ADY87ORULsh0JamwUkcxxk7TjIog+APlJFmNXfOPefcc8XB4ZFSSrFYKIQQ2LaDaVbY2dnlvnfDIIqoVExKpQqTyZhVbakkdK1hlBDPT8/VcqkoioJms8l8viBNJ2xv75AkY9J0dVM6nV2kTIiiCNM0MQzB6p948/aDiqIHLMtByqnuXq1WyWczAr/GaNRHKUG5bJKmCY7jkueSZrOtG4nzV5dqhWYYBnlekCQJ29tbOG4VEBhigefVub7+Cigsy2S5XOruMpOIo+Nz5Xku0+kUKTM6nQ7z+ZzZLKdUKmuwm5tbFos5lYpFuVym2+3iODau6yLOXrxWRZHh+wGWZeF6LvFoRdUijke0Wm2iqE8QhEiZE9Z8pumUPM+1R+Ljp89KypSH/j3r60/43u2yXBaEtYB6rYHvhyRJzHA0IB6NMQyTp50Ovd5P2msbiIvL98oQJW2e47r07m+xbZtGo649mC/nlI2y1j8YDMmyjPWNLeR0SlHMEAeHJ2qlRwjY3NzSUuJ4jO/7jCcxf09QXTFJCMNAU7+7u0UpEMcnL9UK1fOq7O8/YzCMaDXr2g8p5T8Ax3G07l/RkEa9ydXVlz9jPD27UK3WGsNhpBE9zyEIaxRFThj4TCaSatUhHieYpsU4HpGmUjOu15uI15fvVJbNSNOYRqOtR2PZFbrffmDbFfb29uhHI2ZZqlM6GDzgeaF+i8fxfwjSo6P86GV67Dr/BkQRecNu1A/UAAAAAElFTkSuQmCC"}]}
|
35
assets/models/hive_core.json
Normal file
35
assets/models/hive_core.json
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"textures": {
|
||||
"0": "unicopia:hive_core",
|
||||
"1": "unicopia:hive_activity",
|
||||
"particle": "unicopia:hive_core"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"name": "core",
|
||||
"from": [1, 1, 1],
|
||||
"to": [15, 15, 15],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 16, 16], "texture": "#0"},
|
||||
"east": {"uv": [0, 0, 16, 16], "texture": "#0"},
|
||||
"south": {"uv": [0, 0, 16, 16], "texture": "#0"},
|
||||
"west": {"uv": [0, 0, 16, 16], "texture": "#0"},
|
||||
"up": {"uv": [0, 0, 16, 16], "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 16, 16], "texture": "#0"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "activity",
|
||||
"from": [0, 0, 0],
|
||||
"to": [16, 16, 2],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 16, 16], "texture": "#1"},
|
||||
"east": {"uv": [14, 0, 16, 16], "texture": "#1"},
|
||||
"south": {"uv": [0, 0, 16, 16], "texture": "#1"},
|
||||
"west": {"uv": [0, 0, 2, 16], "texture": "#1"},
|
||||
"up": {"uv": [16, 2, 0, 0], "texture": "#1"},
|
||||
"down": {"uv": [16, 14, 0, 16], "texture": "#1"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
31
src/main/java/com/minelittlepony/unicopia/EquineContext.java
Normal file
31
src/main/java/com/minelittlepony/unicopia/EquineContext.java
Normal file
|
@ -0,0 +1,31 @@
|
|||
package com.minelittlepony.unicopia;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import com.minelittlepony.unicopia.entity.Equine;
|
||||
import com.minelittlepony.unicopia.entity.player.Pony;
|
||||
|
||||
import net.minecraft.block.ShapeContext;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemUsageContext;
|
||||
|
||||
public interface EquineContext {
|
||||
EquineContext ABSENT = () -> Race.UNSET;
|
||||
|
||||
Race getSpecies();
|
||||
|
||||
default Race.Composite getCompositeRace() {
|
||||
return getSpecies().composite();
|
||||
}
|
||||
|
||||
static EquineContext of(ShapeContext context) {
|
||||
return context instanceof EquineContext c ? c : ABSENT;
|
||||
}
|
||||
|
||||
static EquineContext of(ItemUsageContext context) {
|
||||
return MoreObjects.firstNonNull(Pony.of(context.getPlayer()), ABSENT);
|
||||
}
|
||||
|
||||
static EquineContext of(Entity entity) {
|
||||
return MoreObjects.firstNonNull(Equine.of(entity).orElse(null), ABSENT);
|
||||
}
|
||||
}
|
125
src/main/java/com/minelittlepony/unicopia/block/HiveBlock.java
Normal file
125
src/main/java/com/minelittlepony/unicopia/block/HiveBlock.java
Normal file
|
@ -0,0 +1,125 @@
|
|||
package com.minelittlepony.unicopia.block;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import com.minelittlepony.unicopia.EquineContext;
|
||||
import com.minelittlepony.unicopia.Race;
|
||||
import com.minelittlepony.unicopia.USounds;
|
||||
import com.minelittlepony.unicopia.entity.player.Pony;
|
||||
import com.minelittlepony.unicopia.particle.ParticleUtils;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.ConnectingBlock;
|
||||
import net.minecraft.block.ShapeContext;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.particle.ParticleTypes;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.sound.SoundCategory;
|
||||
import net.minecraft.state.StateManager;
|
||||
import net.minecraft.state.property.BooleanProperty;
|
||||
import net.minecraft.state.property.Property;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.math.random.Random;
|
||||
import net.minecraft.util.shape.VoxelShape;
|
||||
import net.minecraft.util.shape.VoxelShapes;
|
||||
import net.minecraft.world.BlockView;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldAccess;
|
||||
|
||||
public class HiveBlock extends ConnectingBlock {
|
||||
static final BooleanProperty AWAKE = BooleanProperty.of("awake");
|
||||
static final Collection<BooleanProperty> PROPERTIES = FACING_PROPERTIES.values();
|
||||
|
||||
public HiveBlock(Settings settings) {
|
||||
super(0.5F, settings);
|
||||
setDefaultState(getDefaultState().with(AWAKE, false));
|
||||
PROPERTIES.forEach(property -> {
|
||||
setDefaultState(getDefaultState().with(property, true));
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
|
||||
builder.add(PROPERTIES.toArray(Property[]::new));
|
||||
builder.add(AWAKE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random random) {
|
||||
super.randomDisplayTick(state, world, pos, random);
|
||||
|
||||
if (random.nextInt(250) == 0) {
|
||||
world.playSoundAtBlockCenter(pos, USounds.BLOCK_CHITIN_AMBIENCE, SoundCategory.BLOCKS, 0.13F, 0.2F, true);
|
||||
|
||||
for (int i = 0; i < 9; i++) {
|
||||
world.addParticle(random.nextInt(2) == 0 ? ParticleTypes.SPORE_BLOSSOM_AIR : ParticleTypes.CRIMSON_SPORE,
|
||||
pos.getX() + random.nextDouble(),
|
||||
pos.getY() + 1.1, pos.getZ() + random.nextDouble(),
|
||||
random.nextDouble() - 0.5, 0, random.nextDouble() - 0.5
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos) {
|
||||
boolean connected = !neighborState.isAir();
|
||||
state = state.with(FACING_PROPERTIES.get(direction), connected);
|
||||
|
||||
if (!connected) {
|
||||
return state.with(AWAKE, true);
|
||||
}
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random) {
|
||||
if (!state.get(AWAKE)) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (var property : FACING_PROPERTIES.entrySet()) {
|
||||
if (!state.get(property.getValue())) {
|
||||
BlockPos neighborPos = pos.offset(property.getKey());
|
||||
//world.setBlockState(neighborPos, getDefaultState());
|
||||
world.setBlockState(neighborPos, UBlocks.CHITIN.getDefaultState());
|
||||
|
||||
world.playSound(null, neighborPos, USounds.Vanilla.BLOCK_SLIME_BLOCK_PLACE, SoundCategory.BLOCKS);
|
||||
world.playSound(null, neighborPos, USounds.BLOCK_CHITIN_AMBIENCE, SoundCategory.BLOCKS, 0.13F, 0.2F);
|
||||
|
||||
for (int i = 0; i < 9; i++) {
|
||||
ParticleUtils.spawnParticle(world, random.nextInt(2) == 0 ? ParticleTypes.SPORE_BLOSSOM_AIR : ParticleTypes.CRIMSON_SPORE,
|
||||
neighborPos.getX() + random.nextDouble(),
|
||||
neighborPos.getY() + 1.1, pos.getZ() + random.nextDouble(),
|
||||
random.nextDouble() - 0.5, 0, random.nextDouble() - 0.5
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
public void neighborUpdate(BlockState state, World world, BlockPos pos, Block sourceBlock, BlockPos sourcePos, boolean notify) {
|
||||
world.scheduleBlockTick(pos, this, 15);
|
||||
super.neighborUpdate(state, world, pos, sourceBlock, sourcePos, notify);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
public VoxelShape getCollisionShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) {
|
||||
return EquineContext.of(context).getSpecies() == Race.CHANGELING ? VoxelShapes.empty() : super.getCollisionShape(state, world, pos, context);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
public float calcBlockBreakingDelta(BlockState state, PlayerEntity player, BlockView world, BlockPos pos) {
|
||||
float delta = super.calcBlockBreakingDelta(state, player, world, pos);
|
||||
delta *= Pony.of(player).getSpecies() == Race.CHANGELING ? 2 : 1;
|
||||
return delta;
|
||||
}
|
||||
}
|
|
@ -121,6 +121,7 @@ public interface UBlocks {
|
|||
Block CHISELLED_CHITIN_SLAB = register("chiselled_chitin_slab", new SlabBlock(Settings.copy(CHISELLED_CHITIN)), ItemGroups.BUILDING_BLOCKS);
|
||||
Block CHISELLED_CHITIN_STAIRS = register("chiselled_chitin_stairs", new StairsBlock(CHISELLED_CHITIN.getDefaultState(), Settings.copy(CHISELLED_CHITIN)), ItemGroups.BUILDING_BLOCKS);
|
||||
Block CHISELLED_CHITIN_HULL = register("chiselled_chitin_hull", new OrientedBlock(Settings.copy(CHISELLED_CHITIN)), ItemGroups.BUILDING_BLOCKS);
|
||||
Block HIVE = register("hive", new HiveBlock(Settings.create().mapColor(MapColor.PURPLE).hardness(6).ticksRandomly().sounds(BlockSoundGroup.CORAL)), ItemGroups.NATURAL);
|
||||
Block MYSTERIOUS_EGG = register("mysterious_egg", new PileBlock(Settings.copy(Blocks.SLIME_BLOCK), PileBlock.MYSTERIOUS_EGG_SHAPES), ItemGroups.NATURAL);
|
||||
|
||||
SegmentedCropBlock OATS = register("oats", SegmentedCropBlock.create(11, 5, AbstractBlock.Settings.copy(Blocks.WHEAT), () -> UItems.OAT_SEEDS, null, null));
|
||||
|
|
|
@ -6,6 +6,7 @@ import java.util.function.Predicate;
|
|||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import com.minelittlepony.unicopia.EntityConvertable;
|
||||
import com.minelittlepony.unicopia.EquineContext;
|
||||
import com.minelittlepony.unicopia.Race;
|
||||
import com.minelittlepony.unicopia.projectile.ProjectileImpactListener;
|
||||
import com.minelittlepony.unicopia.util.NbtSerialisable;
|
||||
|
@ -13,17 +14,11 @@ import com.minelittlepony.unicopia.util.Tickable;
|
|||
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public interface Equine<T extends Entity> extends NbtSerialisable, Tickable, ProjectileImpactListener, EntityConvertable<T> {
|
||||
public interface Equine<T extends Entity> extends NbtSerialisable, Tickable, ProjectileImpactListener, EntityConvertable<T>, EquineContext {
|
||||
Physics getPhysics();
|
||||
|
||||
Race getSpecies();
|
||||
|
||||
void setSpecies(Race race);
|
||||
|
||||
default Race.Composite getCompositeRace() {
|
||||
return getSpecies().composite();
|
||||
}
|
||||
|
||||
/**
|
||||
* Called at the beginning of an update cycle.
|
||||
*/
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
package com.minelittlepony.unicopia.mixin;
|
||||
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import com.minelittlepony.unicopia.EquineContext;
|
||||
import com.minelittlepony.unicopia.Race;
|
||||
|
||||
import net.minecraft.block.EntityShapeContext;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.fluid.FluidState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@Mixin(EntityShapeContext.class)
|
||||
abstract class MixinEntityShapeContext implements EquineContext {
|
||||
private EquineContext equineContext;
|
||||
|
||||
@Inject(method = "<init>", at = @At("TAIL"))
|
||||
private void init(boolean descending, double minY, ItemStack heldItem, Predicate<FluidState> walkOnFluidPredicate, @Nullable Entity entity, CallbackInfo into) {
|
||||
equineContext = EquineContext.of(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Race getSpecies() {
|
||||
return equineContext.getSpecies();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Race.Composite getCompositeRace() {
|
||||
return equineContext.getCompositeRace();
|
||||
}
|
||||
}
|
68
src/main/resources/assets/unicopia/blockstates/hive.json
Normal file
68
src/main/resources/assets/unicopia/blockstates/hive.json
Normal file
|
@ -0,0 +1,68 @@
|
|||
{
|
||||
"multipart": [
|
||||
{
|
||||
"apply": {
|
||||
"model": "unicopia:block/hive_core"
|
||||
}
|
||||
},
|
||||
{
|
||||
"apply": {
|
||||
"model": "unicopia:block/hive_side",
|
||||
"uvlock": true
|
||||
},
|
||||
"when": {
|
||||
"north": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"apply": {
|
||||
"model": "unicopia:block/hive_side",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"when": {
|
||||
"east": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"apply": {
|
||||
"model": "unicopia:block/hive_side",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"when": {
|
||||
"south": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"apply": {
|
||||
"model": "unicopia:block/hive_side",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"when": {
|
||||
"west": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"apply": {
|
||||
"model": "unicopia:block/hive_side",
|
||||
"uvlock": true,
|
||||
"x": 90
|
||||
},
|
||||
"when": {
|
||||
"down": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"apply": {
|
||||
"model": "unicopia:block/hive_side",
|
||||
"uvlock": true,
|
||||
"x": 270
|
||||
},
|
||||
"when": {
|
||||
"up": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -207,6 +207,7 @@
|
|||
"block.unicopia.sour_apple_sprout": "Sour Apple Sprout",
|
||||
|
||||
"block.unicopia.surface_chitin": "Surface Chitin",
|
||||
"block.unicopia.hive": "Hive",
|
||||
"block.unicopia.chitin": "Chitin",
|
||||
"block.unicopia.chitin_spikes": "Chitin Spikes",
|
||||
"block.unicopia.chiselled_chitin": "Chiselled Chitin",
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"textures": {
|
||||
"all": "unicopia:block/hive_core",
|
||||
"particle": "unicopia:block/hive_core"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [1, 1, 1],
|
||||
"to": [15, 15, 15],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 16, 16], "texture": "#all"},
|
||||
"east": {"uv": [0, 0, 16, 16], "texture": "#all"},
|
||||
"south": {"uv": [0, 0, 16, 16], "texture": "#all"},
|
||||
"west": {"uv": [0, 0, 16, 16], "texture": "#all"},
|
||||
"up": {"uv": [0, 0, 16, 16], "texture": "#all"},
|
||||
"down": {"uv": [0, 0, 16, 16], "texture": "#all"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"textures": {
|
||||
"all": "unicopia:block/hive_side",
|
||||
"particle": "unicopia:block/hive_side"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [0, 0, 0],
|
||||
"to": [16, 16, 2],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 16, 16], "texture": "#all"},
|
||||
"east": {"uv": [14, 0, 16, 16], "texture": "#all"},
|
||||
"south": {"uv": [0, 0, 16, 16], "texture": "#all"},
|
||||
"west": {"uv": [0, 0, 2, 16], "texture": "#all"},
|
||||
"up": {"uv": [16, 2, 0, 0], "texture": "#all"},
|
||||
"down": {"uv": [16, 14, 0, 16], "texture": "#all"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
6
src/main/resources/assets/unicopia/models/item/hive.json
Normal file
6
src/main/resources/assets/unicopia/models/item/hive.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "unicopia:block/hive_side"
|
||||
}
|
||||
}
|
BIN
src/main/resources/assets/unicopia/textures/block/hive_core.png
Normal file
BIN
src/main/resources/assets/unicopia/textures/block/hive_core.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.6 KiB |
BIN
src/main/resources/assets/unicopia/textures/block/hive_side.png
Normal file
BIN
src/main/resources/assets/unicopia/textures/block/hive_side.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.8 KiB |
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1.0,
|
||||
"bonus_rolls": 0.0,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "unicopia:hive"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
17
src/main/resources/data/unicopia/recipes/hive.json
Normal file
17
src/main/resources/data/unicopia/recipes/hive.json
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
" # ",
|
||||
"#o#",
|
||||
" # "
|
||||
],
|
||||
"key": {
|
||||
"#": [
|
||||
{ "item": "unicopia:chitin" }
|
||||
],
|
||||
"o": [
|
||||
{ "item": "unicopia:mysterious_egg" }
|
||||
]
|
||||
},
|
||||
"result": { "item": "unicopia:hive", "count": 1 }
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
[
|
||||
{
|
||||
"processor_type": "minecraft:rule",
|
||||
"rules": [
|
||||
{
|
||||
"location_predicate": {
|
||||
"predicate_type": "always_true"
|
||||
},
|
||||
"input_predicate": {
|
||||
"predicate_type": "random_block_match",
|
||||
"block": "unicopia:chitin",
|
||||
"probability": 0.2
|
||||
},
|
||||
"output_state": {
|
||||
"name": "unicopia:hive",
|
||||
"Name": "unicopia:hive",
|
||||
"properties": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
|
@ -15,9 +15,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/chamber_decoration/pillar",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 2
|
||||
|
|
|
@ -4,9 +4,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/termination/blockade1",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 1
|
||||
|
|
|
@ -4,9 +4,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/chamber1",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 1
|
||||
|
@ -15,9 +13,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/spiked/chamber1",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 1
|
||||
|
@ -26,13 +22,11 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/spiked/chamber2",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 1
|
||||
}
|
||||
],
|
||||
"fallback": "unicopia:hidden_entrance_terminations"
|
||||
"fallback": "unicopia:changeling_hive/hidden_entrance_terminations"
|
||||
}
|
|
@ -26,9 +26,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/pit_decoration/ruins",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 1
|
||||
|
|
|
@ -4,9 +4,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/termination/shaft1",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 1
|
||||
|
|
|
@ -4,9 +4,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/shaft1",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 1
|
||||
|
@ -15,9 +13,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/shaft2",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 1
|
||||
|
@ -26,9 +22,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/shaft_bottom",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 3
|
||||
|
@ -37,9 +31,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/shaft_bottom2",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 9
|
||||
|
@ -48,9 +40,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/spiked/shaft1",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 1
|
||||
|
@ -59,9 +49,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/spiked/shaft2",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 1
|
||||
|
@ -70,9 +58,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/spiked/shaft_bottom",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 3
|
||||
|
@ -81,9 +67,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/spiked/shaft_bottom2",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 3
|
||||
|
|
|
@ -4,9 +4,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/offshoot1",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 1
|
||||
|
@ -15,9 +13,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/offshoot2",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 3
|
||||
|
@ -26,9 +22,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/offshoot_elbow",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 2
|
||||
|
@ -37,9 +31,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/offshoot_elbow2",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 2
|
||||
|
@ -48,9 +40,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/chamber1",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 1
|
||||
|
@ -59,9 +49,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/spiked/offshoot1",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 1
|
||||
|
@ -70,9 +58,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/spiked/offshoot2",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 3
|
||||
|
@ -81,9 +67,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/spiked/offshoot3",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 2
|
||||
|
@ -92,9 +76,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/spiked/offshoot_elbow",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 2
|
||||
|
@ -103,9 +85,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/spiked/offshoot_elbow2",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 2
|
||||
|
@ -114,9 +94,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/spiked/chamber1",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 1
|
||||
|
@ -125,9 +103,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/spiked/chamber2",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 1
|
||||
|
|
|
@ -4,9 +4,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/entrance",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 1
|
||||
|
@ -15,9 +13,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/spiked/entrance",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 1
|
||||
|
|
|
@ -4,9 +4,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/termination/tunnel1",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 1
|
||||
|
@ -15,9 +13,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/spiked/termination/tunnel1",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 1
|
||||
|
@ -26,9 +22,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/termination1",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 1
|
||||
|
@ -37,9 +31,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/termination/blockade1",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 1
|
||||
|
|
|
@ -4,9 +4,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/termination1",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 1
|
||||
|
@ -15,9 +13,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/offshoot_transition",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 2
|
||||
|
@ -26,9 +22,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/descent1",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 1
|
||||
|
@ -37,9 +31,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/spiked/termination1",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 1
|
||||
|
@ -48,9 +40,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/spiked/offshoot_transition",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 2
|
||||
|
@ -59,9 +49,7 @@
|
|||
"element": {
|
||||
"element_type": "minecraft:single_pool_element",
|
||||
"location": "unicopia:changeling_hive/spiked/descent1",
|
||||
"processors": {
|
||||
"processors": []
|
||||
},
|
||||
"processors": "unicopia:changeling_hive_decay",
|
||||
"projection": "rigid"
|
||||
},
|
||||
"weight": 1
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
"MixinDamageSource",
|
||||
"MixinFallLocation",
|
||||
"MixinEntity",
|
||||
"MixinEntityShapeContext",
|
||||
"MixinFallingBlock",
|
||||
"MixinFallingBlockEntity",
|
||||
"MixinFlowableFluid",
|
||||
|
|
Loading…
Reference in a new issue