Taller stations

- Updates to station and signal assets by Kryppers
- Modified stations to behave like depots in their item handling
This commit is contained in:
simibubi 2022-05-06 22:04:36 +02:00
parent 3a84808379
commit 0745e44518
15 changed files with 224 additions and 281 deletions

View file

@ -249,7 +249,7 @@ public class AllShapes {
.build(),
DEPOT = shape(CASING_11PX.get(Direction.UP)).add(1, 11, 1, 15, 13, 15)
.build(),
STATION = shape(0, 0, 0, 16, 2, 16).add(1, 0, 1, 15, 8, 15)
STATION = shape(0, 0, 0, 16, 2, 16).add(1, 0, 1, 15, 13, 15)
.build()
;

View file

@ -3,6 +3,7 @@ package com.simibubi.create.content.logistics.block.depot;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.function.Supplier;
@ -51,6 +52,8 @@ public class DepotBehaviour extends TileEntityBehaviour {
Supplier<Integer> maxStackSize;
Supplier<Boolean> canAcceptItems;
Predicate<Direction> canFunnelsPullFrom;
Consumer<ItemStack> onHeldInserted;
Predicate<ItemStack> acceptedItems;
boolean allowMerge;
public DepotBehaviour(SmartTileEntity te) {
@ -58,6 +61,9 @@ public class DepotBehaviour extends TileEntityBehaviour {
maxStackSize = () -> 64;
canAcceptItems = () -> true;
canFunnelsPullFrom = $ -> true;
acceptedItems = $ -> true;
onHeldInserted = $ -> {
};
incoming = new ArrayList<>();
itemHandler = new DepotItemHandler(this);
lazyItemHandler = LazyOptional.of(() -> itemHandler);
@ -72,6 +78,16 @@ public class DepotBehaviour extends TileEntityBehaviour {
allowMerge = true;
}
public DepotBehaviour withCallback(Consumer<ItemStack> changeListener) {
onHeldInserted = changeListener;
return this;
}
public DepotBehaviour onlyAccepts(Predicate<ItemStack> filter) {
acceptedItems = filter;
return this;
}
@Override
public void tick() {
super.tick();
@ -245,6 +261,8 @@ public class DepotBehaviour extends TileEntityBehaviour {
public ItemStack insert(TransportedItemStack heldItem, boolean simulate) {
if (!canAcceptItems.get())
return heldItem.stack;
if (!acceptedItems.test(heldItem.stack))
return heldItem.stack;
if (canMergeItems()) {
int remainingSpace = getRemainingSpace();
@ -285,6 +303,7 @@ public class DepotBehaviour extends TileEntityBehaviour {
AllSoundEvents.DEPOT_PLOP.playOnServer(getWorld(), getPos());
}
this.heldItem = heldItem;
onHeldInserted.accept(heldItem.stack);
}
return ItemStack.EMPTY;
}
@ -385,4 +404,8 @@ public class DepotBehaviour extends TileEntityBehaviour {
return TYPE;
}
public boolean isItemValid(ItemStack stack) {
return acceptedItems.test(stack);
}
}

View file

@ -66,7 +66,7 @@ public class DepotItemHandler implements IItemHandler {
@Override
public boolean isItemValid(int slot, ItemStack stack) {
return slot == MAIN_SLOT;
return slot == MAIN_SLOT && te.isItemValid(stack);
}
}

View file

@ -96,7 +96,8 @@ public abstract class ArmInteractionPoint {
public static void addPoint(ArmInteractionPoint instance, Supplier<ArmInteractionPoint> factory) {
if (POINTS.containsKey(instance))
Create.LOGGER.warn("Point for " + instance.getClass().getSimpleName() + " was overridden");
Create.LOGGER.warn("Point for " + instance.getClass()
.getSimpleName() + " was overridden");
POINTS.put(instance, factory);
}
@ -223,7 +224,8 @@ public abstract class ArmInteractionPoint {
@Override
protected Vec3 getInteractionPositionVector() {
return Vec3.atLowerCornerOf(pos).add(.5f, 1, .5f);
return Vec3.atLowerCornerOf(pos)
.add(.5f, 1, .5f);
}
}
@ -232,12 +234,14 @@ public abstract class ArmInteractionPoint {
@Override
protected Vec3 getInteractionPositionVector() {
return Vec3.atLowerCornerOf(pos).add(.5f, 14 / 16f, .5f);
return Vec3.atLowerCornerOf(pos)
.add(.5f, 14 / 16f, .5f);
}
@Override
protected boolean isValid(BlockGetter reader, BlockPos pos, BlockState state) {
return AllBlocks.DEPOT.has(state) || AllBlocks.WEIGHTED_EJECTOR.has(state);
return AllBlocks.DEPOT.has(state) || AllBlocks.WEIGHTED_EJECTOR.has(state)
|| AllBlocks.TRACK_STATION.has(state);
}
}
@ -274,7 +278,8 @@ public abstract class ArmInteractionPoint {
@Override
protected Vec3 getInteractionPositionVector() {
return Vec3.atLowerCornerOf(pos).add(.5f, 13 / 16f, .5f);
return Vec3.atLowerCornerOf(pos)
.add(.5f, 13 / 16f, .5f);
}
@Override
@ -305,8 +310,8 @@ public abstract class ArmInteractionPoint {
@Override
protected Vec3 getInteractionPositionVector() {
return super.getInteractionPositionVector()
.add(Vec3.atLowerCornerOf(getInteractionDirection().getNormal()).scale(.65f));
return super.getInteractionPositionVector().add(Vec3.atLowerCornerOf(getInteractionDirection().getNormal())
.scale(.65f));
}
}
@ -326,7 +331,8 @@ public abstract class ArmInteractionPoint {
@Override
protected ItemStack insert(Level world, ItemStack stack, boolean simulate) {
ItemStack input = stack.copy();
InteractionResultHolder<ItemStack> res = BlazeBurnerBlock.tryInsert(state, world, pos, input, false, false, simulate);
InteractionResultHolder<ItemStack> res =
BlazeBurnerBlock.tryInsert(state, world, pos, input, false, false, simulate);
ItemStack remainder = res.getObject();
if (input.isEmpty()) {
return remainder;
@ -370,8 +376,8 @@ public abstract class ArmInteractionPoint {
@Override
protected Vec3 getInteractionPositionVector() {
return super.getInteractionPositionVector()
.add(Vec3.atLowerCornerOf(getInteractionDirection().getNormal()).scale(.5f));
return super.getInteractionPositionVector().add(Vec3.atLowerCornerOf(getInteractionDirection().getNormal())
.scale(.5f));
}
}
@ -486,7 +492,8 @@ public abstract class ArmInteractionPoint {
protected Vec3 getInteractionPositionVector() {
return VecHelper.getCenterOf(pos)
.add(Vec3.atLowerCornerOf(FunnelBlock.getFunnelFacing(state)
.getNormal()).scale(-.15f));
.getNormal())
.scale(-.15f));
}
@Override
@ -510,7 +517,8 @@ public abstract class ArmInteractionPoint {
FilteringBehaviour filtering = TileEntityBehaviour.get(world, pos, FilteringBehaviour.TYPE);
InvManipulationBehaviour inserter = TileEntityBehaviour.get(world, pos, InvManipulationBehaviour.TYPE);
BlockState state = world.getBlockState(pos);
if (state.getOptionalValue(BlockStateProperties.POWERED).orElse(false))
if (state.getOptionalValue(BlockStateProperties.POWERED)
.orElse(false))
return stack;
if (inserter == null)
return stack;
@ -535,7 +543,8 @@ public abstract class ArmInteractionPoint {
protected boolean isValid(BlockGetter reader, BlockPos pos, BlockState state) {
return state.getBlock() instanceof AbstractFunnelBlock
&& !(state.hasProperty(FunnelBlock.EXTRACTING) && state.getValue(FunnelBlock.EXTRACTING))
&& !(state.hasProperty(BeltFunnelBlock.SHAPE) && state.getValue(BeltFunnelBlock.SHAPE) == Shape.PUSHING);
&& !(state.hasProperty(BeltFunnelBlock.SHAPE)
&& state.getValue(BeltFunnelBlock.SHAPE) == Shape.PUSHING);
}
@Override

View file

@ -4,6 +4,7 @@ import com.simibubi.create.AllItems;
import com.simibubi.create.AllShapes;
import com.simibubi.create.AllSoundEvents;
import com.simibubi.create.AllTileEntities;
import com.simibubi.create.content.logistics.block.depot.SharedDepotBlockMethods;
import com.simibubi.create.foundation.block.ITE;
import com.simibubi.create.foundation.gui.ScreenOpener;
@ -12,6 +13,7 @@ import net.minecraft.core.BlockPos;
import net.minecraft.core.NonNullList;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.item.ItemStack;
@ -61,6 +63,17 @@ public class StationBlock extends Block implements ITE<StationTileEntity> {
super.fillItemCategory(pTab, pItems);
}
@Override
public void onRemove(BlockState state, Level worldIn, BlockPos pos, BlockState newState, boolean isMoving) {
SharedDepotBlockMethods.onReplaced(state, worldIn, pos, newState, isMoving);
}
@Override
public void updateEntityAfterFallOn(BlockGetter worldIn, Entity entityIn) {
super.updateEntityAfterFallOn(worldIn, entityIn);
SharedDepotBlockMethods.onLanded(worldIn, entityIn);
}
@Override
public InteractionResult use(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand,
BlockHitResult pHit) {
@ -79,7 +92,8 @@ public class StationBlock extends Block implements ITE<StationTileEntity> {
return InteractionResult.SUCCESS;
pPlayer.getInventory()
.placeItemBackInInventory(autoSchedule.copy());
station.autoSchedule.setStackInSlot(0, ItemStack.EMPTY);
station.depotBehaviour.removeHeldItem();
station.notifyUpdate();
AllSoundEvents.playItemPickup(pPlayer);
return InteractionResult.SUCCESS;
});

View file

@ -2,11 +2,10 @@ package com.simibubi.create.content.logistics.trains.management.edgePoint.statio
import com.jozufozu.flywheel.core.PartialModel;
import com.jozufozu.flywheel.util.transform.Transform;
import com.jozufozu.flywheel.util.transform.TransformStack;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import com.mojang.math.Vector3f;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.logistics.block.depot.DepotRenderer;
import com.simibubi.create.content.logistics.trains.ITrackBlock;
import com.simibubi.create.content.logistics.trains.management.edgePoint.TrackTargetingBehaviour;
import com.simibubi.create.content.logistics.trains.management.edgePoint.TrackTargetingBehaviour.RenderedTrackOverlayType;
@ -14,23 +13,17 @@ import com.simibubi.create.foundation.render.CachedBufferer;
import com.simibubi.create.foundation.render.SuperByteBuffer;
import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.LevelRenderer;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.block.model.ItemTransforms.TransformType;
import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
import net.minecraft.client.renderer.entity.ItemRenderer;
import net.minecraft.core.BlockPos;
import net.minecraft.core.BlockPos.MutableBlockPos;
import net.minecraft.core.Direction;
import net.minecraft.util.Mth;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.Vec3;
public class StationRenderer extends SafeTileEntityRenderer<StationTileEntity> {
@ -44,10 +37,8 @@ public class StationRenderer extends SafeTileEntityRenderer<StationTileEntity> {
TrackTargetingBehaviour<GlobalStation> target = te.edgePoint;
BlockPos targetPosition = target.getGlobalPosition();
Level level = te.getLevel();
ItemStack autoSchedule = te.getAutoSchedule();
if (!autoSchedule.isEmpty())
renderItem(autoSchedule, te, partialTicks, ms, buffer, light, overlay);
DepotRenderer.renderItemsOf(te, partialTicks, ms, buffer, light, overlay, te.depotBehaviour);
BlockState trackState = level.getBlockState(targetPosition);
Block block = trackState.getBlock();
@ -114,31 +105,6 @@ public class StationRenderer extends SafeTileEntityRenderer<StationTileEntity> {
ms.popPose();
}
public static void renderItem(ItemStack itemStack, StationTileEntity te, float partialTicks, PoseStack ms,
MultiBufferSource buffer, int light, int overlay) {
ItemRenderer itemRenderer = Minecraft.getInstance()
.getItemRenderer();
TransformStack msr = TransformStack.cast(ms);
ms.pushPose();
msr.centre();
Entity renderViewEntity = Minecraft.getInstance().cameraEntity;
if (renderViewEntity != null) {
Vec3 positionVec = renderViewEntity.position();
Vec3 vectorForOffset = Vec3.atCenterOf(te.getBlockPos());
Vec3 diff = vectorForOffset.subtract(positionVec);
float yRot = (float) (Mth.atan2(diff.x, diff.z) + Math.PI);
ms.mulPose(Vector3f.YP.rotation(yRot));
}
ms.translate(0, 10 / 32d, 0);
ms.scale(.75f, .75f, .75f);
itemRenderer.renderStatic(itemStack, TransformType.FIXED, light, overlay, ms, buffer, 0);
ms.popPose();
}
public static void renderFlag(PartialModel flag, StationTileEntity te, float partialTicks, PoseStack ms,
MultiBufferSource buffer, int light, int overlay) {
if (!te.resolveFlagAngle())
@ -161,11 +127,12 @@ public class StationRenderer extends SafeTileEntityRenderer<StationTileEntity> {
progress += (Math.sin(wiggleProgress * (2 * Mth.PI) * 4) / 8f) / Math.max(1, 8f * wiggleProgress);
}
float nudge = 1 / 512f;
flag.centre()
.rotateY(yRot)
.translate(1 / 64f, 4.5f / 16f, flipped ? 13.5f / 16f : 2.5f / 16f)
.translate(nudge, 9.5f / 16f, flipped ? 14f / 16f - nudge : 2f / 16f + nudge)
.unCentre()
.rotateX((flipped ? 1 : -1) * (progress * 60 + 300));
.rotateX((flipped ? 1 : -1) * (progress * 90 + 270));
}
@Override

View file

@ -16,6 +16,7 @@ import com.simibubi.create.AllItems;
import com.simibubi.create.AllSoundEvents;
import com.simibubi.create.Create;
import com.simibubi.create.content.contraptions.components.structureMovement.AssemblyException;
import com.simibubi.create.content.logistics.block.depot.DepotBehaviour;
import com.simibubi.create.content.logistics.trains.IBogeyBlock;
import com.simibubi.create.content.logistics.trains.ITrackBlock;
import com.simibubi.create.content.logistics.trains.TrackEdge;
@ -64,9 +65,6 @@ import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.util.LazyOptional;
import net.minecraftforge.items.IItemHandler;
import net.minecraftforge.items.IItemHandlerModifiable;
import net.minecraftforge.items.ItemStackHandler;
import net.minecraftforge.network.PacketDistributor;
public class StationTileEntity extends SmartTileEntity {
@ -76,8 +74,7 @@ public class StationTileEntity extends SmartTileEntity {
protected int failedCarriageIndex;
protected AssemblyException lastException;
protected IItemHandlerModifiable autoSchedule;
protected LazyOptional<IItemHandler> capability;
protected DepotBehaviour depotBehaviour;
// for display
UUID imminentTrain;
@ -95,16 +92,16 @@ public class StationTileEntity extends SmartTileEntity {
setLazyTickRate(20);
lastException = null;
failedCarriageIndex = -1;
autoSchedule = new StationInventory();
capability = LazyOptional.of(() -> autoSchedule);
flag = LerpedFloat.linear()
.startWithValue(0);
}
@Override
public void addBehaviours(List<TileEntityBehaviour> behaviours) {
edgePoint = new TrackTargetingBehaviour<>(this, EdgePointType.STATION);
behaviours.add(edgePoint);
behaviours.add(edgePoint = new TrackTargetingBehaviour<>(this, EdgePointType.STATION));
behaviours.add(depotBehaviour = new DepotBehaviour(this).onlyAccepts(AllItems.SCHEDULE::isIn)
.withCallback(s -> applyAutoSchedule()));
depotBehaviour.addSubBehaviours(behaviours);
}
@Override
@ -114,8 +111,6 @@ public class StationTileEntity extends SmartTileEntity {
super.read(tag, clientPacket);
invalidateRenderBoundingBox();
autoSchedule.setStackInSlot(0, ItemStack.of(tag.getCompound("HeldItem")));
if (!clientPacket)
return;
if (!tag.contains("ImminentTrain")) {
@ -138,8 +133,6 @@ public class StationTileEntity extends SmartTileEntity {
protected void write(CompoundTag tag, boolean clientPacket) {
AssemblyException.write(tag, lastException);
tag.putInt("FailedCarriageIndex", failedCarriageIndex);
tag.put("HeldItem", autoSchedule.getStackInSlot(0)
.serializeNBT());
super.write(tag, clientPacket);
@ -620,13 +613,13 @@ public class StationTileEntity extends SmartTileEntity {
}
public ItemStack getAutoSchedule() {
return autoSchedule.getStackInSlot(0);
return depotBehaviour.getHeldItemStack();
}
@Override
public <T> LazyOptional<T> getCapability(Capability<T> cap, Direction side) {
if (isItemHandlerCap(cap))
return capability.cast();
return depotBehaviour.getItemCapability(cap, side);
return super.getCapability(cap, side);
}
@ -649,7 +642,7 @@ public class StationTileEntity extends SmartTileEntity {
if (!(level instanceof ServerLevel server))
return;
Vec3 v = Vec3.atCenterOf(worldPosition);
Vec3 v = Vec3.atBottomCenterOf(worldPosition.above());
server.sendParticles(ParticleTypes.HAPPY_VILLAGER, v.x, v.y, v.z, 8, 0.35, 0.05, 0.35, 1);
server.sendParticles(ParticleTypes.END_ROD, v.x, v.y + .25f, v.z, 10, 0.05, 1, 0.05, 0.005f);
}
@ -684,23 +677,4 @@ public class StationTileEntity extends SmartTileEntity {
return true;
}
private class StationInventory extends ItemStackHandler {
public StationInventory() {
super(1);
}
@Override
protected void onContentsChanged(int slot) {
applyAutoSchedule();
sendData();
}
@Override
public boolean isItemValid(int slot, ItemStack stack) {
return super.isItemValid(slot, stack) && AllItems.SCHEDULE.isIn(stack);
}
}
}

View file

@ -1,45 +1,40 @@
{
"credit": "Made with Blockbench",
"parent": "block/block",
"textures": {
"6": "create:block/bogey/frame",
"1_1": "create:block/signal_box_top",
"particle": "create:block/signal_box",
"1_0": "create:block/signal_box"
"0": "create:block/station",
"particle": "create:block/station"
},
"elements": [
{
"from": [1, 6, 1],
"to": [15, 8, 15],
"faces": {
"north": {"uv": [0, 14, 16, 16], "texture": "#1_0"},
"east": {"uv": [0, 14, 16, 16], "texture": "#1_0"},
"south": {"uv": [0, 14, 16, 16], "texture": "#1_0"},
"west": {"uv": [0, 14, 16, 16], "texture": "#1_0"},
"up": {"uv": [1, 1, 15, 15], "texture": "#1_1"}
}
},
{
"from": [1, 2, 1],
"to": [15, 6, 15],
"to": [15, 13, 15],
"faces": {
"north": {"uv": [0, 4, 7, 6], "texture": "#6"},
"east": {"uv": [0, 4, 7, 6], "texture": "#6"},
"south": {"uv": [0, 4, 7, 6], "texture": "#6"},
"west": {"uv": [0, 4, 7, 6], "texture": "#6"}
"north": {"uv": [0.5, 1.5, 7.5, 7], "texture": "#0"},
"east": {"uv": [0.5, 1.5, 7.5, 7], "texture": "#0"},
"south": {"uv": [0.5, 1.5, 7.5, 7], "texture": "#0"},
"west": {"uv": [0.5, 1.5, 7.5, 7], "texture": "#0"},
"up": {"uv": [8.5, 0.5, 15.5, 7.5], "texture": "#0"}
}
},
{
"from": [0, 0, 0],
"to": [16, 2, 16],
"faces": {
"north": {"uv": [0, 14, 16, 16], "texture": "#1_0"},
"east": {"uv": [0, 14, 16, 16], "texture": "#1_0"},
"south": {"uv": [0, 14, 16, 16], "texture": "#1_0"},
"west": {"uv": [0, 14, 16, 16], "texture": "#1_0"},
"up": {"uv": [0, 0, 16, 16], "texture": "#1_1"},
"down": {"uv": [0, 0, 16, 16], "texture": "#1_1"}
"north": {"uv": [0, 7, 8, 8], "texture": "#0"},
"east": {"uv": [8, 7, 0, 8], "texture": "#0"},
"south": {"uv": [0, 7, 8, 8], "texture": "#0"},
"west": {"uv": [0, 7, 8, 8], "texture": "#0"},
"up": {"uv": [0, 8, 8, 16], "texture": "#0"},
"down": {"uv": [8, 8, 16, 16], "texture": "#0"}
}
}
],
"groups": [
{
"name": "Base",
"origin": [8, 8, 8],
"color": 0,
"children": [0, 1]
}
]
}

View file

@ -1,76 +1,43 @@
{
"credit": "Made with Blockbench",
"parent": "block/block",
"ambientocclusion": false,
"texture_size": [32, 32],
"textures": {
"2": "create:entity/blueprint_small",
"6": "create:block/bogey/frame",
"particle": "create:block/signal_box",
"1_0": "create:block/signal_box"
"0": "create:block/station",
"1": "create:entity/blueprint_small",
"particle": "create:block/station"
},
"elements": [
{
"from": [0, 1, -1],
"to": [1, 13, 1],
"faces": {
"north": {"uv": [3.5, 7, 4, 13], "texture": "#6"},
"east": {"uv": [4.5, 7, 3.5, 13], "texture": "#6"},
"south": {"uv": [4, 7, 4.5, 13], "texture": "#6"},
"west": {"uv": [3.5, 7, 4.5, 13], "texture": "#6"},
"up": {"uv": [3.5, 7.5, 4.5, 7], "rotation": 90, "texture": "#6"}
}
},
{
"name": "Flag Pole",
"from": [0, -1, -1],
"to": [1, 1, 1],
"to": [1, 13, 1],
"rotation": {"angle": 0, "axis": "x", "origin": [14, 0, 0]},
"faces": {
"north": {"uv": [4, 7, 3.5, 8], "texture": "#6"},
"east": {"uv": [4.5, 7, 3.5, 8], "texture": "#6"},
"south": {"uv": [4.5, 7, 4, 8], "texture": "#6"},
"west": {"uv": [4.5, 7, 3.5, 8], "texture": "#6"},
"down": {"uv": [3.5, 8, 4.5, 7.5], "rotation": 270, "texture": "#6"}
"north": {"uv": [0.5, 1, 7.5, 1.5], "rotation": 90, "texture": "#0"},
"east": {"uv": [0.5, 0.5, 7.5, 1.5], "rotation": 90, "texture": "#0"},
"south": {"uv": [0.5, 0.5, 7.5, 1], "rotation": 90, "texture": "#0"},
"west": {"uv": [0.5, 0.5, 7.5, 1.5], "rotation": 90, "texture": "#0"},
"up": {"uv": [7.5, 0.5, 7, 1.5], "rotation": 180, "texture": "#0"},
"down": {"uv": [1, 0.5, 0.5, 1.5], "texture": "#0"}
}
},
{
"from": [0.5, 9, -7],
"to": [0.5, 13, 0],
"name": "Flag",
"from": [0.5, 9, -6.5],
"to": [0.5, 13, -0.5],
"rotation": {"angle": 0, "axis": "x", "origin": [14, 0, 0]},
"faces": {
"east": {"uv": [1, 9, 5, 2], "rotation": 90, "texture": "#2"},
"west": {"uv": [1, 2, 5, 9], "rotation": 90, "texture": "#2"},
"down": {"uv": [0, 14, 4, 14], "rotation": 270, "texture": "#1_0"}
"east": {"uv": [2, 1, 6, 7], "rotation": 270, "texture": "#1"},
"west": {"uv": [2, 1, 6, 7], "rotation": 90, "texture": "#1"}
}
}
],
"display": {
"thirdperson_righthand": {
"rotation": [75, 45, 0],
"translation": [0, 2.5, 0],
"scale": [0.375, 0.375, 0.375]
},
"thirdperson_lefthand": {
"rotation": [75, 45, 0],
"translation": [0, 2.5, 0],
"scale": [0.375, 0.375, 0.375]
},
"firstperson_righthand": {
"rotation": [0, 45, 0],
"scale": [0.4, 0.4, 0.4]
},
"firstperson_lefthand": {
"rotation": [0, 225, 0],
"scale": [0.4, 0.4, 0.4]
},
"ground": {
"translation": [0, 3, 0],
"scale": [0.25, 0.25, 0.25]
},
"gui": {
"rotation": [30, 225, 0],
"scale": [0.625, 0.625, 0.625]
},
"fixed": {
"scale": [0.5, 0.5, 0.5]
}
"display": {},
"groups": [
{
"name": "Flag",
"origin": [8, 8, 8],
"color": 0,
"children": [0, 1]
}
]
}

View file

@ -1,43 +1,43 @@
{
"credit": "Made with Blockbench",
"parent": "block/block",
"textures": {
"2": "create:block/indicator/0",
"6": "create:block/bogey/frame",
"particle": "create:block/signal_box",
"1_0": "create:block/signal_box"
"0": "create:block/station",
"1": "create:block/indicator/0",
"particle": "create:block/station"
},
"elements": [
{
"from": [0, 1, -1],
"to": [1, 13, 1],
"faces": {
"north": {"uv": [3.5, 7, 4, 13], "texture": "#6"},
"east": {"uv": [4.5, 7, 3.5, 13], "texture": "#6"},
"south": {"uv": [4, 7, 4.5, 13], "texture": "#6"},
"west": {"uv": [3.5, 7, 4.5, 13], "texture": "#6"},
"up": {"uv": [3.5, 7.5, 4.5, 7], "rotation": 90, "texture": "#6"}
}
},
{
"name": "Flag Pole",
"from": [0, -1, -1],
"to": [1, 1, 1],
"to": [1, 13, 1],
"rotation": {"angle": 0, "axis": "x", "origin": [14, 0, 0]},
"faces": {
"north": {"uv": [4, 7, 3.5, 8], "texture": "#6"},
"east": {"uv": [4.5, 7, 3.5, 8], "texture": "#6"},
"south": {"uv": [4.5, 7, 4, 8], "texture": "#6"},
"west": {"uv": [4.5, 7, 3.5, 8], "texture": "#6"},
"down": {"uv": [3.5, 8, 4.5, 7.5], "rotation": 270, "texture": "#6"}
"north": {"uv": [0.5, 1, 7.5, 1.5], "rotation": 90, "texture": "#0"},
"east": {"uv": [0.5, 0.5, 7.5, 1.5], "rotation": 90, "texture": "#0"},
"south": {"uv": [0.5, 0.5, 7.5, 1], "rotation": 90, "texture": "#0"},
"west": {"uv": [0.5, 0.5, 7.5, 1.5], "rotation": 90, "texture": "#0"},
"up": {"uv": [7.5, 0.5, 7, 1.5], "rotation": 180, "texture": "#0"},
"down": {"uv": [1, 0.5, 0.5, 1.5], "texture": "#0"}
}
},
{
"from": [0.5, 9, -7],
"to": [0.5, 13, 0],
"name": "Flag",
"from": [0.5, 9, -6.5],
"to": [0.5, 13, -0.5],
"rotation": {"angle": 0, "axis": "x", "origin": [14, 0, 0]},
"faces": {
"east": {"uv": [0, 0, 4, 7], "rotation": 90, "texture": "#2"},
"west": {"uv": [0, 0, 4, 7], "rotation": 270, "texture": "#2"},
"down": {"uv": [0, 14, 4, 14], "rotation": 270, "texture": "#1_0"}
"east": {"uv": [0, 0, 4, 6], "rotation": 270, "texture": "#1"},
"west": {"uv": [0, 0, 4, 6], "rotation": 90, "texture": "#1"}
}
}
],
"display": {},
"groups": [
{
"name": "Flag",
"origin": [8, 8, 8],
"color": 0,
"children": [0, 1]
}
]
}

View file

@ -1,43 +1,43 @@
{
"credit": "Made with Blockbench",
"parent": "block/block",
"textures": {
"2": "create:block/indicator/6",
"6": "create:block/bogey/frame",
"particle": "create:block/signal_box",
"1_0": "create:block/signal_box"
"0": "create:block/station",
"1": "create:block/indicator/6",
"particle": "create:block/station"
},
"elements": [
{
"from": [0, 1, -1],
"to": [1, 13, 1],
"faces": {
"north": {"uv": [3.5, 7, 4, 13], "texture": "#6"},
"east": {"uv": [4.5, 7, 3.5, 13], "texture": "#6"},
"south": {"uv": [4, 7, 4.5, 13], "texture": "#6"},
"west": {"uv": [3.5, 7, 4.5, 13], "texture": "#6"},
"up": {"uv": [3.5, 7.5, 4.5, 7], "rotation": 90, "texture": "#6"}
}
},
{
"name": "Flag Pole",
"from": [0, -1, -1],
"to": [1, 1, 1],
"to": [1, 13, 1],
"rotation": {"angle": 0, "axis": "x", "origin": [14, 0, 0]},
"faces": {
"north": {"uv": [4, 7, 3.5, 8], "texture": "#6"},
"east": {"uv": [4.5, 7, 3.5, 8], "texture": "#6"},
"south": {"uv": [4.5, 7, 4, 8], "texture": "#6"},
"west": {"uv": [4.5, 7, 3.5, 8], "texture": "#6"},
"down": {"uv": [3.5, 8, 4.5, 7.5], "rotation": 270, "texture": "#6"}
"north": {"uv": [0.5, 1, 7.5, 1.5], "rotation": 90, "texture": "#0"},
"east": {"uv": [0.5, 0.5, 7.5, 1.5], "rotation": 90, "texture": "#0"},
"south": {"uv": [0.5, 0.5, 7.5, 1], "rotation": 90, "texture": "#0"},
"west": {"uv": [0.5, 0.5, 7.5, 1.5], "rotation": 90, "texture": "#0"},
"up": {"uv": [7.5, 0.5, 7, 1.5], "rotation": 180, "texture": "#0"},
"down": {"uv": [1, 0.5, 0.5, 1.5], "texture": "#0"}
}
},
{
"from": [0.5, 9, -7],
"to": [0.5, 13, 0],
"name": "Flag",
"from": [0.5, 9, -6.5],
"to": [0.5, 13, -0.5],
"rotation": {"angle": 0, "axis": "x", "origin": [14, 0, 0]},
"faces": {
"east": {"uv": [0, 0, 4, 7], "rotation": 90, "texture": "#2"},
"west": {"uv": [0, 0, 4, 7], "rotation": 270, "texture": "#2"},
"down": {"uv": [0, 14, 4, 14], "rotation": 270, "texture": "#1_0"}
"east": {"uv": [0, 0, 4, 6], "rotation": 270, "texture": "#1"},
"west": {"uv": [0, 0, 4, 6], "rotation": 90, "texture": "#1"}
}
}
],
"display": {},
"groups": [
{
"name": "Flag",
"origin": [8, 8, 8],
"color": 0,
"children": [0, 1]
}
]
}

View file

@ -1,76 +1,56 @@
{
"credit": "Made with Blockbench",
"parent": "block/block",
"textures": {
"2": "create:block/indicator/6",
"6": "create:block/bogey/frame",
"1_1": "create:block/signal_box_top",
"particle": "create:block/signal_box",
"1_0": "create:block/signal_box"
"0": "create:block/station",
"1": "create:block/indicator/6",
"particle": "create:block/station"
},
"elements": [
{
"from": [1, 6, 1],
"to": [15, 8, 15],
"faces": {
"north": {"uv": [0, 14, 16, 16], "texture": "#1_0"},
"east": {"uv": [0, 14, 16, 16], "texture": "#1_0"},
"south": {"uv": [0, 14, 16, 16], "texture": "#1_0"},
"west": {"uv": [0, 14, 16, 16], "texture": "#1_0"},
"up": {"uv": [1, 1, 15, 15], "texture": "#1_1"}
}
},
{
"from": [1, 2, 1],
"to": [15, 6, 15],
"to": [15, 13, 15],
"faces": {
"north": {"uv": [0, 4, 7, 6], "texture": "#6"},
"east": {"uv": [0, 4, 7, 6], "texture": "#6"},
"south": {"uv": [0, 4, 7, 6], "texture": "#6"},
"west": {"uv": [0, 4, 7, 6], "texture": "#6"}
"north": {"uv": [0.5, 1.5, 7.5, 7], "texture": "#0"},
"east": {"uv": [0.5, 1.5, 7.5, 7], "texture": "#0"},
"south": {"uv": [0.5, 1.5, 7.5, 7], "texture": "#0"},
"west": {"uv": [0.5, 1.5, 7.5, 7], "texture": "#0"},
"up": {"uv": [8.5, 0.5, 15.5, 7.5], "texture": "#0"}
}
},
{
"from": [0, 0, 0],
"to": [16, 2, 16],
"faces": {
"north": {"uv": [0, 14, 16, 16], "texture": "#1_0"},
"east": {"uv": [0, 14, 16, 16], "texture": "#1_0"},
"south": {"uv": [0, 14, 16, 16], "texture": "#1_0"},
"west": {"uv": [0, 14, 16, 16], "texture": "#1_0"},
"up": {"uv": [0, 0, 16, 16], "texture": "#1_1"},
"down": {"uv": [0, 0, 16, 16], "texture": "#1_1"}
"north": {"uv": [0, 7, 8, 8], "texture": "#0"},
"east": {"uv": [8, 7, 0, 8], "texture": "#0"},
"south": {"uv": [0, 7, 8, 8], "texture": "#0"},
"west": {"uv": [0, 7, 8, 8], "texture": "#0"},
"up": {"uv": [0, 8, 8, 16], "texture": "#0"},
"down": {"uv": [8, 8, 16, 16], "texture": "#0"}
}
},
{
"from": [15, 5.5, 12.5],
"to": [16, 17.5, 14.5],
"name": "Flag Pole",
"from": [15, 8.5, 13],
"to": [16, 22.5, 15],
"rotation": {"angle": 0, "axis": "x", "origin": [14, 8.5, 14]},
"faces": {
"north": {"uv": [3.5, 7, 4, 13], "texture": "#6"},
"east": {"uv": [4.5, 7, 3.5, 13], "texture": "#6"},
"south": {"uv": [4, 7, 4.5, 13], "texture": "#6"},
"west": {"uv": [3.5, 7, 4.5, 13], "texture": "#6"},
"up": {"uv": [3.5, 7.5, 4.5, 7], "rotation": 90, "texture": "#6"}
"north": {"uv": [0.5, 0.5, 7.5, 1], "rotation": 270, "texture": "#0"},
"east": {"uv": [0.5, 0.5, 7.5, 1.5], "rotation": 270, "texture": "#0"},
"south": {"uv": [0.5, 0.5, 7.5, 1], "rotation": 270, "texture": "#0"},
"west": {"uv": [0.5, 0.5, 7.5, 1.5], "rotation": 90, "texture": "#0"},
"up": {"uv": [7.5, 0.5, 7, 1.5], "rotation": 180, "texture": "#0"},
"down": {"uv": [1, 0.5, 0.5, 1.5], "texture": "#0"}
}
},
{
"from": [15, 3.5, 12.5],
"to": [16, 5.5, 14.5],
"name": "Flag",
"from": [15.5, 18.5, 7.5],
"to": [15.5, 22.5, 13.5],
"rotation": {"angle": 0, "axis": "x", "origin": [14, 8.5, 14]},
"faces": {
"north": {"uv": [4, 7, 3.5, 8], "texture": "#6"},
"east": {"uv": [4.5, 7, 3.5, 8], "texture": "#6"},
"south": {"uv": [4.5, 7, 4, 8], "texture": "#6"},
"west": {"uv": [4.5, 7, 3.5, 8], "texture": "#6"},
"down": {"uv": [3.5, 8, 4.5, 7.5], "rotation": 270, "texture": "#6"}
}
},
{
"from": [15.5, 13.5, 6.5],
"to": [15.5, 17.5, 13.5],
"faces": {
"east": {"uv": [0, 0, 4, 7], "rotation": 90, "texture": "#2"},
"west": {"uv": [0, 0, 4, 7], "rotation": 270, "texture": "#2"},
"down": {"uv": [0, 14, 4, 14], "rotation": 270, "texture": "#1_0"}
"east": {"uv": [0, 0, 4, 6], "rotation": 270, "texture": "#1"},
"west": {"uv": [0, 0, 4, 6], "rotation": 90, "texture": "#1"}
}
}
],
@ -104,5 +84,19 @@
"fixed": {
"scale": [0.5, 0.5, 0.5]
}
},
"groups": [
{
"name": "Base",
"origin": [8, 8, 8],
"color": 0,
"children": [0, 1]
},
{
"name": "Flag",
"origin": [8, 8, 8],
"color": 0,
"children": [2, 3]
}
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 308 B

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 284 B

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB