more stuff

This commit is contained in:
DrMangoTea
2025-03-02 12:55:44 +01:00
parent 212ec033b1
commit 12cf1c787b
113 changed files with 19395 additions and 17784 deletions

View File

@@ -17,6 +17,16 @@ public class TFMGShapes {
public static final VoxelShaper
ENGINE = shape(0, 0, 0, 16, 7, 16).add(3, 7, 0, 13, 12, 16)
.forDirectional(SOUTH),
ENGINE_GEARBOX = shape(0, 0, -1, 3, 5, 15)
.add(13, 0, -1, 16, 5, 15)
.add(3, 0, -1, 13, 12, 11)
.add(3, 0, 11, 13, 11, 15)
.add(13, 5, 3, 16, 13, 13)
.add(0, 5, 3, 3, 13, 13)
.add(13, 5, -1, 16, 7, 1)
.add(0, 5, -1, 3, 7, 1)
.add(15, 5, 9, 15, 11, 9)
.forDirectional(SOUTH),
ENGINE_FRONT = shape(0, 0, 1, 16, 7, 16).add(3, 7, 1, 13, 12, 16)
.forDirectional(SOUTH),
PUMPJACK_HAMMER_PART = shape(0, 2, 0, 16, 14, 16)
@@ -98,12 +108,12 @@ public class TFMGShapes {
ELECTRICAL_SWITCH_WALL = shape(5, 3, 0, 11, 13, 3)
.forHorizontal(SOUTH),
POLARIZER = shape(4, 8, 0, 12, 12, 2)
.add(5, 8, 14, 11, 11, 16)
.add(11, 8, 4, 15, 12, 11)
.add(1, 8, 4, 5, 12, 11)
.add(0, 0, 0, 16, 8, 16)
.forHorizontal(NORTH);
POLARIZER = shape(4, 8, 0, 12, 12, 2)
.add(5, 8, 14, 11, 11, 16)
.add(11, 8, 4, 15, 12, 11)
.add(1, 8, 4, 5, 12, 11)
.add(0, 0, 0, 16, 8, 16)
.forHorizontal(NORTH);
public static final VoxelShape
EMPTY = shape(0, 0, 0, 0, 0, 0).build(),

View File

@@ -0,0 +1,39 @@
package com.drmangotea.tfmg.base.events;
import com.drmangotea.tfmg.content.engines.engine_controller.EngineControllerClientHandler;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.client.ConfigScreenHandler;
import net.minecraftforge.client.event.*;
import net.minecraftforge.client.event.RenderLevelStageEvent.Stage;
import net.minecraftforge.client.gui.overlay.VanillaGuiOverlay;
import net.minecraftforge.event.TickEvent.ClientTickEvent;
import net.minecraftforge.event.TickEvent.Phase;
import net.minecraftforge.event.TickEvent.RenderTickEvent;
import net.minecraftforge.event.entity.EntityMountEvent;
import net.minecraftforge.event.entity.player.ItemTooltipEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import net.minecraftforge.event.level.LevelEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.ModContainer;
import net.minecraftforge.fml.ModList;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
import net.minecraftforge.fml.event.lifecycle.FMLLoadCompleteEvent;
import static com.jozufozu.flywheel.backend.Backend.isGameActive;
@EventBusSubscriber(Dist.CLIENT)
public class TFMGClientEvents {
@SubscribeEvent
public static void onTick(ClientTickEvent event) {
if (!isGameActive())
return;
if (event.phase == Phase.START) {
EngineControllerClientHandler.tick();
}
}
}

View File

@@ -216,6 +216,7 @@ public class ElectricBlockEntity extends SmartBlockEntity implements IElectric,
@Override
public void remove() {
super.remove();
this.data.destroyed = true;
for (Direction d : Direction.values()) {
if (hasElectricitySlot(d))
@@ -229,7 +230,7 @@ public class ElectricBlockEntity extends SmartBlockEntity implements IElectric,
}
if (data.electricalNetworkId != getPos())
getOrCreateElectricNetwork().getMembers().remove(this);
//
if (data.electricalNetworkId == getPos())
ElectricNetworkManager.networks.get(getLevel())
.remove(getData().getId());
@@ -239,7 +240,7 @@ public class ElectricBlockEntity extends SmartBlockEntity implements IElectric,
public void tick() {
super.tick();
if (data.connectNextTick) {
TFMG.LOGGER.debug("SIGMA A");
TFMG.LOGGER.debug("AAAAAAA");
onPlaced();
data.connectNextTick = false;
}

View File

@@ -32,14 +32,36 @@ public interface IElectric {
if (!getLevelAccessor().isClientSide())
TFMGPackets.getChannel().send(PacketDistributor.ALL.noArg(), new ConnectNeightborsPacket(BlockPos.of(getPos())));
TFMG.NETWORK_MANAGER.getOrCreateNetworkFor(this);
ElectricalNetwork network = TFMG.NETWORK_MANAGER.getOrCreateNetworkFor(this);
setNetwork(getPos());
getData().electricalNetworkId = getPos();
updateNetwork();
//BlockPos pos = BlockPos.of(getPos());
///// ////
//
//
//for (Direction d : Direction.values()) {
// if (hasElectricitySlot(d))
// if (getLevelAccessor().getBlockEntity(pos.relative(d)) instanceof IElectric be) {
// if (be.hasElectricitySlot(d.getOpposite())) {
// if (!be.destroyed()) {
//
//
// for(IElectric member : be.getOrCreateElectricNetwork().members){
// network.add(member);
// member.setNetwork(this.getData().electricalNetworkId);
//
// }
//
// }
// }
// }
//}
//updateNextTick();
onConnected();
sendStuff();
updateNextTick();
}
default int getMaxVoltage() {
@@ -52,6 +74,7 @@ public interface IElectric {
default void onConnected() {
BlockPos pos = BlockPos.of(getPos());
for (Direction d : Direction.values()) {
if (hasElectricitySlot(d))
@@ -61,7 +84,6 @@ public interface IElectric {
getOrCreateElectricNetwork().add(be);
if (be.getData().getId() != getData().getId()) {
be.setNetwork(getData().getId());
TFMG.LOGGER.debug("KONNEQT ");
be.onConnected();
if (!getLevelAccessor().isClientSide())
sendStuff();

View File

@@ -9,6 +9,7 @@ import com.drmangotea.tfmg.content.electricity.generators.GeneratorBlockEntity;
import com.drmangotea.tfmg.content.electricity.storage.AccumulatorBlockEntity;
import com.drmangotea.tfmg.content.electricity.utilities.electric_motor.ElectricMotorBlockEntity;
import com.drmangotea.tfmg.content.engines.base.AbstractEngineBlockEntity;
import com.drmangotea.tfmg.content.engines.engine_controller.EngineControllerBlockEntity;
import com.drmangotea.tfmg.content.engines.regular_engine.RegularEngineBlockEntity;
import com.drmangotea.tfmg.content.machinery.metallurgy.blast_stove.BlastStoveBlockEntity;
import com.drmangotea.tfmg.content.machinery.metallurgy.casting_basin.CastingBasinBlockEntity;
@@ -52,18 +53,24 @@ public class DebugCinderBlockItem extends Item {
BlockPos pos = context.getClickedPos();
Level level = context.getLevel();
if(level.getBlockEntity(pos) instanceof EngineControllerBlockEntity be){
context.getPlayer().getPersistentData().remove("IsUsingEngineController");
TFMG.LOGGER.debug("REMOVED PERSISTENT DATA");
return InteractionResult.SUCCESS;
}
if(level.getBlockEntity(pos) instanceof RegularEngineBlockEntity be){
be.updateRotation();
return InteractionResult.SUCCESS;
}
if(level.getBlockEntity(pos) instanceof GeneratorBlockEntity be){
be.updateStress();
return InteractionResult.SUCCESS;
}
if(level.getBlockEntity(pos) instanceof ElectricMotorBlockEntity be){
be.onPlaced();
return InteractionResult.SUCCESS;
}
//if(level.getBlockEntity(pos) instanceof GeneratorBlockEntity be){
// be.updateStress();
// return InteractionResult.SUCCESS;
//}
//if(level.getBlockEntity(pos) instanceof ElectricMotorBlockEntity be){
// be.onPlaced();
// return InteractionResult.SUCCESS;
//}
if(level.getBlockEntity(pos) instanceof ConcreteHoseBlockEntity be){
@@ -90,6 +97,10 @@ public class DebugCinderBlockItem extends Item {
return InteractionResult.SUCCESS;
}
if(level.getBlockEntity(pos) instanceof IElectric be){
be.onPlaced();
if(context.getPlayer().isShiftKeyDown()) {
TFMG.LOGGER.debug("///////////////////////////////");
TFMG.LOGGER.debug("Group Resistance "+be.getData().group.resistance);

View File

@@ -0,0 +1,41 @@
package com.drmangotea.tfmg.content.engines.engine_controller;
import com.drmangotea.tfmg.base.TFMGHorizontalDirectionalBlock;
import com.drmangotea.tfmg.registry.TFMGBlockEntities;
import com.simibubi.create.content.redstone.link.controller.LecternControllerBlockEntity;
import com.simibubi.create.foundation.block.IBE;
import net.minecraft.core.BlockPos;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.BlockHitResult;
public class EngineControllerBlock extends TFMGHorizontalDirectionalBlock implements IBE<EngineControllerBlockEntity> {
public EngineControllerBlock(Properties p_54120_) {
super(p_54120_);
}
@Override
public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand,
BlockHitResult hit) {
if (!player.isShiftKeyDown() && LecternControllerBlockEntity.playerInRange(player, world, pos)) {
if (!world.isClientSide)
withBlockEntityDo(world, pos, be -> be.tryStartUsing(player));
return InteractionResult.SUCCESS;
}
return InteractionResult.PASS;
}
@Override
public Class<EngineControllerBlockEntity> getBlockEntityClass() {
return EngineControllerBlockEntity.class;
}
@Override
public BlockEntityType<? extends EngineControllerBlockEntity> getBlockEntityType() {
return TFMGBlockEntities.ENGINE_CONTROLLER.get();
}
}

View File

@@ -0,0 +1,153 @@
package com.drmangotea.tfmg.content.engines.engine_controller;
import com.drmangotea.tfmg.TFMG;
import com.simibubi.create.content.redstone.link.controller.LinkedControllerClientHandler;
import com.simibubi.create.foundation.blockEntity.SmartBlockEntity;
import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour;
import net.minecraft.client.Minecraft;
import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.Vec3;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.common.ForgeMod;
import net.minecraftforge.fml.DistExecutor;
import java.util.List;
import java.util.UUID;
public class EngineControllerBlockEntity extends SmartBlockEntity {
private UUID user;
private UUID prevUser;
private boolean deactivatedThisTick;
public EngineControllerBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
super(type, pos, state);
}
public ItemStack getController() {
return ItemStack.EMPTY;
}
@Override
protected void write(CompoundTag compound, boolean clientPacket) {
super.write(compound, clientPacket);
if (user != null)
compound.putUUID("User", user);
}
@Override
public void tick() {
super.tick();
if (level.isClientSide) {
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> this::tryToggleActive);
prevUser = user;
}
if (!level.isClientSide) {
deactivatedThisTick = false;
if (!(level instanceof ServerLevel))
return;
if (user == null)
return;
Entity entity = ((ServerLevel) level).getEntity(user);
if (!(entity instanceof Player)) {
stopUsing(null);
return;
}
Player player = (Player) entity;
if (!playerInRange(player, level, worldPosition) || !playerIsUsingEngineController(player))
stopUsing(player);
}
}
@OnlyIn(Dist.CLIENT)
private void tryToggleActive() {
if (user == null && Minecraft.getInstance().player.getUUID().equals(prevUser)) {
EngineControllerClientHandler.deactivateInLectern();
} else if (prevUser == null && Minecraft.getInstance().player.getUUID().equals(user)) {
EngineControllerClientHandler.activateInLectern(worldPosition);
}
}
public void tryStopUsing(Player player) {
TFMG.LOGGER.debug("Try Stop Using");
if (isUsedBy(player))
stopUsing(player);
}
public static boolean playerIsUsingEngineController(Player player) {
return player.getPersistentData().contains("IsUsingEngineController");
}
public void tryStartUsing(Player player) {
TFMG.LOGGER.debug("TRY START USING");
if (!playerInRange(player, level, worldPosition))
TFMG.LOGGER.debug("Not in Range");
if (playerIsUsingEngineController(player))
TFMG.LOGGER.debug("Already Using");
if (deactivatedThisTick)
TFMG.LOGGER.debug("Deactivated");
if (hasUser())
TFMG.LOGGER.debug("Already has user");
if (!deactivatedThisTick && !hasUser() && !playerIsUsingEngineController(player) && playerInRange(player, level, worldPosition)) {
TFMG.LOGGER.debug("START USING");
startUsing(player);
}
}
private void startUsing(Player player) {
user = player.getUUID();
player.getPersistentData().putBoolean("IsUsingEngineController", true);
sendData();
}
private void stopUsing(Player player) {
TFMG.LOGGER.debug("STOP USING");
user = null;
if (player != null)
player.getPersistentData().remove("IsUsingEngineController");
deactivatedThisTick = true;
sendData();
}
@Override
protected void read(CompoundTag compound, boolean clientPacket) {
super.read(compound, clientPacket);
user = compound.hasUUID("User") ? compound.getUUID("User") : null;
}
public boolean isUsedBy(Player player) {
return hasUser() && user.equals(player.getUUID());
}
public boolean hasUser() {
return user != null;
}
@Override
public void addBehaviours(List<BlockEntityBehaviour> behaviours) {
}
public static boolean playerInRange(Player player, Level world, BlockPos pos) {
double reach = 0.4 * player.getAttributeValue(ForgeMod.BLOCK_REACH.get());
return player.distanceToSqr(Vec3.atCenterOf(pos)) < reach * reach;
}
}

View File

@@ -0,0 +1,259 @@
package com.drmangotea.tfmg.content.engines.engine_controller;
import com.drmangotea.tfmg.TFMG;
import com.drmangotea.tfmg.content.engines.engine_controller.packets.EngineControllerBindPacket;
import com.drmangotea.tfmg.content.engines.engine_controller.packets.EngineControllerInputPacket;
import com.drmangotea.tfmg.content.engines.engine_controller.packets.EngineControllerStopControllerPacket;
import com.drmangotea.tfmg.registry.TFMGPackets;
import com.mojang.blaze3d.platform.InputConstants;
import com.mojang.blaze3d.vertex.PoseStack;
import com.simibubi.create.*;
import com.simibubi.create.content.redstone.link.LinkBehaviour;
import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour;
import com.simibubi.create.foundation.item.TooltipHelper;
import com.simibubi.create.foundation.utility.Components;
import com.simibubi.create.foundation.utility.ControlsUtil;
import com.simibubi.create.foundation.utility.Lang;
import net.minecraft.ChatFormatting;
import net.minecraft.client.KeyMapping;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.screens.Screen;
import net.minecraft.client.player.LocalPlayer;
import net.minecraft.core.BlockPos;
import net.minecraft.network.chat.Component;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.phys.shapes.VoxelShape;
import net.minecraftforge.client.gui.overlay.ForgeGui;
import org.lwjgl.glfw.GLFW;
import java.util.*;
public class EngineControllerClientHandler {
//public static final IGuiOverlay OVERLAY = LinkedControllerClientHandler::renderOverlay;
public static Mode MODE = Mode.IDLE;
public static int PACKET_RATE = 5;
public static Collection<Integer> currentlyPressed = new HashSet<>();
private static BlockPos controllerPos;
private static BlockPos selectedLocation = BlockPos.ZERO;
private static int packetCooldown;
public static void toggleBindMode(BlockPos location) {
if (MODE == Mode.IDLE) {
MODE = Mode.BIND;
selectedLocation = location;
} else {
MODE = Mode.IDLE;
TFMG.LOGGER.debug("TOGGLE BIND MODE");
onReset();
}
}
public static void toggle() {
if (MODE == Mode.IDLE) {
MODE = Mode.ACTIVE;
controllerPos = null;
} else {
MODE = Mode.IDLE;
TFMG.LOGGER.debug("TOGGLE");
onReset();
}
}
public static void activateInLectern(BlockPos lecternAt) {
if (MODE == Mode.IDLE) {
MODE = Mode.ACTIVE;
controllerPos = lecternAt;
}
}
public static void deactivateInLectern() {
if (MODE == Mode.ACTIVE && inLectern()) {
MODE = Mode.IDLE;
TFMG.LOGGER.debug("DEACTIVATE");
onReset();
}
}
public static boolean inLectern() {
return controllerPos != null;
}
protected static void onReset() {
ControlsUtil.getControls()
.forEach(kb -> kb.setDown(ControlsUtil.isActuallyPressed(kb)));
packetCooldown = 0;
selectedLocation = BlockPos.ZERO;
if (inLectern())
TFMGPackets.getChannel().sendToServer(new EngineControllerStopControllerPacket(controllerPos));
controllerPos = null;
if (!currentlyPressed.isEmpty())
TFMGPackets.getChannel().sendToServer(new EngineControllerInputPacket(currentlyPressed, false));
currentlyPressed.clear();
// LinkedControllerItemRenderer.resetButtons();
}
public static void tick() {
// LinkedControllerItemRenderer.tick();
if (MODE == Mode.IDLE)
return;
if (packetCooldown > 0)
packetCooldown--;
Minecraft mc = Minecraft.getInstance();
LocalPlayer player = mc.player;
ItemStack heldItem = player.getMainHandItem();
if (player.isSpectator()) {
MODE = Mode.IDLE;
TFMG.LOGGER.debug("SPEKTATOR");
onReset();
return;
}
if (!inLectern() && !AllItems.LINKED_CONTROLLER.isIn(heldItem)) {
heldItem = player.getOffhandItem();
if (!AllItems.LINKED_CONTROLLER.isIn(heldItem)) {
MODE = Mode.IDLE;
//onReset();
return;
}
}
if (inLectern() && AllBlocks.LECTERN_CONTROLLER.get()
.getBlockEntityOptional(mc.level, controllerPos)
.map(be -> !be.isUsedBy(mc.player))
.orElse(true)) {
deactivateInLectern();
return;
}
if (mc.screen != null) {
MODE = Mode.IDLE;
TFMG.LOGGER.debug("NO SCREEN");
onReset();
return;
}
if (InputConstants.isKeyDown(mc.getWindow()
.getWindow(), GLFW.GLFW_KEY_ESCAPE)) {
MODE = Mode.IDLE;
TFMG.LOGGER.debug("ESCAPE");
onReset();
return;
}
Vector<KeyMapping> controls = ControlsUtil.getControls();
Collection<Integer> pressedKeys = new HashSet<>();
for (int i = 0; i < controls.size(); i++) {
if (ControlsUtil.isActuallyPressed(controls.get(i)))
pressedKeys.add(i);
}
Collection<Integer> newKeys = new HashSet<>(pressedKeys);
Collection<Integer> releasedKeys = currentlyPressed;
newKeys.removeAll(releasedKeys);
releasedKeys.removeAll(pressedKeys);
if (MODE == Mode.ACTIVE) {
// Released Keys
if (!releasedKeys.isEmpty()) {
TFMGPackets.getChannel().sendToServer(new EngineControllerInputPacket(releasedKeys, false, controllerPos));
AllSoundEvents.CONTROLLER_CLICK.playAt(player.level(), player.blockPosition(), 1f, .5f, true);
}
// Newly Pressed Keys
if (!newKeys.isEmpty()) {
TFMGPackets.getChannel().sendToServer(new EngineControllerInputPacket(newKeys, true, controllerPos));
packetCooldown = PACKET_RATE;
AllSoundEvents.CONTROLLER_CLICK.playAt(player.level(), player.blockPosition(), 1f, .75f, true);
}
// Keepalive Pressed Keys
if (packetCooldown == 0) {
if (!pressedKeys.isEmpty()) {
TFMGPackets.getChannel().sendToServer(new EngineControllerInputPacket(pressedKeys, true, controllerPos));
packetCooldown = PACKET_RATE;
}
}
}
if (MODE == Mode.BIND) {
VoxelShape shape = mc.level.getBlockState(selectedLocation)
.getShape(mc.level, selectedLocation);
if (!shape.isEmpty())
CreateClient.OUTLINER.showAABB("controller", shape.bounds()
.move(selectedLocation))
.colored(0xB73C2D)
.lineWidth(1 / 16f);
for (Integer integer : newKeys) {
LinkBehaviour linkBehaviour = BlockEntityBehaviour.get(mc.level, selectedLocation, LinkBehaviour.TYPE);
if (linkBehaviour != null) {
TFMGPackets.getChannel().sendToServer(new EngineControllerBindPacket(integer, selectedLocation));
Lang.translate("linked_controller.key_bound", controls.get(integer)
.getTranslatedKeyMessage()
.getString())
.sendStatus(mc.player);
}
MODE = Mode.IDLE;
break;
}
}
currentlyPressed = pressedKeys;
controls.forEach(kb -> kb.setDown(false));
}
public static void renderOverlay(ForgeGui gui, GuiGraphics graphics, float partialTicks, int width1,
int height1) {
Minecraft mc = Minecraft.getInstance();
if (mc.options.hideGui)
return;
if (MODE != Mode.BIND)
return;
PoseStack poseStack = graphics.pose();
poseStack.pushPose();
Screen tooltipScreen = new Screen(Components.immutableEmpty()) {
};
tooltipScreen.init(mc, width1, height1);
Object[] keys = new Object[6];
Vector<KeyMapping> controls = ControlsUtil.getControls();
for (int i = 0; i < controls.size(); i++) {
KeyMapping keyBinding = controls.get(i);
keys[i] = keyBinding.getTranslatedKeyMessage()
.getString();
}
List<Component> list = new ArrayList<>();
list.add(Lang.translateDirect("linked_controller.bind_mode")
.withStyle(ChatFormatting.GOLD));
list.addAll(TooltipHelper.cutTextComponent(Lang.translateDirect("linked_controller.press_keybind", keys),
TooltipHelper.Palette.ALL_GRAY));
int width = 0;
int height = list.size() * mc.font.lineHeight;
for (Component iTextComponent : list)
width = Math.max(width, mc.font.width(iTextComponent));
int x = (width1 / 3) - width / 2;
int y = height1 - height - 24;
graphics.renderComponentTooltip(Minecraft.getInstance().font, list, x, y);
poseStack.popPose();
}
public enum Mode {
IDLE, ACTIVE, BIND
}
}

View File

@@ -0,0 +1,4 @@
package com.drmangotea.tfmg.content.engines.engine_controller;
public class EngineControllerClientRenderer {
}

View File

@@ -0,0 +1,4 @@
package com.drmangotea.tfmg.content.engines.engine_controller;
public class EngineControllerRenderer {
}

View File

@@ -0,0 +1,59 @@
package com.drmangotea.tfmg.content.engines.engine_controller.packets;
import com.drmangotea.tfmg.content.engines.engine_controller.EngineControllerBlockEntity;
import com.simibubi.create.content.redstone.link.LinkBehaviour;
import com.simibubi.create.content.redstone.link.controller.LecternControllerBlockEntity;
import com.simibubi.create.content.redstone.link.controller.LinkedControllerItem;
import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour;
import net.minecraft.core.BlockPos;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.item.ItemStack;
import net.minecraftforge.items.ItemStackHandler;
public class EngineControllerBindPacket extends EngineControllerPacketBase {
private int button;
private BlockPos linkLocation;
public EngineControllerBindPacket(int button, BlockPos linkLocation) {
super((BlockPos) null);
this.button = button;
this.linkLocation = linkLocation;
}
public EngineControllerBindPacket(FriendlyByteBuf buffer) {
super(buffer);
this.button = buffer.readVarInt();
this.linkLocation = buffer.readBlockPos();
}
@Override
public void write(FriendlyByteBuf buffer) {
super.write(buffer);
buffer.writeVarInt(button);
buffer.writeBlockPos(linkLocation);
}
@Override
protected void handleItem(ServerPlayer player, ItemStack heldItem) {
if (player.isSpectator())
return;
ItemStackHandler frequencyItems = LinkedControllerItem.getFrequencyItems(heldItem);
LinkBehaviour linkBehaviour = BlockEntityBehaviour.get(player.level(), linkLocation, LinkBehaviour.TYPE);
if (linkBehaviour == null)
return;
linkBehaviour.getNetworkKey()
.forEachWithContext((f, first) -> frequencyItems.setStackInSlot(button * 2 + (first ? 0 : 1), f.getStack()
.copy()));
heldItem.getTag()
.put("Items", frequencyItems.serializeNBT());
}
@Override
protected void handleController(ServerPlayer player, EngineControllerBlockEntity lectern) {}
}

View File

@@ -0,0 +1,70 @@
package com.drmangotea.tfmg.content.engines.engine_controller.packets;
import com.drmangotea.tfmg.content.engines.engine_controller.EngineControllerBlockEntity;
import com.simibubi.create.content.redstone.link.controller.LecternControllerBlockEntity;
import com.simibubi.create.content.redstone.link.controller.LinkedControllerItem;
import com.simibubi.create.content.redstone.link.controller.LinkedControllerServerHandler;
import net.minecraft.core.BlockPos;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.Level;
import java.util.ArrayList;
import java.util.Collection;
import java.util.UUID;
import java.util.stream.Collectors;
public class EngineControllerInputPacket extends EngineControllerPacketBase {
private Collection<Integer> activatedButtons;
private boolean press;
public EngineControllerInputPacket(Collection<Integer> activatedButtons, boolean press) {
this(activatedButtons, press, null);
}
public EngineControllerInputPacket(Collection<Integer> activatedButtons, boolean press, BlockPos lecternPos) {
super(lecternPos);
this.activatedButtons = activatedButtons;
this.press = press;
}
public EngineControllerInputPacket(FriendlyByteBuf buffer) {
super(buffer);
activatedButtons = new ArrayList<>();
press = buffer.readBoolean();
int size = buffer.readVarInt();
for (int i = 0; i < size; i++)
activatedButtons.add(buffer.readVarInt());
}
@Override
public void write(FriendlyByteBuf buffer) {
super.write(buffer);
buffer.writeBoolean(press);
buffer.writeVarInt(activatedButtons.size());
activatedButtons.forEach(buffer::writeVarInt);
}
@Override
protected void handleController(ServerPlayer player, EngineControllerBlockEntity lectern) {
if (lectern.isUsedBy(player))
handleItem(player, lectern.getController());
}
@Override
protected void handleItem(ServerPlayer player, ItemStack heldItem) {
Level world = player.getCommandSenderWorld();
UUID uniqueID = player.getUUID();
BlockPos pos = player.blockPosition();
if (player.isSpectator() && press)
return;
LinkedControllerServerHandler.receivePressed(world, pos, uniqueID, activatedButtons.stream()
.map(i -> LinkedControllerItem.toFrequency(heldItem, i))
.collect(Collectors.toList()), press);
}
}

View File

@@ -0,0 +1,70 @@
package com.drmangotea.tfmg.content.engines.engine_controller.packets;
import com.drmangotea.tfmg.content.engines.engine_controller.EngineControllerBlockEntity;
import com.simibubi.create.AllItems;
import com.simibubi.create.content.redstone.link.controller.LecternControllerBlockEntity;
import com.simibubi.create.foundation.networking.SimplePacketBase;
import net.minecraft.core.BlockPos;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraftforge.network.NetworkEvent.Context;
public abstract class EngineControllerPacketBase extends SimplePacketBase {
private BlockPos lecternPos;
public EngineControllerPacketBase(BlockPos lecternPos) {
this.lecternPos = lecternPos;
}
public EngineControllerPacketBase(FriendlyByteBuf buffer) {
if (buffer.readBoolean()) {
lecternPos = new BlockPos(buffer.readInt(), buffer.readInt(), buffer.readInt());
}
}
protected boolean inLectern() {
return lecternPos != null;
}
@Override
public void write(FriendlyByteBuf buffer) {
buffer.writeBoolean(inLectern());
if (inLectern()) {
buffer.writeInt(lecternPos.getX());
buffer.writeInt(lecternPos.getY());
buffer.writeInt(lecternPos.getZ());
}
}
@Override
public boolean handle(Context context) {
context.enqueueWork(() -> {
ServerPlayer player = context.getSender();
if (player == null)
return;
if (inLectern()) {
BlockEntity be = player.level().getBlockEntity(lecternPos);
if (!(be instanceof EngineControllerBlockEntity))
return;
handleController(player, (EngineControllerBlockEntity) be);
} else {
ItemStack controller = player.getMainHandItem();
if (!AllItems.LINKED_CONTROLLER.isIn(controller)) {
controller = player.getOffhandItem();
if (!AllItems.LINKED_CONTROLLER.isIn(controller))
return;
}
handleItem(player, controller);
}
});
return true;
}
protected abstract void handleItem(ServerPlayer player, ItemStack heldItem);
protected abstract void handleController(ServerPlayer player, EngineControllerBlockEntity lectern);
}

View File

@@ -0,0 +1,29 @@
package com.drmangotea.tfmg.content.engines.engine_controller.packets;
import com.drmangotea.tfmg.TFMG;
import com.drmangotea.tfmg.content.engines.engine_controller.EngineControllerBlockEntity;
import net.minecraft.core.BlockPos;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.item.ItemStack;
public class EngineControllerStopControllerPacket extends EngineControllerPacketBase {
public EngineControllerStopControllerPacket(FriendlyByteBuf buffer) {
super(buffer);
}
public EngineControllerStopControllerPacket(BlockPos lecternPos) {
super(lecternPos);
}
@Override
protected void handleController(ServerPlayer player, EngineControllerBlockEntity lectern) {
TFMG.LOGGER.debug("Packet- Stop Using");
lectern.tryStopUsing(player);
}
@Override
protected void handleItem(ServerPlayer player, ItemStack heldItem) { }
}

View File

@@ -0,0 +1,53 @@
package com.drmangotea.tfmg.content.engines.engine_gearbox;
import com.drmangotea.tfmg.base.TFMGShapes;
import com.drmangotea.tfmg.registry.TFMGBlockEntities;
import com.simibubi.create.content.kinetics.base.HorizontalKineticBlock;
import com.simibubi.create.foundation.block.IBE;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.item.context.BlockPlaceContext;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.LevelReader;
import net.minecraft.world.level.block.HorizontalDirectionalBlock;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.VoxelShape;
public class EngineGearboxBlock extends HorizontalKineticBlock implements IBE<EngineGearboxBlockEntity> {
public EngineGearboxBlock(Properties p_54120_) {
super(p_54120_);
}
@Override
public boolean hasShaftTowards(LevelReader world, BlockPos pos, BlockState state, Direction face) {
return face == state.getValue(HORIZONTAL_FACING)||face.getAxis() ==state.getValue(HORIZONTAL_FACING).getClockWise().getAxis();
}
@Override
public VoxelShape getShape(BlockState state, BlockGetter blockGetter, BlockPos pos, CollisionContext context) {
return TFMGShapes.ENGINE_GEARBOX.get(state.getValue(HORIZONTAL_FACING).getOpposite());
}
@Override
public BlockState getStateForPlacement(BlockPlaceContext context) {
return this.defaultBlockState()
.setValue(HORIZONTAL_FACING, context.getHorizontalDirection());
}
@Override
public Direction.Axis getRotationAxis(BlockState state) {
return state.getValue(HORIZONTAL_FACING).getClockWise().getAxis();
}
@Override
public Class<EngineGearboxBlockEntity> getBlockEntityClass() {
return EngineGearboxBlockEntity.class;
}
@Override
public BlockEntityType<? extends EngineGearboxBlockEntity> getBlockEntityType() {
return TFMGBlockEntities.ENGINE_GEARBOX.get();
}
}

View File

@@ -0,0 +1,14 @@
package com.drmangotea.tfmg.content.engines.engine_gearbox;
import com.simibubi.create.content.kinetics.base.KineticBlockEntity;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
public class EngineGearboxBlockEntity extends KineticBlockEntity {
public EngineGearboxBlockEntity(BlockEntityType<?> typeIn, BlockPos pos, BlockState state) {
super(typeIn, pos, state);
}
}

View File

@@ -0,0 +1,11 @@
package com.drmangotea.tfmg.content.engines.engine_gearbox;
import com.jozufozu.flywheel.api.MaterialManager;
import com.simibubi.create.content.kinetics.base.ShaftInstance;
import com.simibubi.create.content.kinetics.gearbox.GearboxBlockEntity;
public class EngineGearboxInstance extends ShaftInstance<GearboxBlockEntity> {
public EngineGearboxInstance(MaterialManager materialManager, GearboxBlockEntity blockEntity) {
super(materialManager, blockEntity);
}
}

View File

@@ -0,0 +1,11 @@
package com.drmangotea.tfmg.content.engines.engine_gearbox;
import com.simibubi.create.content.kinetics.base.KineticBlockEntityRenderer;
import com.simibubi.create.content.kinetics.gearbox.GearboxBlockEntity;
import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
public class EngineGearboxRenderer extends KineticBlockEntityRenderer<EngineGearboxBlockEntity> {
public EngineGearboxRenderer(BlockEntityRendererProvider.Context context) {
super(context);
}
}

View File

@@ -54,6 +54,11 @@ import com.drmangotea.tfmg.content.electricity.utilities.transformer.Transformer
import com.drmangotea.tfmg.content.electricity.utilities.transformer.TransformerRenderer;
import com.drmangotea.tfmg.content.electricity.utilities.voltage_observer.VoltageObserverBlockEntity;
import com.drmangotea.tfmg.content.engines.base.EngineInstance;
import com.drmangotea.tfmg.content.engines.engine_controller.EngineControllerBlock;
import com.drmangotea.tfmg.content.engines.engine_controller.EngineControllerBlockEntity;
import com.drmangotea.tfmg.content.engines.engine_gearbox.EngineGearboxBlockEntity;
import com.drmangotea.tfmg.content.engines.engine_gearbox.EngineGearboxInstance;
import com.drmangotea.tfmg.content.engines.engine_gearbox.EngineGearboxRenderer;
import com.drmangotea.tfmg.content.engines.regular_engine.RegularEngineBlockEntity;
import com.drmangotea.tfmg.content.engines.regular_engine.RegularEngineRenderer;
import com.drmangotea.tfmg.content.machinery.metallurgy.blast_furnace.BlastFurnaceHatchBlockEntity;
@@ -275,7 +280,19 @@ public class TFMGBlockEntities {
.renderer(() -> TFMGSlidingDoorRenderer::new)
.validBlocks(TFMGBlocks.HEAVY_CASING_DOOR, TFMGBlocks.STEEL_CASING_DOOR, TFMGBlocks.HEAVY_PLATED_DOOR, TFMGBlocks.ALUMINUM_DOOR)
.register();
public static final BlockEntityEntry<EngineGearboxBlockEntity> ENGINE_GEARBOX = REGISTRATE
.blockEntity("engine_gearbox", EngineGearboxBlockEntity::new)
.instance(() -> ShaftInstance::new, false)
.validBlocks(TFMGBlocks.ENGINE_GEARBOX)
.renderer(() -> EngineGearboxRenderer::new)
.register();
public static final BlockEntityEntry<EngineControllerBlockEntity> ENGINE_CONTROLLER = REGISTRATE
.blockEntity("engine_controller", EngineControllerBlockEntity::new)
// .instance(() -> ShaftInstance::new, false)
.validBlocks(TFMGBlocks.ENGINE_CONTROLLER)
//.renderer(() -> EngineGearboxRenderer::new)
.register();
public static final BlockEntityEntry<IndustrialMixerBlockEntity> INDUSTRIAL_MIXER = REGISTRATE
.blockEntity("industrial_mixer", IndustrialMixerBlockEntity::new)
.instance(() -> IndustrialMixerInstance::new, true)
@@ -316,6 +333,8 @@ public class TFMGBlockEntities {
.validBlocks(TFMGBlocks.BLAST_STOVE)
.register();
public static final BlockEntityEntry<CreativeGeneratorBlockEntity> CREATIVE_GENERATOR = REGISTRATE
.blockEntity("creative_generator", CreativeGeneratorBlockEntity::new)
.validBlocks(TFMGBlocks.CREATIVE_GENERATOR)

View File

@@ -64,6 +64,8 @@ import com.drmangotea.tfmg.content.electricity.utilities.voltage_observer.Voltag
import com.drmangotea.tfmg.content.electricity.utilities.voltage_observer.VoltageObserverGenerator;
import com.drmangotea.tfmg.content.engines.base.EngineCTBehavior;
import com.drmangotea.tfmg.content.engines.base.EngineGenerator;
import com.drmangotea.tfmg.content.engines.engine_controller.EngineControllerBlock;
import com.drmangotea.tfmg.content.engines.engine_gearbox.EngineGearboxBlock;
import com.drmangotea.tfmg.content.engines.regular_engine.RegularEngineBlock;
import com.drmangotea.tfmg.content.items.CoalCokeBlockItem;
import com.drmangotea.tfmg.content.items.weapons.explosives.napalm.NapalmBombBlock;
@@ -169,6 +171,23 @@ public class TFMGBlocks {
.item()
.transform(customItemModel())
.register();
public static final BlockEntry<EngineGearboxBlock> ENGINE_GEARBOX = REGISTRATE.block("engine_gearbox", EngineGearboxBlock::new)
.initialProperties(() -> Blocks.IRON_BLOCK)
.properties(p -> p.sound(SoundType.NETHERITE_BLOCK))
.properties(BlockBehaviour.Properties::noOcclusion)
.blockstate(BlockStateGen.horizontalBlockProvider(true))
.item()
.transform(customItemModel())
.register();
public static final BlockEntry<EngineControllerBlock> ENGINE_CONTROLLER = REGISTRATE.block("engine_controller", EngineControllerBlock::new)
.initialProperties(() -> Blocks.IRON_BLOCK)
.properties(p -> p.sound(SoundType.NETHERITE_BLOCK))
.properties(BlockBehaviour.Properties::noOcclusion)
.blockstate(BlockStateGen.horizontalBlockProvider(true))
.item()
.transform(customItemModel())
.register();
//------------------TANKS------------------//
public static final BlockEntry<AluminumTankBlock> ALUMINUM_FLUID_TANK =
REGISTRATE.block("aluminum_fluid_tank", AluminumTankBlock::regular)

View File

@@ -9,6 +9,9 @@ import com.drmangotea.tfmg.content.electricity.base.UpdateInFrontPacket;
import com.drmangotea.tfmg.content.electricity.connection.cables.CablePlacePacket;
import com.drmangotea.tfmg.content.electricity.connection.cables.CableRemovalPacket;
import com.drmangotea.tfmg.content.electricity.electrians_wrench.ElectriciansWrenchPacket;
import com.drmangotea.tfmg.content.engines.engine_controller.packets.EngineControllerBindPacket;
import com.drmangotea.tfmg.content.engines.engine_controller.packets.EngineControllerInputPacket;
import com.drmangotea.tfmg.content.engines.engine_controller.packets.EngineControllerStopControllerPacket;
import com.drmangotea.tfmg.content.items.weapons.advanced_potato_cannon.AdvancedPotatoCannonPacket;
import com.drmangotea.tfmg.content.items.weapons.quad_potato_cannon.QuadPotatoCannonPacket;
import com.drmangotea.tfmg.content.machinery.metallurgy.coke_oven.CokeOvenPacket;
@@ -44,6 +47,10 @@ public enum TFMGPackets {
CABLE_PACKET(CableRemovalPacket.class, CableRemovalPacket::new, PLAY_TO_CLIENT),
CABLE_PLACE_PACKET(CablePlacePacket.class, CablePlacePacket::new, PLAY_TO_CLIENT),
ELECTRICIANS_WRENCH_PACKET(ElectriciansWrenchPacket.class, ElectriciansWrenchPacket::new, PLAY_TO_SERVER),
ENGINE_CONTROLLER_INPUT(EngineControllerInputPacket.class, EngineControllerInputPacket::new, PLAY_TO_SERVER),
ENGINE_CONTROLLER_BIND(EngineControllerBindPacket.class, EngineControllerBindPacket::new, PLAY_TO_SERVER),
ENGINE_CONTROLLER_USE_LECTERN(EngineControllerStopControllerPacket.class, EngineControllerStopControllerPacket::new,
PLAY_TO_SERVER);

View File

@@ -61,3 +61,4 @@ description='''${mod_description}'''
versionRange="${minecraft_version_range}"
ordering="NONE"
side="BOTH"

View File

@@ -0,0 +1,346 @@
{
"credit": "Made with Blockbench",
"parent": "block/block",
"texture_size": [32, 32],
"textures": {
"0": "tfmg:block/engine_controller",
"1": "tfmg:block/shaft",
"2": "tfmg:block/engines/engine_controller_parts",
"particle": "tfmg:block/engine_controller"
},
"elements": [
{
"from": [6, 9, 2],
"to": [10, 13, 10],
"rotation": {"angle": 22.5, "axis": "x", "origin": [7, 10, 6]},
"faces": {
"north": {"uv": [0, 0, 4, 4], "texture": "#1"},
"east": {"uv": [6, 0, 10, 8], "rotation": 90, "texture": "#1"},
"south": {"uv": [0, 0, 4, 4], "texture": "#1"},
"west": {"uv": [6, 0, 10, 8], "rotation": 90, "texture": "#1"},
"up": {"uv": [6, 0, 10, 8], "texture": "#1"},
"down": {"uv": [6, 0, 10, 8], "texture": "#1"}
}
},
{
"from": [5, 8, 1],
"to": [11, 14, 3],
"rotation": {"angle": 22.5, "axis": "x", "origin": [3, 10, 6]},
"faces": {
"north": {"uv": [3, 0, 9, 6], "texture": "#2"},
"east": {"uv": [3, 7, 9, 9], "rotation": 90, "texture": "#2"},
"south": {"uv": [3, 0, 9, 6], "texture": "#2"},
"west": {"uv": [3, 9, 9, 7], "rotation": 90, "texture": "#2"},
"up": {"uv": [3, 7, 9, 9], "texture": "#2"},
"down": {"uv": [3, 7, 9, 9], "texture": "#2"}
}
},
{
"from": [11, 8, 1],
"to": [15, 10, 3],
"rotation": {"angle": 22.5, "axis": "x", "origin": [8, 10, 6]},
"faces": {
"north": {"uv": [13, 4, 9, 6], "texture": "#2"},
"east": {"uv": [0, 10, 2, 12], "texture": "#2"},
"south": {"uv": [9, 4, 13, 6], "texture": "#2"},
"up": {"uv": [0, 11, 2, 15], "rotation": 90, "texture": "#2"},
"down": {"uv": [0, 11, 2, 15], "rotation": 90, "texture": "#2"}
}
},
{
"from": [1, 10, 1],
"to": [3, 14, 3],
"rotation": {"angle": 22.5, "axis": "x", "origin": [-2, 10, 6]},
"faces": {
"north": {"uv": [11, 0, 13, 4], "texture": "#2"},
"east": {"uv": [11, 0, 13, 4], "texture": "#2"},
"south": {"uv": [11, 0, 13, 4], "texture": "#2"},
"west": {"uv": [0, 12, 2, 16], "texture": "#2"},
"up": {"uv": [0, 8, 2, 10], "texture": "#2"}
}
},
{
"from": [13, 10, 1],
"to": [15, 14, 3],
"rotation": {"angle": 22.5, "axis": "x", "origin": [7, 10, 6]},
"faces": {
"north": {"uv": [11, 0, 13, 4], "texture": "#2"},
"east": {"uv": [0, 10, 2, 14], "texture": "#2"},
"south": {"uv": [0, 10, 2, 14], "texture": "#2"},
"west": {"uv": [11, 0, 13, 4], "texture": "#2"},
"up": {"uv": [0, 8, 2, 10], "texture": "#2"}
}
},
{
"from": [1, 8, 1],
"to": [5, 10, 3],
"rotation": {"angle": 22.5, "axis": "x", "origin": [-3, 10, 6]},
"faces": {
"north": {"uv": [9, 4, 13, 6], "texture": "#2"},
"south": {"uv": [13, 4, 9, 6], "texture": "#2"},
"west": {"uv": [0, 12, 2, 14], "texture": "#2"},
"up": {"uv": [0, 12, 2, 16], "rotation": 90, "texture": "#2"},
"down": {"uv": [0, 15, 2, 11], "rotation": 90, "texture": "#2"}
}
},
{
"from": [4, 0, 5],
"to": [15, 5, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [5, 0, 4]},
"faces": {
"north": {"uv": [0, 5, 5.5, 7.5], "texture": "#0"},
"east": {"uv": [0, 5, 5.5, 7.5], "texture": "#0"},
"south": {"uv": [7, 0, 12.5, 2.5], "texture": "#0"},
"up": {"uv": [14, 10.5, 8.5, 16], "texture": "#0"},
"down": {"uv": [14, 10.5, 8.5, 16], "texture": "#0"}
}
},
{
"from": [0, 0, 0],
"to": [4, 5, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [-3, 0, 4]},
"faces": {
"north": {"uv": [13.5, 0, 15.5, 2.5], "texture": "#0"},
"east": {"uv": [6, 8, 14, 10.5], "texture": "#0"},
"south": {"uv": [5, 0, 7, 2.5], "texture": "#0"},
"west": {"uv": [6, 8, 14, 10.5], "texture": "#0"},
"up": {"uv": [16, 8, 14, 16], "texture": "#0"},
"down": {"uv": [16, 16, 14, 8], "texture": "#0"}
}
},
{
"from": [2, 5, 5],
"to": [14, 12, 14],
"rotation": {"angle": 0, "axis": "y", "origin": [5, 5, 4]},
"faces": {
"north": {"uv": [0, 12, 6, 15.5], "texture": "#0"},
"east": {"uv": [11.5, 4.5, 16, 8], "texture": "#0"},
"south": {"uv": [0, 12, 6, 15.5], "texture": "#0"},
"west": {"uv": [11.5, 4.5, 16, 8], "texture": "#0"},
"up": {"uv": [0, 7.5, 6, 12], "texture": "#0"}
}
},
{
"from": [3, 14, 9],
"to": [13, 19, 13],
"rotation": {"angle": 22.5, "axis": "x", "origin": [5, 12, 3]},
"faces": {
"north": {"uv": [0, 0, 5, 3.5], "texture": "#0"},
"east": {"uv": [5, 2.5, 7, 5], "texture": "#0"},
"south": {"uv": [0, 2.5, 5, 5], "texture": "#0"},
"west": {"uv": [5.5, 2.5, 7.5, 5], "texture": "#0"},
"up": {"uv": [0, 3, 5, 5], "texture": "#0"},
"down": {"uv": [0, 0, 10, 4], "texture": "#missing"}
}
},
{
"from": [3, 14, 8],
"to": [4, 19, 9],
"rotation": {"angle": 22.5, "axis": "x", "origin": [5, 12, 3]},
"faces": {
"north": {"uv": [0, 0, 0.5, 2.5], "texture": "#0"},
"east": {"uv": [4.5, 0, 5, 2.5], "texture": "#0"},
"south": {"uv": [0, 0, 1, 7], "texture": "#0"},
"west": {"uv": [5, 2.5, 5.5, 5], "texture": "#0"},
"up": {"uv": [0, 2.5, 0.5, 3], "texture": "#0"},
"down": {"uv": [0, 0, 1, 1], "texture": "#0"}
}
},
{
"from": [12, 14, 8],
"to": [13, 19, 9],
"rotation": {"angle": 22.5, "axis": "x", "origin": [14, 12, 3]},
"faces": {
"north": {"uv": [0, 0, 0.5, 2.5], "texture": "#0"},
"east": {"uv": [7, 2.5, 7.5, 5], "texture": "#0"},
"south": {"uv": [0, 0, 1, 7], "texture": "#0"},
"west": {"uv": [0, 0, 0.5, 2.5], "texture": "#0"},
"up": {"uv": [4.5, 2.5, 5, 3], "texture": "#0"},
"down": {"uv": [0, 0, 1, 1], "texture": "#0"}
}
},
{
"from": [4, 18, 8],
"to": [12, 19, 9],
"rotation": {"angle": 22.5, "axis": "x", "origin": [13, 12, 3]},
"faces": {
"north": {"uv": [0.5, 0, 4.5, 0.5], "texture": "#0"},
"east": {"uv": [0, 0, 1, 1], "texture": "#0"},
"south": {"uv": [0, 0, 8, 1], "texture": "#0"},
"west": {"uv": [0, 0, 1, 1], "texture": "#0"},
"up": {"uv": [0.5, 2.5, 4.5, 3], "texture": "#0"},
"down": {"uv": [0.5, 0, 4.5, 0.5], "texture": "#0"}
}
},
{
"from": [7, 15, 8],
"to": [9, 18, 9],
"rotation": {"angle": 22.5, "axis": "x", "origin": [13, 12, 3]},
"faces": {
"north": {"uv": [2, 0.5, 3, 2], "texture": "#0"},
"east": {"uv": [2, 0.5, 2.5, 2], "texture": "#0"},
"south": {"uv": [0, 0, 2, 3], "texture": "#missing"},
"west": {"uv": [2.5, 0.5, 3, 2], "texture": "#0"},
"up": {"uv": [0, 0, 2, 1], "texture": "#missing"},
"down": {"uv": [0, 0, 2, 1], "texture": "#missing"}
}
},
{
"from": [4, 14, 8],
"to": [12, 15, 9],
"rotation": {"angle": 22.5, "axis": "x", "origin": [13, 12, 3]},
"faces": {
"north": {"uv": [0.5, 2, 4.5, 2.5], "texture": "#0"},
"east": {"uv": [0, 0, 1, 1], "texture": "#missing"},
"south": {"uv": [0, 0, 8, 1], "texture": "#missing"},
"west": {"uv": [0, 0, 1, 1], "texture": "#missing"},
"up": {"uv": [0.5, 2, 4.5, 2.5], "texture": "#0"},
"down": {"uv": [0, 0, 8, 1], "texture": "#missing"}
}
},
{
"from": [5.5, 0, 3],
"to": [7.5, 4, 3],
"rotation": {"angle": 22.5, "axis": "x", "origin": [5, 1, 5]},
"faces": {
"north": {"uv": [10, 9, 12, 13], "texture": "#2"},
"east": {"uv": [0, 0, 0, 4], "texture": "#2"},
"south": {"uv": [0, 0, 2, 4], "texture": "#2"},
"west": {"uv": [0, 0, 0, 4], "texture": "#2"},
"up": {"uv": [0, 0, 2, 0], "texture": "#2"},
"down": {"uv": [0, 0, 2, 0], "texture": "#2"}
}
},
{
"from": [8, 0, 3],
"to": [10, 4, 3],
"rotation": {"angle": 22.5, "axis": "x", "origin": [5, 1, 5]},
"faces": {
"north": {"uv": [10, 9, 12, 13], "texture": "#2"},
"east": {"uv": [0, 0, 0, 4], "texture": "#2"},
"south": {"uv": [0, 0, 2, 4], "texture": "#2"},
"west": {"uv": [0, 0, 0, 4], "texture": "#2"},
"up": {"uv": [0, 0, 2, 0], "texture": "#2"},
"down": {"uv": [0, 0, 2, 0], "texture": "#2"}
}
},
{
"from": [10.5, 0, 3],
"to": [12.5, 4, 3],
"rotation": {"angle": 22.5, "axis": "x", "origin": [5, 1, 5]},
"faces": {
"north": {"uv": [10, 9, 12, 13], "texture": "#2"},
"east": {"uv": [0, 0, 0, 4], "texture": "#2"},
"south": {"uv": [0, 0, 2, 4], "texture": "#2"},
"west": {"uv": [0, 0, 0, 4], "texture": "#2"},
"up": {"uv": [0, 0, 2, 0], "texture": "#2"},
"down": {"uv": [0, 0, 2, 0], "texture": "#2"}
}
},
{
"from": [6.5, 1, 3],
"to": [6.5, 3, 7],
"rotation": {"angle": 22.5, "axis": "x", "origin": [5, 1, 5]},
"faces": {
"north": {"uv": [0, 0, 0, 2], "texture": "#2"},
"east": {"uv": [5, 10, 9, 12], "texture": "#2"},
"south": {"uv": [0, 0, 0, 2], "texture": "#2"},
"west": {"uv": [5, 10, 9, 12], "texture": "#2"},
"up": {"uv": [0, 0, 0, 4], "texture": "#2"},
"down": {"uv": [0, 0, 0, 4], "texture": "#2"}
}
},
{
"from": [9, 1, 3],
"to": [9, 3, 7],
"rotation": {"angle": 22.5, "axis": "x", "origin": [5, 1, 5]},
"faces": {
"north": {"uv": [0, 0, 0, 2], "texture": "#2"},
"east": {"uv": [5, 10, 9, 12], "texture": "#2"},
"south": {"uv": [0, 0, 0, 2], "texture": "#2"},
"west": {"uv": [5, 10, 9, 12], "texture": "#2"},
"up": {"uv": [0, 0, 0, 4], "texture": "#2"},
"down": {"uv": [0, 0, 0, 4], "texture": "#2"}
}
},
{
"from": [11.5, 1, 3],
"to": [11.5, 3, 7],
"rotation": {"angle": 22.5, "axis": "x", "origin": [5, 1, 5]},
"faces": {
"north": {"uv": [0, 0, 0, 2], "texture": "#2"},
"east": {"uv": [5, 10, 9, 12], "texture": "#2"},
"south": {"uv": [0, 0, 0, 2], "texture": "#2"},
"west": {"uv": [5, 10, 9, 12], "texture": "#2"},
"up": {"uv": [0, 0, 0, 4], "texture": "#2"},
"down": {"uv": [0, 0, 0, 4], "texture": "#2"}
}
},
{
"from": [-2, 2, 1],
"to": [0, 4, 3],
"rotation": {"angle": -22.5, "axis": "x", "origin": [-1, 3, 2]},
"faces": {
"north": {"uv": [10, 11, 12, 13], "texture": "#2"},
"east": {"uv": [0, 0, 0, 0], "texture": "#2"},
"south": {"uv": [10, 11, 12, 13], "texture": "#2"},
"west": {"uv": [10, 11, 12, 13], "texture": "#2"},
"up": {"uv": [10, 11, 12, 13], "texture": "#2"},
"down": {"uv": [10, 11, 12, 13], "texture": "#2"}
}
},
{
"from": [-2, 4, 1],
"to": [-2, 10, 3],
"rotation": {"angle": -22.5, "axis": "x", "origin": [-1, 3, 2]},
"faces": {
"north": {"uv": [0, 0, 0, 6], "texture": "#missing"},
"east": {"uv": [2, 12, 8, 10], "rotation": 90, "texture": "#2"},
"south": {"uv": [0, 0, 0, 6], "texture": "#missing"},
"west": {"uv": [2, 10, 8, 12], "rotation": 90, "texture": "#2"},
"up": {"uv": [0, 0, 0, 2], "texture": "#missing"},
"down": {"uv": [0, 0, 0, 2], "texture": "#missing"}
}
},
{
"from": [-3, 10, 1],
"to": [-1, 12, 3],
"rotation": {"angle": -22.5, "axis": "x", "origin": [-1, 3, 2]},
"faces": {
"north": {"uv": [4, 13, 6, 15], "texture": "#2"},
"east": {"uv": [4, 13, 6, 15], "texture": "#2"},
"south": {"uv": [4, 13, 6, 15], "texture": "#2"},
"west": {"uv": [4, 13, 6, 15], "texture": "#2"},
"up": {"uv": [4, 13, 6, 15], "texture": "#2"},
"down": {"uv": [4, 13, 6, 15], "texture": "#2"}
}
}
],
"display": {},
"groups": [
{
"name": "steering_wheel",
"origin": [-3, 10, 4],
"color": 0,
"children": [0, 1, 2, 3, 4, 5]
},
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23
]
}

View File

@@ -0,0 +1,346 @@
{
"credit": "Made with Blockbench",
"parent": "block/block",
"texture_size": [32, 32],
"textures": {
"0": "tfmg:block/engine_controller",
"1": "tfmg:block/shaft",
"2": "tfmg:block/engines/engine_controller_parts",
"particle": "tfmg:block/engine_controller"
},
"elements": [
{
"from": [6, 9, 2],
"to": [10, 13, 10],
"rotation": {"angle": 22.5, "axis": "x", "origin": [7, 10, 6]},
"faces": {
"north": {"uv": [0, 0, 4, 4], "texture": "#1"},
"east": {"uv": [6, 0, 10, 8], "rotation": 90, "texture": "#1"},
"south": {"uv": [0, 0, 4, 4], "texture": "#1"},
"west": {"uv": [6, 0, 10, 8], "rotation": 90, "texture": "#1"},
"up": {"uv": [6, 0, 10, 8], "texture": "#1"},
"down": {"uv": [6, 0, 10, 8], "texture": "#1"}
}
},
{
"from": [5, 8, 1],
"to": [11, 14, 3],
"rotation": {"angle": 22.5, "axis": "x", "origin": [3, 10, 6]},
"faces": {
"north": {"uv": [3, 0, 9, 6], "texture": "#2"},
"east": {"uv": [3, 7, 9, 9], "rotation": 90, "texture": "#2"},
"south": {"uv": [3, 0, 9, 6], "texture": "#2"},
"west": {"uv": [3, 9, 9, 7], "rotation": 90, "texture": "#2"},
"up": {"uv": [3, 7, 9, 9], "texture": "#2"},
"down": {"uv": [3, 7, 9, 9], "texture": "#2"}
}
},
{
"from": [11, 8, 1],
"to": [15, 10, 3],
"rotation": {"angle": 22.5, "axis": "x", "origin": [8, 10, 6]},
"faces": {
"north": {"uv": [13, 4, 9, 6], "texture": "#2"},
"east": {"uv": [0, 10, 2, 12], "texture": "#2"},
"south": {"uv": [9, 4, 13, 6], "texture": "#2"},
"up": {"uv": [0, 11, 2, 15], "rotation": 90, "texture": "#2"},
"down": {"uv": [0, 11, 2, 15], "rotation": 90, "texture": "#2"}
}
},
{
"from": [1, 10, 1],
"to": [3, 14, 3],
"rotation": {"angle": 22.5, "axis": "x", "origin": [-2, 10, 6]},
"faces": {
"north": {"uv": [11, 0, 13, 4], "texture": "#2"},
"east": {"uv": [11, 0, 13, 4], "texture": "#2"},
"south": {"uv": [11, 0, 13, 4], "texture": "#2"},
"west": {"uv": [0, 12, 2, 16], "texture": "#2"},
"up": {"uv": [0, 8, 2, 10], "texture": "#2"}
}
},
{
"from": [13, 10, 1],
"to": [15, 14, 3],
"rotation": {"angle": 22.5, "axis": "x", "origin": [7, 10, 6]},
"faces": {
"north": {"uv": [11, 0, 13, 4], "texture": "#2"},
"east": {"uv": [0, 10, 2, 14], "texture": "#2"},
"south": {"uv": [0, 10, 2, 14], "texture": "#2"},
"west": {"uv": [11, 0, 13, 4], "texture": "#2"},
"up": {"uv": [0, 8, 2, 10], "texture": "#2"}
}
},
{
"from": [1, 8, 1],
"to": [5, 10, 3],
"rotation": {"angle": 22.5, "axis": "x", "origin": [-3, 10, 6]},
"faces": {
"north": {"uv": [9, 4, 13, 6], "texture": "#2"},
"south": {"uv": [13, 4, 9, 6], "texture": "#2"},
"west": {"uv": [0, 12, 2, 14], "texture": "#2"},
"up": {"uv": [0, 12, 2, 16], "rotation": 90, "texture": "#2"},
"down": {"uv": [0, 15, 2, 11], "rotation": 90, "texture": "#2"}
}
},
{
"from": [4, 0, 5],
"to": [15, 5, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [5, 0, 4]},
"faces": {
"north": {"uv": [0, 5, 5.5, 7.5], "texture": "#0"},
"east": {"uv": [0, 5, 5.5, 7.5], "texture": "#0"},
"south": {"uv": [7, 0, 12.5, 2.5], "texture": "#0"},
"up": {"uv": [14, 10.5, 8.5, 16], "texture": "#0"},
"down": {"uv": [14, 10.5, 8.5, 16], "texture": "#0"}
}
},
{
"from": [0, 0, 0],
"to": [4, 5, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [-3, 0, 4]},
"faces": {
"north": {"uv": [13.5, 0, 15.5, 2.5], "texture": "#0"},
"east": {"uv": [6, 8, 14, 10.5], "texture": "#0"},
"south": {"uv": [5, 0, 7, 2.5], "texture": "#0"},
"west": {"uv": [6, 8, 14, 10.5], "texture": "#0"},
"up": {"uv": [16, 8, 14, 16], "texture": "#0"},
"down": {"uv": [16, 16, 14, 8], "texture": "#0"}
}
},
{
"from": [2, 5, 5],
"to": [14, 12, 14],
"rotation": {"angle": 0, "axis": "y", "origin": [5, 5, 4]},
"faces": {
"north": {"uv": [0, 12, 6, 15.5], "texture": "#0"},
"east": {"uv": [11.5, 4.5, 16, 8], "texture": "#0"},
"south": {"uv": [0, 12, 6, 15.5], "texture": "#0"},
"west": {"uv": [11.5, 4.5, 16, 8], "texture": "#0"},
"up": {"uv": [0, 7.5, 6, 12], "texture": "#0"}
}
},
{
"from": [3, 14, 9],
"to": [13, 19, 13],
"rotation": {"angle": 22.5, "axis": "x", "origin": [5, 12, 3]},
"faces": {
"north": {"uv": [0, 0, 5, 3.5], "texture": "#0"},
"east": {"uv": [5, 2.5, 7, 5], "texture": "#0"},
"south": {"uv": [0, 2.5, 5, 5], "texture": "#0"},
"west": {"uv": [5.5, 2.5, 7.5, 5], "texture": "#0"},
"up": {"uv": [0, 3, 5, 5], "texture": "#0"},
"down": {"uv": [0, 0, 10, 4], "texture": "#missing"}
}
},
{
"from": [3, 14, 8],
"to": [4, 19, 9],
"rotation": {"angle": 22.5, "axis": "x", "origin": [5, 12, 3]},
"faces": {
"north": {"uv": [0, 0, 0.5, 2.5], "texture": "#0"},
"east": {"uv": [4.5, 0, 5, 2.5], "texture": "#0"},
"south": {"uv": [0, 0, 1, 7], "texture": "#0"},
"west": {"uv": [5, 2.5, 5.5, 5], "texture": "#0"},
"up": {"uv": [0, 2.5, 0.5, 3], "texture": "#0"},
"down": {"uv": [0, 0, 1, 1], "texture": "#0"}
}
},
{
"from": [12, 14, 8],
"to": [13, 19, 9],
"rotation": {"angle": 22.5, "axis": "x", "origin": [14, 12, 3]},
"faces": {
"north": {"uv": [0, 0, 0.5, 2.5], "texture": "#0"},
"east": {"uv": [7, 2.5, 7.5, 5], "texture": "#0"},
"south": {"uv": [0, 0, 1, 7], "texture": "#0"},
"west": {"uv": [0, 0, 0.5, 2.5], "texture": "#0"},
"up": {"uv": [4.5, 2.5, 5, 3], "texture": "#0"},
"down": {"uv": [0, 0, 1, 1], "texture": "#0"}
}
},
{
"from": [4, 18, 8],
"to": [12, 19, 9],
"rotation": {"angle": 22.5, "axis": "x", "origin": [13, 12, 3]},
"faces": {
"north": {"uv": [0.5, 0, 4.5, 0.5], "texture": "#0"},
"east": {"uv": [0, 0, 1, 1], "texture": "#0"},
"south": {"uv": [0, 0, 8, 1], "texture": "#0"},
"west": {"uv": [0, 0, 1, 1], "texture": "#0"},
"up": {"uv": [0.5, 2.5, 4.5, 3], "texture": "#0"},
"down": {"uv": [0.5, 0, 4.5, 0.5], "texture": "#0"}
}
},
{
"from": [7, 15, 8],
"to": [9, 18, 9],
"rotation": {"angle": 22.5, "axis": "x", "origin": [13, 12, 3]},
"faces": {
"north": {"uv": [2, 0.5, 3, 2], "texture": "#0"},
"east": {"uv": [2, 0.5, 2.5, 2], "texture": "#0"},
"south": {"uv": [0, 0, 2, 3], "texture": "#missing"},
"west": {"uv": [2.5, 0.5, 3, 2], "texture": "#0"},
"up": {"uv": [0, 0, 2, 1], "texture": "#missing"},
"down": {"uv": [0, 0, 2, 1], "texture": "#missing"}
}
},
{
"from": [4, 14, 8],
"to": [12, 15, 9],
"rotation": {"angle": 22.5, "axis": "x", "origin": [13, 12, 3]},
"faces": {
"north": {"uv": [0.5, 2, 4.5, 2.5], "texture": "#0"},
"east": {"uv": [0, 0, 1, 1], "texture": "#missing"},
"south": {"uv": [0, 0, 8, 1], "texture": "#missing"},
"west": {"uv": [0, 0, 1, 1], "texture": "#missing"},
"up": {"uv": [0.5, 2, 4.5, 2.5], "texture": "#0"},
"down": {"uv": [0, 0, 8, 1], "texture": "#missing"}
}
},
{
"from": [5.5, 0, 3],
"to": [7.5, 4, 3],
"rotation": {"angle": 22.5, "axis": "x", "origin": [5, 1, 5]},
"faces": {
"north": {"uv": [10, 9, 12, 13], "texture": "#2"},
"east": {"uv": [0, 0, 0, 4], "texture": "#2"},
"south": {"uv": [0, 0, 2, 4], "texture": "#2"},
"west": {"uv": [0, 0, 0, 4], "texture": "#2"},
"up": {"uv": [0, 0, 2, 0], "texture": "#2"},
"down": {"uv": [0, 0, 2, 0], "texture": "#2"}
}
},
{
"from": [8, 0, 3],
"to": [10, 4, 3],
"rotation": {"angle": 22.5, "axis": "x", "origin": [5, 1, 5]},
"faces": {
"north": {"uv": [10, 9, 12, 13], "texture": "#2"},
"east": {"uv": [0, 0, 0, 4], "texture": "#2"},
"south": {"uv": [0, 0, 2, 4], "texture": "#2"},
"west": {"uv": [0, 0, 0, 4], "texture": "#2"},
"up": {"uv": [0, 0, 2, 0], "texture": "#2"},
"down": {"uv": [0, 0, 2, 0], "texture": "#2"}
}
},
{
"from": [10.5, 0, 3],
"to": [12.5, 4, 3],
"rotation": {"angle": 22.5, "axis": "x", "origin": [5, 1, 5]},
"faces": {
"north": {"uv": [10, 9, 12, 13], "texture": "#2"},
"east": {"uv": [0, 0, 0, 4], "texture": "#2"},
"south": {"uv": [0, 0, 2, 4], "texture": "#2"},
"west": {"uv": [0, 0, 0, 4], "texture": "#2"},
"up": {"uv": [0, 0, 2, 0], "texture": "#2"},
"down": {"uv": [0, 0, 2, 0], "texture": "#2"}
}
},
{
"from": [6.5, 1, 3],
"to": [6.5, 3, 7],
"rotation": {"angle": 22.5, "axis": "x", "origin": [5, 1, 5]},
"faces": {
"north": {"uv": [0, 0, 0, 2], "texture": "#2"},
"east": {"uv": [5, 10, 9, 12], "texture": "#2"},
"south": {"uv": [0, 0, 0, 2], "texture": "#2"},
"west": {"uv": [5, 10, 9, 12], "texture": "#2"},
"up": {"uv": [0, 0, 0, 4], "texture": "#2"},
"down": {"uv": [0, 0, 0, 4], "texture": "#2"}
}
},
{
"from": [9, 1, 3],
"to": [9, 3, 7],
"rotation": {"angle": 22.5, "axis": "x", "origin": [5, 1, 5]},
"faces": {
"north": {"uv": [0, 0, 0, 2], "texture": "#2"},
"east": {"uv": [5, 10, 9, 12], "texture": "#2"},
"south": {"uv": [0, 0, 0, 2], "texture": "#2"},
"west": {"uv": [5, 10, 9, 12], "texture": "#2"},
"up": {"uv": [0, 0, 0, 4], "texture": "#2"},
"down": {"uv": [0, 0, 0, 4], "texture": "#2"}
}
},
{
"from": [11.5, 1, 3],
"to": [11.5, 3, 7],
"rotation": {"angle": 22.5, "axis": "x", "origin": [5, 1, 5]},
"faces": {
"north": {"uv": [0, 0, 0, 2], "texture": "#2"},
"east": {"uv": [5, 10, 9, 12], "texture": "#2"},
"south": {"uv": [0, 0, 0, 2], "texture": "#2"},
"west": {"uv": [5, 10, 9, 12], "texture": "#2"},
"up": {"uv": [0, 0, 0, 4], "texture": "#2"},
"down": {"uv": [0, 0, 0, 4], "texture": "#2"}
}
},
{
"from": [-2, 2, 1],
"to": [0, 4, 3],
"rotation": {"angle": -22.5, "axis": "x", "origin": [-1, 3, 2]},
"faces": {
"north": {"uv": [10, 11, 12, 13], "texture": "#2"},
"east": {"uv": [0, 0, 0, 0], "texture": "#2"},
"south": {"uv": [10, 11, 12, 13], "texture": "#2"},
"west": {"uv": [10, 11, 12, 13], "texture": "#2"},
"up": {"uv": [10, 11, 12, 13], "texture": "#2"},
"down": {"uv": [10, 11, 12, 13], "texture": "#2"}
}
},
{
"from": [-2, 4, 1],
"to": [-2, 10, 3],
"rotation": {"angle": -22.5, "axis": "x", "origin": [-1, 3, 2]},
"faces": {
"north": {"uv": [0, 0, 0, 6], "texture": "#missing"},
"east": {"uv": [2, 12, 8, 10], "rotation": 90, "texture": "#2"},
"south": {"uv": [0, 0, 0, 6], "texture": "#missing"},
"west": {"uv": [2, 10, 8, 12], "rotation": 90, "texture": "#2"},
"up": {"uv": [0, 0, 0, 2], "texture": "#missing"},
"down": {"uv": [0, 0, 0, 2], "texture": "#missing"}
}
},
{
"from": [-3, 10, 1],
"to": [-1, 12, 3],
"rotation": {"angle": -22.5, "axis": "x", "origin": [-1, 3, 2]},
"faces": {
"north": {"uv": [4, 13, 6, 15], "texture": "#2"},
"east": {"uv": [4, 13, 6, 15], "texture": "#2"},
"south": {"uv": [4, 13, 6, 15], "texture": "#2"},
"west": {"uv": [4, 13, 6, 15], "texture": "#2"},
"up": {"uv": [4, 13, 6, 15], "texture": "#2"},
"down": {"uv": [4, 13, 6, 15], "texture": "#2"}
}
}
],
"display": {},
"groups": [
{
"name": "steering_wheel",
"origin": [-3, 10, 4],
"color": 0,
"children": [0, 1, 2, 3, 4, 5]
},
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23
]
}

View File

@@ -0,0 +1,191 @@
{
"credit": "Made with Blockbench",
"parent": "block/block",
"textures": {
"1": "tfmg:block/engines/engine_bottom",
"2": "tfmg:block/engines/engine_front",
"3": "tfmg:block/engines/engine_side",
"4": "tfmg:block/engines/engine_top",
"6": "tfmg:block/shaft",
"7": "tfmg:block/engines/engine_gearbox",
"8": "tfmg:block/engines/engine_gearbox_front",
"particle": "tfmg:block/engines/engine_back"
},
"elements": [
{
"from": [3, 0, -1],
"to": [13, 12, 11],
"rotation": {"angle": 0, "axis": "y", "origin": [10, 0, -1]},
"faces": {
"north": {"uv": [3, 4, 13, 16], "texture": "#2"},
"east": {"uv": [12, 3, 0, 15], "texture": "#3"},
"south": {"uv": [3, 4, 13, 16], "texture": "#4"},
"west": {"uv": [0, 3, 12, 15], "texture": "#3"},
"up": {"uv": [3, 0, 13, 12], "texture": "#4"},
"down": {"uv": [3, 4, 13, 16], "texture": "#1"}
}
},
{
"from": [0, 5, 11],
"to": [3, 13, 13],
"rotation": {"angle": 0, "axis": "y", "origin": [0, 4, 13]},
"faces": {
"north": {"uv": [0, 8, 3, 16], "texture": "#4"},
"east": {"uv": [0, 0, 2, 8], "texture": "#4"},
"south": {"uv": [13, 5, 16, 13], "texture": "#4"},
"west": {"uv": [8, 6, 10, 14], "texture": "#7"},
"up": {"uv": [8, 5, 10, 8], "rotation": 90, "texture": "#7"},
"down": {"uv": [0, 0, 3, 2], "texture": "#4"}
}
},
{
"from": [3, 0, 11],
"to": [13, 11, 15],
"rotation": {"angle": 0, "axis": "y", "origin": [10, 0, 3]},
"faces": {
"east": {"uv": [5, 4, 16, 0], "rotation": 90, "texture": "#4"},
"south": {"uv": [3, 5, 13, 16], "texture": "#8"},
"west": {"uv": [5, 0, 16, 4], "rotation": 90, "texture": "#4"},
"up": {"uv": [3, 12, 13, 16], "texture": "#4"},
"down": {"uv": [3, 0, 13, 4], "texture": "#1"}
}
},
{
"from": [13, 0, -1],
"to": [16, 5, 15],
"rotation": {"angle": 0, "axis": "y", "origin": [13, 0, 5]},
"faces": {
"north": {"uv": [0, 11, 3, 16], "texture": "#2"},
"east": {"uv": [0, 11, 16, 16], "texture": "#3"},
"south": {"uv": [13, 11, 16, 16], "texture": "#2"},
"west": {"uv": [0, 0, 0, 0], "texture": "#2"},
"up": {"uv": [13, 0, 16, 16], "texture": "#4"},
"down": {"uv": [13, 0, 16, 16], "texture": "#2"}
}
},
{
"from": [0, 11, 5],
"to": [3, 13, 11],
"rotation": {"angle": 0, "axis": "y", "origin": [0, 4, 13]},
"faces": {
"east": {"uv": [5, 0, 11, 2], "texture": "#4"},
"west": {"uv": [2, 6, 8, 8], "texture": "#7"},
"up": {"uv": [2, 5, 8, 8], "rotation": 90, "texture": "#7"},
"down": {"uv": [13, 5, 16, 11], "texture": "#4"}
}
},
{
"from": [0, 5, -1],
"to": [3, 7, 5],
"rotation": {"angle": 0, "axis": "y", "origin": [0, 2, 5]},
"faces": {
"north": {"uv": [3, 9, 0, 11], "texture": "#2"},
"east": {"uv": [0, 0, 0, 0], "texture": "#2"},
"south": {"uv": [13, 11, 16, 13], "texture": "#2"},
"west": {"uv": [14, 14, 8, 16], "texture": "#7"},
"up": {"uv": [0, 0, 3, 6], "texture": "#4"},
"down": {"uv": [0, 0, 0, 0], "texture": "#2"}
}
},
{
"from": [0, 7, 3],
"to": [3, 13, 5],
"rotation": {"angle": 0, "axis": "y", "origin": [0, 4, 5]},
"faces": {
"north": {"uv": [13, 5, 16, 11], "texture": "#4"},
"east": {"uv": [0, 0, 2, 6], "texture": "#4"},
"south": {"uv": [13, 9, 16, 15], "texture": "#4"},
"west": {"uv": [0, 6, 2, 12], "texture": "#7"},
"up": {"uv": [0, 5, 2, 8], "rotation": 90, "texture": "#7"},
"down": {"uv": [0, 0, 3, 2], "texture": "#4"}
}
},
{
"from": [0, 0, -1],
"to": [3, 5, 15],
"rotation": {"angle": 0, "axis": "y", "origin": [0, 0, 5]},
"faces": {
"north": {"uv": [13, 11, 16, 16], "texture": "#2"},
"east": {"uv": [0, 0, 0, 0], "texture": "#2"},
"south": {"uv": [0, 9, 3, 14], "texture": "#4"},
"west": {"uv": [0, 11, 16, 16], "texture": "#3"},
"up": {"uv": [0, 0, 3, 16], "texture": "#4"},
"down": {"uv": [0, 0, 3, 16], "texture": "#2"}
}
},
{
"from": [13, 5, -1],
"to": [16, 7, 5],
"rotation": {"angle": 0, "axis": "y", "origin": [13, 2, 5]},
"faces": {
"north": {"uv": [0, 9, 3, 11], "texture": "#2"},
"east": {"uv": [8, 14, 14, 16], "texture": "#7"},
"south": {"uv": [13, 10, 16, 12], "texture": "#2"},
"west": {"uv": [0, 0, 0, 0], "texture": "#2"},
"up": {"uv": [0, 0, 3, 6], "texture": "#4"},
"down": {"uv": [0, 0, 0, 0], "texture": "#2"}
}
},
{
"from": [13, 7, 3],
"to": [16, 13, 5],
"rotation": {"angle": 0, "axis": "y", "origin": [13, 4, 5]},
"faces": {
"north": {"uv": [0, 5, 3, 11], "texture": "#4"},
"east": {"uv": [8, 6, 10, 12], "texture": "#7"},
"south": {"uv": [13, 9, 16, 15], "texture": "#4"},
"west": {"uv": [0, 0, 2, 6], "texture": "#4"},
"up": {"uv": [0, 5, 2, 8], "rotation": 90, "texture": "#7"},
"down": {"uv": [0, 0, 0, 0], "texture": "#4"}
}
},
{
"from": [13, 5, 11],
"to": [16, 13, 13],
"rotation": {"angle": 0, "axis": "y", "origin": [13, 4, 13]},
"faces": {
"north": {"uv": [0, 8, 3, 16], "texture": "#4"},
"east": {"uv": [0, 6, 2, 14], "texture": "#7"},
"south": {"uv": [0, 5, 3, 13], "texture": "#4"},
"west": {"uv": [0, 0, 2, 8], "texture": "#4"},
"up": {"uv": [8, 5, 10, 8], "rotation": 90, "texture": "#7"},
"down": {"uv": [0, 0, 0, 0], "texture": "#4"}
}
},
{
"from": [13, 11, 5],
"to": [16, 13, 11],
"rotation": {"angle": 0, "axis": "y", "origin": [13, 4, 13]},
"faces": {
"east": {"uv": [2, 6, 8, 8], "texture": "#7"},
"west": {"uv": [5, 0, 11, 2], "texture": "#4"},
"up": {"uv": [2, 5, 8, 8], "rotation": 90, "texture": "#7"},
"down": {"uv": [13, 5, 16, 11], "texture": "#4"}
}
},
{
"from": [1, 5, 5],
"to": [1, 11, 11],
"rotation": {"angle": 0, "axis": "y", "origin": [1, 6, 8]},
"faces": {
"north": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#6"},
"south": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#6"},
"west": {"uv": [2, 8, 8, 14], "texture": "#7"},
"up": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#6"},
"down": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#6"}
}
},
{
"from": [15, 5, 5],
"to": [15, 11, 11],
"rotation": {"angle": 0, "axis": "y", "origin": [15, 6, 8]},
"faces": {
"north": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#6"},
"east": {"uv": [2, 8, 8, 14], "texture": "#7"},
"south": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#6"},
"up": {"uv": [6, 0, 10, 16], "rotation": 270, "texture": "#6"},
"down": {"uv": [6, 0, 10, 16], "rotation": 270, "texture": "#6"}
}
}
]
}

View File

@@ -0,0 +1,205 @@
{
"credit": "Made with Blockbench",
"parent": "block/block",
"textures": {
"1": "tfmg:block/engines/engine_bottom",
"2": "tfmg:block/engines/engine_front",
"3": "tfmg:block/engines/engine_side",
"4": "tfmg:block/engines/engine_top",
"5": "tfmg:block/shaft_top",
"6": "tfmg:block/shaft",
"7": "tfmg:block/engines/engine_gearbox",
"8": "tfmg:block/engines/engine_gearbox_front",
"particle": "tfmg:block/engines/engine_back"
},
"elements": [
{
"from": [3, 0, -1],
"to": [13, 12, 11],
"rotation": {"angle": 0, "axis": "y", "origin": [10, 0, -1]},
"faces": {
"north": {"uv": [3, 4, 13, 16], "texture": "#2"},
"east": {"uv": [12, 3, 0, 15], "texture": "#3"},
"south": {"uv": [3, 4, 13, 16], "texture": "#4"},
"west": {"uv": [0, 3, 12, 15], "texture": "#3"},
"up": {"uv": [3, 0, 13, 12], "texture": "#4"},
"down": {"uv": [3, 4, 13, 16], "texture": "#1"}
}
},
{
"from": [0, 5, 11],
"to": [3, 13, 13],
"rotation": {"angle": 0, "axis": "y", "origin": [0, 4, 13]},
"faces": {
"north": {"uv": [0, 8, 3, 16], "texture": "#4"},
"east": {"uv": [0, 0, 2, 8], "texture": "#4"},
"south": {"uv": [13, 5, 16, 13], "texture": "#4"},
"west": {"uv": [8, 6, 10, 14], "texture": "#7"},
"up": {"uv": [8, 5, 10, 8], "rotation": 90, "texture": "#7"},
"down": {"uv": [0, 0, 3, 2], "texture": "#4"}
}
},
{
"from": [3, 0, 11],
"to": [13, 11, 15],
"rotation": {"angle": 0, "axis": "y", "origin": [10, 0, 3]},
"faces": {
"east": {"uv": [5, 4, 16, 0], "rotation": 90, "texture": "#4"},
"south": {"uv": [3, 5, 13, 16], "texture": "#8"},
"west": {"uv": [5, 0, 16, 4], "rotation": 90, "texture": "#4"},
"up": {"uv": [3, 12, 13, 16], "texture": "#4"},
"down": {"uv": [3, 0, 13, 4], "texture": "#1"}
}
},
{
"from": [13, 0, -1],
"to": [16, 5, 15],
"rotation": {"angle": 0, "axis": "y", "origin": [13, 0, 5]},
"faces": {
"north": {"uv": [0, 11, 3, 16], "texture": "#2"},
"east": {"uv": [0, 11, 16, 16], "texture": "#3"},
"south": {"uv": [13, 11, 16, 16], "texture": "#2"},
"west": {"uv": [0, 0, 0, 0], "texture": "#2"},
"up": {"uv": [0, 0, 3, 16], "texture": "#2"},
"down": {"uv": [13, 0, 16, 16], "texture": "#2"}
}
},
{
"from": [0, 11, 5],
"to": [3, 13, 11],
"rotation": {"angle": 0, "axis": "y", "origin": [0, 4, 13]},
"faces": {
"east": {"uv": [0, 0, 6, 2], "texture": "#4"},
"west": {"uv": [2, 6, 8, 8], "texture": "#7"},
"up": {"uv": [2, 5, 8, 8], "rotation": 90, "texture": "#7"},
"down": {"uv": [13, 5, 16, 11], "texture": "#4"}
}
},
{
"from": [0, 5, -1],
"to": [3, 7, 5],
"rotation": {"angle": 0, "axis": "y", "origin": [0, 2, 5]},
"faces": {
"north": {"uv": [3, 9, 0, 11], "texture": "#2"},
"east": {"uv": [0, 0, 0, 0], "texture": "#2"},
"south": {"uv": [13, 11, 16, 13], "texture": "#2"},
"west": {"uv": [14, 14, 8, 16], "texture": "#7"},
"up": {"uv": [0, 0, 3, 6], "texture": "#4"},
"down": {"uv": [0, 0, 0, 0], "texture": "#2"}
}
},
{
"from": [0, 7, 3],
"to": [3, 13, 5],
"rotation": {"angle": 0, "axis": "y", "origin": [0, 4, 5]},
"faces": {
"north": {"uv": [13, 5, 16, 11], "texture": "#4"},
"east": {"uv": [0, 0, 2, 6], "texture": "#4"},
"south": {"uv": [13, 9, 16, 15], "texture": "#4"},
"west": {"uv": [0, 6, 2, 12], "texture": "#7"},
"up": {"uv": [0, 5, 2, 8], "rotation": 90, "texture": "#7"},
"down": {"uv": [0, 0, 3, 2], "texture": "#4"}
}
},
{
"from": [0, 0, -1],
"to": [3, 5, 15],
"rotation": {"angle": 0, "axis": "y", "origin": [0, 0, 5]},
"faces": {
"north": {"uv": [13, 11, 16, 16], "texture": "#2"},
"east": {"uv": [0, 0, 0, 0], "texture": "#2"},
"south": {"uv": [0, 9, 3, 14], "texture": "#4"},
"west": {"uv": [0, 11, 16, 16], "texture": "#3"},
"up": {"uv": [0, 0, 3, 16], "texture": "#2"},
"down": {"uv": [0, 0, 3, 16], "texture": "#2"}
}
},
{
"from": [13, 5, -1],
"to": [16, 7, 5],
"rotation": {"angle": 0, "axis": "y", "origin": [13, 2, 5]},
"faces": {
"north": {"uv": [0, 9, 3, 11], "texture": "#2"},
"east": {"uv": [8, 14, 14, 16], "texture": "#7"},
"south": {"uv": [13, 10, 16, 12], "texture": "#2"},
"west": {"uv": [0, 0, 0, 0], "texture": "#2"},
"up": {"uv": [0, 0, 3, 6], "texture": "#4"},
"down": {"uv": [0, 0, 0, 0], "texture": "#2"}
}
},
{
"from": [13, 7, 3],
"to": [16, 13, 5],
"rotation": {"angle": 0, "axis": "y", "origin": [13, 4, 5]},
"faces": {
"north": {"uv": [0, 5, 3, 11], "texture": "#4"},
"east": {"uv": [8, 6, 10, 12], "texture": "#7"},
"south": {"uv": [13, 9, 16, 15], "texture": "#4"},
"west": {"uv": [0, 0, 0, 0], "texture": "#4"},
"up": {"uv": [0, 5, 2, 8], "rotation": 90, "texture": "#7"},
"down": {"uv": [0, 0, 0, 0], "texture": "#4"}
}
},
{
"from": [13, 5, 11],
"to": [16, 13, 13],
"rotation": {"angle": 0, "axis": "y", "origin": [13, 4, 13]},
"faces": {
"north": {"uv": [0, 8, 3, 16], "texture": "#4"},
"east": {"uv": [0, 6, 2, 14], "texture": "#7"},
"south": {"uv": [0, 5, 3, 13], "texture": "#4"},
"west": {"uv": [0, 0, 0, 0], "texture": "#4"},
"up": {"uv": [8, 5, 10, 8], "rotation": 90, "texture": "#7"},
"down": {"uv": [0, 0, 0, 0], "texture": "#4"}
}
},
{
"from": [13, 11, 5],
"to": [16, 13, 11],
"rotation": {"angle": 0, "axis": "y", "origin": [13, 4, 13]},
"faces": {
"east": {"uv": [2, 6, 8, 8], "texture": "#7"},
"west": {"uv": [0, 0, 0, 0], "texture": "#4"},
"up": {"uv": [2, 5, 8, 8], "rotation": 90, "texture": "#7"},
"down": {"uv": [13, 5, 16, 11], "texture": "#4"}
}
},
{
"from": [0, 6, 6],
"to": [16, 10, 10],
"rotation": {"angle": 0, "axis": "y", "origin": [0, 6, 8]},
"faces": {
"north": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#6"},
"east": {"uv": [6, 6, 10, 10], "texture": "#5"},
"south": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#6"},
"west": {"uv": [6, 6, 10, 10], "texture": "#5"},
"up": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#6"},
"down": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#6"}
}
},
{
"from": [1, 5, 5],
"to": [1, 11, 11],
"rotation": {"angle": 0, "axis": "y", "origin": [1, 6, 8]},
"faces": {
"north": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#6"},
"south": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#6"},
"west": {"uv": [2, 8, 8, 14], "texture": "#7"},
"up": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#6"},
"down": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#6"}
}
},
{
"from": [15, 5, 5],
"to": [15, 11, 11],
"rotation": {"angle": 0, "axis": "y", "origin": [15, 6, 8]},
"faces": {
"north": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#6"},
"east": {"uv": [2, 8, 8, 14], "texture": "#7"},
"south": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#6"},
"up": {"uv": [6, 0, 10, 16], "rotation": 270, "texture": "#6"},
"down": {"uv": [6, 0, 10, 16], "rotation": 270, "texture": "#6"}
}
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 326 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 700 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 451 B

After

Width:  |  Height:  |  Size: 720 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 675 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 514 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 B

After

Width:  |  Height:  |  Size: 623 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 279 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 279 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 279 B