stuffffffffffffff

This commit is contained in:
DrMangoTea
2025-04-30 21:34:08 +02:00
parent b8e811ca18
commit 6151e4a087
963 changed files with 110830 additions and 26551 deletions

View File

@@ -25,8 +25,10 @@ import com.simibubi.create.foundation.data.*;
import com.tterrag.registrate.builders.BlockBuilder;
import com.tterrag.registrate.providers.DataGenContext;
import com.tterrag.registrate.providers.RegistrateBlockstateProvider;
import com.tterrag.registrate.providers.RegistrateRecipeProvider;
import com.tterrag.registrate.util.DataIngredient;
import com.tterrag.registrate.util.entry.BlockEntry;
import com.tterrag.registrate.util.nullness.NonNullBiConsumer;
import com.tterrag.registrate.util.nullness.NonNullFunction;
import com.tterrag.registrate.util.nullness.NonNullUnaryOperator;
import net.minecraft.client.renderer.RenderType;
@@ -34,6 +36,8 @@ import net.minecraft.core.Direction;
import net.minecraft.data.recipes.RecipeCategory;
import net.minecraft.tags.BlockTags;
import net.minecraft.tags.ItemTags;
import net.minecraft.world.item.Items;
import net.minecraft.world.item.crafting.Ingredient;
import net.minecraft.world.level.ItemLike;
import net.minecraft.world.level.block.*;
import net.minecraft.world.level.block.state.BlockBehaviour;
@@ -41,6 +45,7 @@ import net.minecraftforge.client.model.generators.ModelFile;
import net.minecraftforge.client.model.generators.MultiPartBlockStateBuilder;
import java.nio.channels.Pipe;
import java.util.*;
import java.util.function.Supplier;
import static com.drmangotea.tfmg.TFMG.REGISTRATE;
@@ -54,29 +59,29 @@ import static com.simibubi.create.foundation.data.TagGen.*;
@SuppressWarnings("removal")
public class TFMGBuilderTransformers {
public static <B extends TFMGSlidingDoorBlock, P> NonNullUnaryOperator<BlockBuilder<B, P>> slidingDoor(String type) {
return b -> b.initialProperties(() -> Blocks.IRON_DOOR)
.properties(p -> p.requiresCorrectToolForDrops()
.strength(3.0F, 6.0F))
.blockstate((c, p) -> {
ModelFile bottom = AssetLookup.partialBaseModel(c, p, "bottom");
ModelFile top = AssetLookup.partialBaseModel(c, p, "top");
p.doorBlock(c.get(), bottom, bottom, bottom, bottom, top, top, top, top);
})
.addLayer(() -> RenderType::cutoutMipped)
.transform(pickaxeOnly())
.onRegister(interactionBehaviour(new DoorMovingInteraction()))
.onRegister(movementBehaviour(new SlidingDoorMovementBehaviour()))
.tag(BlockTags.DOORS)
.tag(BlockTags.WOODEN_DOORS) // for villager AI
.tag(AllTags.AllBlockTags.NON_DOUBLE_DOOR.tag)
.loot((lr, block) -> lr.add(block, lr.createDoorTable(block)))
.item()
.tag(ItemTags.DOORS)
.tag(AllTags.AllItemTags.CONTRAPTION_CONTROLLED.tag)
.model((c, p) -> p.blockSprite(c, p.modLoc("item/" + type + "_door")))
.build();
}
public static <B extends TFMGSlidingDoorBlock, P> NonNullUnaryOperator<BlockBuilder<B, P>> slidingDoor(String type) {
return b -> b.initialProperties(() -> Blocks.IRON_DOOR)
.properties(p -> p.requiresCorrectToolForDrops()
.strength(3.0F, 6.0F))
.blockstate((c, p) -> {
ModelFile bottom = AssetLookup.partialBaseModel(c, p, "bottom");
ModelFile top = AssetLookup.partialBaseModel(c, p, "top");
p.doorBlock(c.get(), bottom, bottom, bottom, bottom, top, top, top, top);
})
.addLayer(() -> RenderType::cutoutMipped)
.transform(pickaxeOnly())
.onRegister(interactionBehaviour(new DoorMovingInteraction()))
.onRegister(movementBehaviour(new SlidingDoorMovementBehaviour()))
.tag(BlockTags.DOORS)
.tag(BlockTags.WOODEN_DOORS) // for villager AI
.tag(AllTags.AllBlockTags.NON_DOUBLE_DOOR.tag)
.loot((lr, block) -> lr.add(block, lr.createDoorTable(block)))
.item()
.tag(ItemTags.DOORS)
.tag(AllTags.AllItemTags.CONTRAPTION_CONTROLLED.tag)
.model((c, p) -> p.blockSprite(c, p.modLoc("item/" + type + "_door")))
.build();
}
public static void generateNeonTubeBlockState(DataGenContext<Block, NeonTubeBlock> c, RegistrateBlockstateProvider p) {
MultiPartBlockStateBuilder builder = p.getMultipartBuilder(c.get());
@@ -115,7 +120,6 @@ public class TFMGBuilderTransformers {
}
public static <B extends TFMGEncasedShaftBlock, P> NonNullUnaryOperator<BlockBuilder<B, P>> encasedShaft(String casing,
Supplier<CTSpriteShiftEntry> casingShift) {
return builder -> encasedBase(builder, AllBlocks.SHAFT::get)
@@ -184,6 +188,7 @@ public class TFMGBuilderTransformers {
.transform(TFMGStress.setNoImpact())
.loot((p, lb) -> p.dropOther(lb, drop.get()));
}
public static <B extends CopycatCableBlock, P> NonNullUnaryOperator<BlockBuilder<B, P>> copycatCable() {
return b -> b.initialProperties(SharedProperties::softMetal)
.blockstate((c, p) -> p.simpleBlock(c.get(), p.models()
@@ -198,7 +203,7 @@ public class TFMGBuilderTransformers {
.transform(TagGen.axeOrPickaxe());
}
///////////////
/// ////////////
public static BlockEntry<TFMGFlywheelBlock> flywheel(String name, NonNullFunction<BlockBehaviour.Properties, TFMGFlywheelBlock> block) {
return REGISTRATE.block(name + "_flywheel", block)
.initialProperties(SharedProperties::softMetal)
@@ -212,7 +217,7 @@ public class TFMGBuilderTransformers {
}
public static BlockEntry<TrussBlock> truss(String name) {
return REGISTRATE.block(name+"_truss", TrussBlock::new)
return REGISTRATE.block(name + "_truss", TrussBlock::new)
.initialProperties(() -> Blocks.IRON_BLOCK)
.properties(p -> p.noOcclusion())
.properties(p -> p.sound(SoundType.NETHERITE_BLOCK))
@@ -223,8 +228,9 @@ public class TFMGBuilderTransformers {
.build()
.register();
}
public static BlockEntry<FrameBlock> frame(String name) {
return REGISTRATE.block(name+"_frame", FrameBlock::new)
return REGISTRATE.block(name + "_frame", FrameBlock::new)
.initialProperties(() -> Blocks.IRON_BLOCK)
.properties(p -> p.sound(SoundType.NETHERITE_BLOCK))
.properties(p -> p.strength(3))
@@ -235,12 +241,17 @@ public class TFMGBuilderTransformers {
.simpleItem()
.register();
}
public static final String[] COLORS = {"white", "blue", "light_blue", "red", "green", "lime", "pink", "magenta", "yellow", "gray", "light_gray", "brown", "cyan", "purple", "orange"};
public static final String[] COLORS = {"white", "blue", "light_blue", "red", "green", "lime", "pink", "magenta", "yellow", "gray", "light_gray", "brown", "cyan", "purple", "orange","black"};
public static void generateCautionBlocks() {
for (String color : COLORS) {
if(Objects.equals(color, "black"))
continue;
String firstLetter = color.substring(0, 1).toUpperCase();
String colorWithoutC = color.substring(1);
@@ -269,24 +280,26 @@ public class TFMGBuilderTransformers {
.texture("particle", p.modLoc("block/caution_block/" + color))
))
.tag(BlockTags.NEEDS_STONE_TOOL)
.recipe((c, p) -> p.stonecutting(DataIngredient.tag(AllTags.forgeItemTag("ingots/aluminum")), RecipeCategory.BUILDING_BLOCKS, c::get, 2))
.item()
.build()
.lang(upperCaseColor + " Caution Block")
.register();
}
}
public static MaterialSet generateConcrete(boolean rebar) {
String name = rebar ? "rebar_concrete" : "concrete";
MaterialSet concrete = new MaterialSet();
generateColoredConcrete(rebar);
concrete.wall = REGISTRATE.block(name+"_wall", WallBlock::new)
concrete.wall = REGISTRATE.block(name + "_wall", WallBlock::new)
.initialProperties(() -> Blocks.STONE)
.properties(p -> p.requiresCorrectToolForDrops())
.properties(p ->p.strength(rebar ? 12f : 3.5f,rebar ? 1200f : 3.5f))
.properties(p -> p.strength(rebar ? 12f : 3.5f, rebar ? 1200f : 3.5f))
.transform(pickaxeOnly())
.blockstate((c, p) -> TFMGVanillaBlockStates.generateWallBlockState(c, p, "concrete"))
.tag(BlockTags.NEEDS_STONE_TOOL)
@@ -297,24 +310,24 @@ public class TFMGBuilderTransformers {
.build()
.register();
concrete.stairs = REGISTRATE.block(name+"_stairs", p -> new StairBlock(() -> concrete.block.get().defaultBlockState(), p))
concrete.stairs = REGISTRATE.block(name + "_stairs", p -> new StairBlock(() -> concrete.block.get().defaultBlockState(), p))
.initialProperties(() -> Blocks.STONE)
.properties(p -> p.requiresCorrectToolForDrops())
.properties(p ->p.strength(rebar ? 12f : 3.5f,rebar ? 1200f : 3.5f))
.properties(p -> p.strength(rebar ? 12f : 3.5f, rebar ? 1200f : 3.5f))
.transform(pickaxeOnly())
.blockstate((c, p) -> TFMGVanillaBlockStates.generateStairBlockState(c, p, "concrete"))
.tag(BlockTags.NEEDS_STONE_TOOL)
.tag(BlockTags.STAIRS)
.recipe((c, p) -> p.stonecutting(DataIngredient.items(concrete.block.get()),RecipeCategory.BUILDING_BLOCKS, c::get, 1))
.recipe((c, p) -> p.stonecutting(DataIngredient.items(concrete.block.get()), RecipeCategory.BUILDING_BLOCKS, c::get, 1))
.item()
//.transform(b -> TFMGVanillaBlockStates.transformStairItem(b, "concrete"))
.transform(customItemModel("concrete_stairs"))
.register();
concrete.block = REGISTRATE.block(name, Block::new)
concrete.block = REGISTRATE.block(name, Block::new)
.initialProperties(() -> Blocks.STONE)
.properties(p ->p.strength(rebar ? 12f : 3.5f,rebar ? 1200f : 3.5f))
.properties(p -> p.strength(rebar ? 12f : 3.5f, rebar ? 1200f : 3.5f))
.properties(p -> p.requiresCorrectToolForDrops())
.transform(pickaxeOnly())
.blockstate(simpleCubeAll("concrete"))
@@ -323,29 +336,35 @@ public class TFMGBuilderTransformers {
.build()
.register();
concrete.slab = REGISTRATE.block(name+"_slab", SlabBlock::new)
concrete.slab = REGISTRATE.block(name + "_slab", SlabBlock::new)
.initialProperties(() -> Blocks.STONE)
.properties(p ->p.strength(rebar ? 12f : 3.5f,rebar ? 1200f : 3.5f))
.properties(p -> p.strength(rebar ? 12f : 3.5f, rebar ? 1200f : 3.5f))
.properties(p -> p.requiresCorrectToolForDrops())
.transform(pickaxeOnly())
.blockstate((c, p) -> TFMGVanillaBlockStates.generateSlabBlockState(c, p, "concrete"))
.tag(BlockTags.NEEDS_STONE_TOOL)
.tag(BlockTags.SLABS)
.recipe((c, p) -> p.stonecutting(DataIngredient.items(concrete.block.get()),RecipeCategory.BUILDING_BLOCKS, c::get, 2))
.recipe((c, p) -> p.stonecutting(DataIngredient.items(concrete.block.get()), RecipeCategory.BUILDING_BLOCKS, c::get, 2))
.item()
.transform(customItemModel("concrete_bottom"))
.register();
return concrete;
}
public static void generateColoredConcrete(boolean rebar) {
public static Map<String ,MaterialSet> generateColoredConcrete(boolean rebar) {
String name = rebar ? "_rebar_concrete" : "_concrete";
Map<String ,MaterialSet> list = new HashMap<>();
for (String color : COLORS) {
REGISTRATE.block(color +name, Block::new)
MaterialSet set = new MaterialSet();
set.block=REGISTRATE.block(color + name, Block::new)
.initialProperties(() -> Blocks.STONE)
.properties(p ->p.strength(rebar ? 12f : 3.5f,rebar ? 1200f : 3.5f))
.properties(p -> p.strength(rebar ? 12f : 3.5f, rebar ? 1200f : 3.5f))
.properties(p -> p.requiresCorrectToolForDrops())
.transform(pickaxeOnly())
.blockstate(simpleCubeAll(color + "_concrete"))
@@ -355,86 +374,98 @@ public class TFMGBuilderTransformers {
.register();
REGISTRATE.block(color + name+"_wall", WallBlock::new)
set.wall=REGISTRATE.block(color + name + "_wall", WallBlock::new)
.initialProperties(() -> Blocks.STONE)
.properties(p ->p.strength(rebar ? 12f : 3.5f,rebar ? 1200f : 3.5f))
.properties(p -> p.strength(rebar ? 12f : 3.5f, rebar ? 1200f : 3.5f))
.properties(p -> p.requiresCorrectToolForDrops())
.transform(pickaxeOnly())
.blockstate((c, p) -> TFMGVanillaBlockStates.generateWallBlockState(c, p, color + "_concrete"))
.tag(BlockTags.NEEDS_STONE_TOOL)
.tag(BlockTags.WALLS)
.recipe((c, p) -> p.stonecutting(DataIngredient.items(set.block.asItem()), RecipeCategory.BUILDING_BLOCKS, c::get, 1))
.item()
.transform(b -> TFMGVanillaBlockStates.transformWallItem(b, color + "_concrete"))
.build()
.register();
REGISTRATE.block(color + name+"_stairs", p -> new StairBlock(() -> TFMGBlocks.CONCRETE.block.get().defaultBlockState(), p))
set.stairs=REGISTRATE.block(color + name + "_stairs", p -> new StairBlock(() -> TFMGBlocks.CONCRETE.block.get().defaultBlockState(), p))
.initialProperties(() -> Blocks.STONE)
.properties(p ->p.strength(rebar ? 12f : 3.5f,rebar ? 1200f : 3.5f))
.properties(p -> p.strength(rebar ? 12f : 3.5f, rebar ? 1200f : 3.5f))
.properties(p -> p.requiresCorrectToolForDrops())
.transform(pickaxeOnly())
.blockstate((c, p) -> TFMGVanillaBlockStates.generateStairBlockState(c, p, color + "_concrete"))
.tag(BlockTags.NEEDS_STONE_TOOL)
.tag(BlockTags.STAIRS)
.recipe((c, p) -> p.stonecutting(DataIngredient.items(set.block.asItem()), RecipeCategory.BUILDING_BLOCKS, c::get, 1))
.item()
// .transform(b -> TFMGVanillaBlockStates.transformStairItem(b, color + "_concrete"))
.transform(customItemModel(color+"_concrete_stairs"))
// .transform(b -> TFMGVanillaBlockStates.transformStairItem(b, color + "_concrete"))
.transform(customItemModel(color + "_concrete_stairs"))
.register();
REGISTRATE.block(color + name+"_slab", SlabBlock::new)
set.slab=REGISTRATE.block(color + name + "_slab", SlabBlock::new)
.initialProperties(() -> Blocks.STONE)
.properties(p ->p.strength(rebar ? 12f : 3.5f,rebar ? 1200f : 3.5f))
.properties(p -> p.strength(rebar ? 12f : 3.5f, rebar ? 1200f : 3.5f))
.properties(p -> p.requiresCorrectToolForDrops())
.transform(pickaxeOnly())
.blockstate((c, p) -> TFMGVanillaBlockStates.generateSlabBlockState(c, p, color + "_concrete"))
.tag(BlockTags.NEEDS_STONE_TOOL)
.tag(BlockTags.SLABS)
.recipe((c, p) -> p.stonecutting(DataIngredient.items(set.block.asItem()), RecipeCategory.BUILDING_BLOCKS, c::get, 2))
.item()
.transform(customItemModel(color + "_concrete_bottom"))
.register();
list.put(color,set);
}
return list;
}
public static MaterialSet makeVariants(BlockEntry<?> blockEntry){
public static MaterialSet makeVariants(BlockEntry<?> blockEntry) {
return makeVariants(blockEntry, false);
}
public static MaterialSet makeVariants(BlockEntry<?> blockEntry, boolean recipe) {
MaterialSet materialSet = new MaterialSet();
materialSet.block = blockEntry;
String name = blockEntry.getId().toString().replace("tfmg:","");
String name = blockEntry.getId().toString().replace("tfmg:", "");
REGISTRATE.block(name+"_wall", WallBlock::new)
REGISTRATE.block(name + "_wall", WallBlock::new)
.initialProperties(() -> blockEntry.get())
.transform(pickaxeOnly())
.blockstate((c, p) -> TFMGVanillaBlockStates.generateWallBlockState(c, p, name))
.tag(BlockTags.NEEDS_STONE_TOOL)
.tag(BlockTags.WALLS)
.recipe((c, p) -> p.stonecutting(DataIngredient.items(blockEntry.asItem()), RecipeCategory.BUILDING_BLOCKS, c::get, 1))
.item()
.transform(b -> TFMGVanillaBlockStates.transformWallItem(b, name))
.build()
.register();
REGISTRATE.block(name+"_slab", SlabBlock::new)
REGISTRATE.block(name + "_slab", SlabBlock::new)
.initialProperties(() -> blockEntry.get())
.properties(p -> p.requiresCorrectToolForDrops())
.transform(pickaxeOnly())
.blockstate((c, p) -> TFMGVanillaBlockStates.generateSlabBlockState(c, p, name))
.tag(BlockTags.NEEDS_STONE_TOOL)
.tag(BlockTags.SLABS)
.recipe((c, p) -> p.stonecutting(DataIngredient.items(blockEntry.asItem()), RecipeCategory.BUILDING_BLOCKS, c::get, 2))
.item()
.transform(customItemModel(name + "_bottom"))
.register();
REGISTRATE.block(name+"_stairs", p -> new StairBlock(() -> TFMGBlocks.CONCRETE.block.get().defaultBlockState(), p))
REGISTRATE.block(name + "_stairs", p -> new StairBlock(() -> TFMGBlocks.CONCRETE.block.get().defaultBlockState(), p))
.initialProperties(() -> Blocks.STONE)
.transform(pickaxeOnly())
.blockstate((c, p) -> TFMGVanillaBlockStates.generateStairBlockState(c, p, name))
.tag(BlockTags.NEEDS_STONE_TOOL)
.tag(BlockTags.STAIRS)
.recipe((c, p) -> p.stonecutting(DataIngredient.items(blockEntry.asItem()), RecipeCategory.BUILDING_BLOCKS, c::get, 1))
.item()
.transform(customItemModel(name+"_stairs"))
.transform(customItemModel(name + "_stairs"))
.register();
return materialSet;

View File

@@ -28,7 +28,7 @@ public class TFMGSpriteShifts {
public static final CTSpriteShiftEntry STEEL_VAT = getCT(AllCTTypes.RECTANGLE, "steel_vat"), STEEL_VAT_TOP = getCT(AllCTTypes.RECTANGLE, "steel_vat_top"), STEEL_VAT_INNER = getCT(AllCTTypes.RECTANGLE, "steel_vat_inner");
public static final CTSpriteShiftEntry CAST_IRON_VAT = getCT(AllCTTypes.RECTANGLE, "cast_iron_vat"), CAST_IRON_VAT_TOP = getCT(AllCTTypes.RECTANGLE, "cast_iron_vat_top"), CAST_IRON_VAT_INNER = getCT(AllCTTypes.RECTANGLE, "cast_iron_vat_inner");
public static final CTSpriteShiftEntry FIREPROOF_VAT = getCT(AllCTTypes.RECTANGLE, "fireproof_vat"), FIREPROOF_VAT_TOP = getCT(AllCTTypes.RECTANGLE, "fireproof_vat_top"), FIREPROOF_VAT_INNER = getCT(AllCTTypes.RECTANGLE, "fireproof_vat_inner");
public static final CTSpriteShiftEntry FIREPROOF_VAT = getCT(AllCTTypes.RECTANGLE, "firebrick_vat");
public static final CTSpriteShiftEntry BLAST_FURNACE_REINFORCEMENT = vertical("blast_furnace_reinforcement");
public static final CTSpriteShiftEntry RUSTED_BLAST_FURNACE_REINFORCEMENT = vertical("rusted_blast_furnace_reinforcement");

View File

@@ -9,11 +9,6 @@ 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;

View File

@@ -36,7 +36,7 @@ public class TFMGCommonEvents {
public static void onBlockPlaced(BlockEvent.EntityPlaceEvent event) {
if (event.getEntity() instanceof Player player) {
if (player.getItemInHand(InteractionHand.OFF_HAND).is(TFMGItems.ELECTRICIANS_WRENCH.get()) && event.getLevel().getBlockEntity(event.getPos()) instanceof IElectric be && be.canBeInGroups()) {
if (player.getItemInHand(InteractionHand.OFF_HAND).is(TFMGItems.CONFIGURATION_WRENCH.get()) && event.getLevel().getBlockEntity(event.getPos()) instanceof IElectric be && be.canBeInGroups()) {
be.getData().group.id = player.getItemInHand(InteractionHand.OFF_HAND).getOrCreateTag().getInt("Number");
be.updateNextTick();

View File

@@ -1,10 +1,15 @@
package com.drmangotea.tfmg.content.decoration.doors;
import com.drmangotea.tfmg.registry.TFMGPartialModels;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.content.decoration.slidingDoor.SlidingDoorBlock;
import com.simibubi.create.content.decoration.slidingDoor.SlidingDoorBlockEntity;
import com.simibubi.create.foundation.blockEntity.renderer.SafeBlockEntityRenderer;
import dev.engine_room.flywheel.lib.model.baked.PartialModel;
import net.createmod.catnip.data.Couple;
import net.createmod.catnip.data.Iterate;
@@ -21,6 +26,7 @@ import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.properties.DoorHingeSide;
import net.minecraft.world.level.block.state.properties.DoubleBlockHalf;
import net.minecraft.world.phys.Vec3;
import net.minecraftforge.registries.ForgeRegistries;
public class TFMGSlidingDoorRenderer extends SafeBlockEntityRenderer<TFMGSlidingDoorBlockEntity> {
@@ -33,10 +39,13 @@ public class TFMGSlidingDoorRenderer extends SafeBlockEntityRenderer<TFMGSliding
BlockState blockState = be.getBlockState();
if (!be.shouldRenderSpecial(blockState))
return;
Direction facing = blockState.getValue(DoorBlock.FACING);
Direction movementDirection = facing.getClockWise();
if (blockState.getValue(DoorBlock.HINGE) == DoorHingeSide.LEFT)
movementDirection = movementDirection.getOpposite();
float value = be.animation.getValue(partialTicks);
float value2 = Mth.clamp(value * 10, 0, 1);
@@ -45,19 +54,20 @@ public class TFMGSlidingDoorRenderer extends SafeBlockEntityRenderer<TFMGSliding
.scale(value * value * 13 / 16f)
.add(Vec3.atLowerCornerOf(facing.getNormal())
.scale(value2 * 1 / 32f));
if (((TFMGSlidingDoorBlock) blockState.getBlock()).isFoldingDoor()) {
Couple<PartialModel> partials =
TFMGPartialModels.FOLDING_DOORS.get(ForgeRegistries.BLOCKS.getKey(blockState.getBlock()));
if(partials==null)
return;
boolean flip = blockState.getValue(DoorBlock.HINGE) == DoorHingeSide.RIGHT;
for (boolean left : Iterate.trueAndFalse) {
SuperByteBuffer partial = CachedBuffers.partial(partials.get(left ^ flip), blockState);
float f = flip ? -1 : 1;
partial.translate(0, -1 / 512f, 0)
.translate(Vec3.atLowerCornerOf(facing.getNormal())
.scale(value2 * 1 / 32f));
partial.rotateCenteredDegrees(
partial.rotateCentered(
Mth.DEG_TO_RAD * AngleHelper.horizontalAngle(facing.getClockWise()), Direction.UP);
if (flip)
@@ -86,5 +96,7 @@ public class TFMGSlidingDoorRenderer extends SafeBlockEntityRenderer<TFMGSliding
.light(light)
.renderInto(ms, vb);
}
}
}

View File

@@ -35,6 +35,16 @@ public class TFMGPipes {
public static final Map<PipeMaterial, List<BlockEntry<? extends Block>>> TFMG_PIPES = new HashMap<>();
/*
0: pipe
1: encased
2: glass
3: pump
4: smart pipe
5: valve
*/
static {

View File

@@ -41,8 +41,8 @@ public class SteelFluidTankModel extends CTModel {
TFMGSpriteShifts.CAST_IRON_VAT_INNER);
}
public static SteelFluidTankModel fireproofVat(BakedModel originalModel) {
return new SteelFluidTankModel(originalModel, TFMGSpriteShifts.FIREPROOF_VAT, TFMGSpriteShifts.FIREPROOF_VAT_TOP,
TFMGSpriteShifts.FIREPROOF_VAT_INNER);
return new SteelFluidTankModel(originalModel, TFMGSpriteShifts.FIREPROOF_VAT, TFMGSpriteShifts.STEEL_VAT_TOP,
TFMGSpriteShifts.STEEL_VAT_INNER);
}

View File

@@ -15,6 +15,8 @@ public class ElectricBlockValues {
public int networkPowerGeneration =0;
public float highestCurrent=0;
public boolean notEnoughtPower=false;
public boolean setVoltageNextTick = false;
public int failTimer = 0;

View File

@@ -1,14 +1,5 @@
package com.drmangotea.tfmg.content.electricity.base;
import com.drmangotea.tfmg.TFMG;
import com.drmangotea.tfmg.base.TFMGUtils;
import com.drmangotea.tfmg.content.electricity.connection.cables.CableConnectorBlockEntity;
import com.drmangotea.tfmg.content.electricity.lights.LightBulbBlockEntity;
import com.drmangotea.tfmg.registry.TFMGBlocks;
import net.minecraft.world.item.DyeColor;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Blocks;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -48,7 +39,7 @@ public class ElectricalNetwork {
Map<Integer, Float> groups = new HashMap<>();
for (IElectric member : members) {
member.getData().notEnoughtPower = false;
int groupId = member.getData().group.id;
maxVoltage = Math.max(member.voltageGeneration(), maxVoltage);
@@ -56,7 +47,7 @@ public class ElectricalNetwork {
frequency = frequency == 0 ? member.frequencyGeneration() : (frequency + member.frequencyGeneration()) / 2;
resistance += (int) member.resistance();
powerGeneration += member.powerGeneration();
if(member.canBeInGroups())
if (member.canBeInGroups())
groups.put(groupId, groups.containsKey(groupId) ? groups.get(groupId) + member.resistance() : member.resistance());
}
@@ -79,28 +70,39 @@ public class ElectricalNetwork {
member.setPowerPercentage(powerPercentage);
if(groups.containsKey(member.getData().group.id))
if (groups.containsKey(member.getData().group.id))
member.getData().group.resistance = groups.get(member.getData().group.id);
}
for (IElectric member : members) {
member.getData().highestCurrent = getCableCurrent(member);
member.updateNearbyNetworks(member);
member.getData().highestCurrent = getCableCurrent(member);
member.updateNearbyNetworks(member);
if (member instanceof KineticElectricBlockEntity be)
be.updateGeneratedRotation();
}
if (!members.isEmpty())
if (members.get(0).getNetworkPowerUsage() > members.get(0).getNetworkPowerGeneration()) {
for (IElectric member : members) {
member.getData().notEnoughtPower = true;
if (member instanceof KineticElectricBlockEntity be)
be.updateGeneratedRotation();
}
}
}
public static float getCableCurrent(IElectric be){
float current =0;
public static float getCableCurrent(IElectric be) {
float current = 0;
List<Integer> groups = new ArrayList<>();
for(IElectric member : be.getOrCreateElectricNetwork().members){
for (IElectric member : be.getOrCreateElectricNetwork().members) {
if(member.canBeInGroups())
if(!groups.contains(member.getData().group.id)){
if (member.canBeInGroups())
if (!groups.contains(member.getData().group.id)) {
groups.add(member.getData().group.id);
if(member.resistance()!=0)
if (member.resistance() != 0)
current += member.getData().voltage/member.resistance();
current += member.getData().voltage / member.resistance();
}
}

View File

@@ -175,6 +175,10 @@ public interface IElectric {
ElectricBlockValues getData();
default boolean canWork(){
return !getData().notEnoughtPower;
}
default void blockFail() {
getLevelAccessor().destroyBlock(BlockPos.of(getPos()), false);
}
@@ -199,6 +203,13 @@ public interface IElectric {
power += member.getPowerUsage();
return power;
}
default int getNetworkPowerGeneration() {
int power = 0;
for (IElectric member : getOrCreateElectricNetwork().members)
power += member.powerGeneration();
return power;
}
default void onNetworkChanged(int oldVoltage, int oldPower) {
}

View File

@@ -6,6 +6,7 @@ import com.simibubi.create.api.equipment.goggles.IHaveGoggleInformation;
import com.simibubi.create.api.equipment.goggles.IHaveHoveringInformation;
import com.simibubi.create.content.kinetics.base.GeneratingKineticBlockEntity;
import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour;
import com.simibubi.create.foundation.utility.CreateLang;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.nbt.CompoundTag;
@@ -32,6 +33,7 @@ public class KineticElectricBlockEntity extends GeneratingKineticBlockEntity imp
@Override
public boolean addToTooltip(List<Component> tooltip, boolean isPlayerSneaking) {
CreateLang.text("MAX POWER: "+getNetworkPowerGeneration()).forGoggles(tooltip);
return makeElectricityTooltip(tooltip, isPlayerSneaking);
}

View File

@@ -44,7 +44,7 @@ public class CopycatCableBlockEntity extends CopycatBlockEntity implements IElec
}
@Override
public boolean hasCustomMaterial() {
return !TFMGBlocks.COPYCAT_CABLE_BASE.has(getMaterial());
return !AllBlocks.COPYCAT_BASE.has(getMaterial());
}
@Override
public void addBehaviours(List<BlockEntityBehaviour> behaviours) {
@@ -162,11 +162,6 @@ public class CopycatCableBlockEntity extends CopycatBlockEntity implements IElec
@Override
public void setVoltage(int newVoltage) {
//if(this instanceof LightBulbBlockEntity be&&be.color == DyeColor.WHITE){
// TFMG.LOGGER.debug("Rezistancja Grup "+data.group.resistance);
//}
if (canBeInGroups()) {
data.voltage = (int) (((float) resistance() / data.group.resistance) * (float) data.voltageSupply);
return;
@@ -253,10 +248,10 @@ public class CopycatCableBlockEntity extends CopycatBlockEntity implements IElec
setVoltage(data.voltageSupply);
data.setVoltageNextTick = false;
}
if(setNextTick) {
setMaterial(TFMGBlocks.COPYCAT_CABLE_BASE.getDefaultState());
setNextTick = false;
}
//if(setNextTick) {
// setMaterial(TFMGBlocks.COPYCAT_CABLE_BASE.getDefaultState());
// setNextTick = false;
//}
}
@Override
@@ -280,7 +275,7 @@ public class CopycatCableBlockEntity extends CopycatBlockEntity implements IElec
BlockState acceptedBlockState = cb.getAcceptedBlockState(level, worldPosition, ItemStack.EMPTY, null);
if (acceptedBlockState != null && getMaterial().is(acceptedBlockState.getBlock()))
return;
setMaterial(TFMGBlocks.COPYCAT_CABLE_BASE.getDefaultState());
setMaterial(AllBlocks.COPYCAT_BASE.getDefaultState());
}
//

View File

@@ -7,15 +7,17 @@ import com.drmangotea.tfmg.content.electricity.connection.cables.CableConnection
import com.drmangotea.tfmg.content.electricity.connection.cables.CableConnectorBlockEntity;
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.engines.types.large_engine.LargeEngineBlockEntity;
import com.drmangotea.tfmg.content.engines.types.regular_engine.RegularEngineBlockEntity;
import com.drmangotea.tfmg.content.machinery.metallurgy.blast_stove.BlastStoveBlockEntity;
import com.drmangotea.tfmg.content.machinery.metallurgy.casting_basin.CastingBasinBlockEntity;
import com.drmangotea.tfmg.content.machinery.metallurgy.coke_oven.CokeOvenBlockEntity;
import com.drmangotea.tfmg.content.machinery.misc.concrete_hose.ConcreteHoseBlockEntity;
import com.drmangotea.tfmg.content.machinery.oil_processing.pumpjack.pumpjack.base.FluidReservoir;
import com.drmangotea.tfmg.content.machinery.vat.base.VatBlockEntity;
import com.drmangotea.tfmg.content.machinery.oil_processing.pumpjack.pumpjack.base.PumpjackBaseBlockEntity;
import com.drmangotea.tfmg.content.machinery.oil_processing.surface_scanner.SurfaceScannerBlockEntity;
import com.drmangotea.tfmg.content.machinery.vat.base.VatBlockEntity;
import com.drmangotea.tfmg.registry.TFMGFluids;
import com.simibubi.create.content.fluids.tank.FluidTankBlockEntity;
import com.simibubi.create.content.kinetics.mixer.MechanicalMixerBlockEntity;
import net.minecraft.core.BlockPos;
@@ -24,6 +26,8 @@ import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.context.UseOnContext;
import net.minecraft.world.level.Level;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.capability.IFluidHandler;
import java.util.ArrayList;
@@ -62,18 +66,12 @@ public class DebugCinderBlockItem extends Item {
}
return InteractionResult.SUCCESS;
}
if (level.getBlockEntity(pos) instanceof RegularEngineBlockEntity be) {
be.updateRotation();
if (level.getBlockEntity(pos) instanceof LargeEngineBlockEntity be) {
be.airTank.fill(new FluidStack(TFMGFluids.AIR.getSource(),200), IFluidHandler.FluidAction.EXECUTE);
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) {
@@ -152,11 +150,12 @@ public class DebugCinderBlockItem extends Item {
}
}
}
if (level.getBlockEntity(pos) instanceof RegularEngineBlockEntity be) {
}
if (level.getBlockEntity(pos) instanceof AbstractEngineBlockEntity be) {
be.connect();
be.highestSignal=0;
be.controlled = false;
be.updateGeneratedRotation();
TFMGUtils.debugMessage(level, "RPM "+be.rpm);
}
if (level.getBlockEntity(pos) instanceof CastingBasinBlockEntity be) {
be.findRecipe();

View File

@@ -68,7 +68,7 @@ public class RotorBlockEntity extends KineticElectricBlockEntity {
}
@Override
public int voltageGeneration() {
return (int) Math.min(255,generation());
return (int) Math.min(3000,generation()*3);
}
public int generation() {

View File

@@ -39,9 +39,8 @@ public class LightBulbBlockEntity extends ElectricBlockEntity {
@Override
public void tick() {
super.tick();
if(!hasSignal) {
glow.chase(getPowerUsage()*1.5, 0.4, LerpedFloat.Chaser.EXP);
if(!hasSignal&&canWork()) {
glow.chase(getPowerUsage()*2.5, 0.4, LerpedFloat.Chaser.EXP);
glow.tickChaser();
if (Math.min(getData().getVoltage() / 10, 15) != getBlockState().getValue(LIGHT))
level.setBlock(getBlockPos(), getBlockState().setValue(LIGHT, (int) Math.min(getData().getVoltage() / 10, 15)), 2);

View File

@@ -1,6 +1,5 @@
package com.drmangotea.tfmg.content.electricity.utilities.electric_motor;
import com.drmangotea.tfmg.TFMG;
import com.drmangotea.tfmg.config.MachineConfig;
import com.drmangotea.tfmg.config.TFMGConfigs;
import com.drmangotea.tfmg.content.electricity.base.KineticElectricBlockEntity;
@@ -49,13 +48,13 @@ public class ElectricMotorBlockEntity extends KineticElectricBlockEntity {
@Override
public boolean hasElectricitySlot(Direction direction) {
return direction == getBlockState().getValue(FACING).getOpposite()||(direction.getAxis().isHorizontal()&&direction == Direction.DOWN);
return direction == getBlockState().getValue(FACING).getOpposite() || (direction.getAxis().isHorizontal() && direction == Direction.DOWN);
}
@Override
public void onNetworkChanged(int oldVoltage, int oldPower) {
if(oldPower!=getPowerUsage()||oldVoltage!=data.voltage) {
if (oldPower != getPowerUsage() || oldVoltage != data.voltage) {
updateGeneratedRotation();
}
}
@@ -67,10 +66,11 @@ public class ElectricMotorBlockEntity extends KineticElectricBlockEntity {
//if(getPowerUsage() <machineConfig.electricMotorMinimumPower.get())
// return 0;
if (!canWork())
return 0;
//if(getPowerUsage() >= machineConfig.electricMotorMinimumPower.get()){
return Math.min(Math.abs(generatedSpeed.getValue()),data.getVoltage()/2);
return Math.min(Math.abs(generatedSpeed.getValue()), data.getVoltage() / 2);
//}
@@ -92,13 +92,13 @@ public class ElectricMotorBlockEntity extends KineticElectricBlockEntity {
@Override
public int getPowerUsage() {
if(Math.min(generatedSpeed.getValue(),data.getVoltage()/2) ==0)
if (Math.min(generatedSpeed.getValue(), data.getVoltage() / 2) == 0)
return super.getPowerUsage();
float speedModifier = (Math.min(Math.abs(generatedSpeed.getValue()),data.getVoltage())/256f)*5;
float speedModifier = (Math.min(Math.abs(generatedSpeed.getValue()), data.getVoltage()) / 256f) * 5;
return (int) ((float)super.getPowerUsage()* speedModifier);
return (int) ((float) super.getPowerUsage() * speedModifier);
}
class MotorValueBox extends ValueBoxTransform.Sided {
@@ -111,13 +111,13 @@ public class ElectricMotorBlockEntity extends KineticElectricBlockEntity {
@Override
public Vec3 getLocalOffset(LevelAccessor level, BlockPos pos, BlockState state) {
Direction facing = state.getValue(FACING);
return super.getLocalOffset(level,pos,state).add(Vec3.atLowerCornerOf(facing.getNormal())
return super.getLocalOffset(level, pos, state).add(Vec3.atLowerCornerOf(facing.getNormal())
.scale(-1 / 16f));
}
@Override
public void rotate(LevelAccessor level, BlockPos pos, BlockState state, PoseStack ms) {
super.rotate(level,pos,state, ms);
super.rotate(level, pos, state, ms);
Direction facing = state.getValue(FACING);
if (facing.getAxis() == Direction.Axis.Y)
return;
@@ -130,7 +130,7 @@ public class ElectricMotorBlockEntity extends KineticElectricBlockEntity {
@Override
protected boolean isSideActive(BlockState state, Direction direction) {
Direction facing = state.getValue(FACING);
if (facing.getAxis() != Direction.Axis.Y && direction == Direction.DOWN||direction == Direction.UP)
if (facing.getAxis() != Direction.Axis.Y && direction == Direction.DOWN || direction == Direction.UP)
return false;
return direction.getAxis() != facing.getAxis();
}

View File

@@ -1,25 +1,15 @@
package com.drmangotea.tfmg.content.engines.base;
import com.drmangotea.tfmg.TFMG;
import com.drmangotea.tfmg.base.TFMGUtils;
import com.drmangotea.tfmg.config.TFMGConfigs;
import com.drmangotea.tfmg.content.electricity.base.KineticElectricBlockEntity;
import com.drmangotea.tfmg.content.engines.engine_controller.EngineControllerBlockEntity;
import com.drmangotea.tfmg.content.engines.fuels.BaseFuelTypes;
import com.drmangotea.tfmg.content.engines.fuels.EngineFuelTypeManager;
import com.drmangotea.tfmg.content.engines.fuels.FuelType;
import com.drmangotea.tfmg.content.engines.regular_engine.RegularEngineBlockEntity;
import com.drmangotea.tfmg.content.engines.upgrades.EnginePipingUpgrade;
import com.drmangotea.tfmg.content.engines.upgrades.EngineUpgrade;
import com.drmangotea.tfmg.content.engines.upgrades.TransmissionUpgrade;
import com.drmangotea.tfmg.registry.TFMGBlocks;
import com.drmangotea.tfmg.registry.TFMGFluids;
import com.drmangotea.tfmg.registry.TFMGItems;
import com.simibubi.create.AllBlocks;
import com.drmangotea.tfmg.registry.TFMGTags;
import com.simibubi.create.foundation.fluid.CombinedTankWrapper;
import com.simibubi.create.foundation.utility.CreateLang;
import net.createmod.catnip.math.VecHelper;
import net.minecraft.ChatFormatting;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.nbt.CompoundTag;
@@ -27,13 +17,8 @@ import net.minecraft.network.chat.Component;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource;
import net.minecraft.tags.TagKey;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.entity.item.ItemEntity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.item.crafting.Ingredient;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.Fluid;
@@ -46,93 +31,110 @@ import net.minecraftforge.fluids.capability.IFluidHandler;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.atomic.AtomicReference;
import static com.drmangotea.tfmg.content.engines.base.EngineBlock.ENGINE_STATE;
import static com.drmangotea.tfmg.content.engines.base.EngineBlock.EngineState.NORMAL;
import static com.drmangotea.tfmg.content.engines.base.EngineBlock.EngineState.SHAFT;
import static com.simibubi.create.content.kinetics.base.HorizontalKineticBlock.HORIZONTAL_FACING;
public abstract class AbstractEngineBlockEntity extends KineticElectricBlockEntity {
//
public EngineComponentsInventory componentsInventory;
public EngineFluidTank fuelTank;
public EngineFluidTank exhaustTank;
public LazyOptional<IFluidHandler> fluidCapability;
//
public BlockPos controller = getBlockPos();
boolean connectNextTick = true;
public List<Long> engines = new ArrayList<>();
public int engineNumber = 0;
//
int oil = 0;
int coolingFluid = 0;
//
public float rpm = 0;
float torque = 0;
public float fuelInjectionRate = 0;
//
boolean reverse = false;
public boolean reverse = false;
//
public int highestSignal;
public int signal;
boolean signalChanged;
//
int fuelConsumptionTimer = 0;
public boolean controlled = false;
//
public Optional<? extends EngineUpgrade> upgrade = Optional.empty();
//
public float torque = 0;
public boolean signalChanged;
//
public int fuelConsumptionTimer = 0;
//
public BlockPos controllerPosition = null;
public AbstractEngineBlockEntity(BlockEntityType<?> typeIn, BlockPos pos, BlockState state) {
super(typeIn, pos, state);
setLazyTickRate(10);
fuelTank = new EngineFluidTank(4000, false, true, this::tankUpdated);
fuelTank = new EngineFluidTank(4000, false, true, this::tankUpdated, TFMGTags.TFMGFluidTags.AIR.tag);
exhaustTank = new EngineFluidTank(8000, true, false, this::tankUpdated);
fluidCapability = LazyOptional.of(() -> new CombinedTankWrapper(fuelTank, exhaustTank));
componentsInventory = new EngineComponentsInventory(this, EngineProperties.commonRegularComponents());
refreshCapability();
}
public boolean hasUpgrade() {
return upgrade.isPresent();
@Override
public void tick() {
if (signalChanged) {
signalChanged = false;
analogSignalChanged();
}
super.tick();
}
public void tankUpdated(FluidStack stack) {
if (stack.getFluid().isSame(TFMGFluids.CARBON_DIOXIDE.get()) && stack.getAmount() >= exhaustTank.getSpace())
updateRotation();
sendData();
setChanged();
}
public boolean hasAllComponents() {
protected void analogSignalChanged() {
if (level.getBlockEntity(controller) instanceof AbstractEngineBlockEntity be) {
return be.nextComponent() == Ingredient.EMPTY;
if (controlled) {
fuelInjectionRate = highestSignal / 15f;
return;
}
return false;
int newSignal = level.getBestNeighborSignal(getBlockPos());
signal = newSignal;
newSignal = Math.max(level.getBestNeighborSignal(getBlockPos()), newSignal);
highestSignal = newSignal;
fuelInjectionRate = highestSignal / 15f;
updateRotation();
}
@Override
public boolean addToGoggleTooltip(List<Component> tooltip, boolean isPlayerSneaking) {
CreateLang.text("SIGNAL " + highestSignal).forGoggles(tooltip);
return super.addToGoggleTooltip(tooltip, isPlayerSneaking);
}
@Override
public float calculateAddedStressCapacity() {
return super.calculateAddedStressCapacity() + (torque);
}
@Override
public void lazyTick() {
super.lazyTick();
if (controllerPosition == null) {
neighbourChanged();
}
upgrade.ifPresent(engineUpgrade -> engineUpgrade.lazyTickUpgrade(this));
neighbourChanged();
manageFuelAndExhaust();
}
public void manageFuelAndExhaust() {
exhaustTank.forceFill(new FluidStack(TFMGFluids.CARBON_DIOXIDE.get(), Math.min(300, getFuelConsumption() * 7)), IFluidHandler.FluidAction.EXECUTE);
if (fuelConsumptionTimer <= 2) {
@@ -147,36 +149,12 @@ public abstract class AbstractEngineBlockEntity extends KineticElectricBlockEnti
}
}
@Override
public int voltageGeneration() {
if (upgrade.isPresent() && upgrade.get().getItem() == TFMGBlocks.GENERATOR.asItem())
return (int) (20 * (rpm / 3000));
return 0;
}
@Override
public int powerGeneration() {
if (upgrade.isPresent() && upgrade.get().getItem() == TFMGBlocks.GENERATOR.asItem())
return (int) rpm;
return 0;
}
@Override
public boolean makeElectricityTooltip(List<Component> tooltip, boolean isPlayerSneaking) {
return false;
}
public int getFuelConsumption() {
if (getGeneratedSpeed() == 0)
return 0;
return (int) (12.5f * (1 / efficiencyModifier()) * getSpeedEfficiency() * fuelInjectionRate) * engineLength();
}
public float getSpeedEfficiency() {
if (rpm >= 6000)
@@ -185,149 +163,28 @@ public abstract class AbstractEngineBlockEntity extends KineticElectricBlockEnti
return 1 / (0.08f * (rpm / 1000) + 0.5f);
}
public Ingredient nextComponent() {
if (!isController())
return Ingredient.EMPTY;
for (int i = 0; i < componentsInventory.getSlots(); i++) {
if (componentsInventory.getStackInSlot(i).isEmpty()) {
return componentsInventory.components.get(i);
}
}
return Ingredient.EMPTY;
}
public abstract List<TagKey<Fluid>> getSupportedFuels();
public void onUpdated() {
}
public void updateRotation() {
if (!isController()) {
if (level.getBlockEntity(controller) instanceof AbstractEngineBlockEntity be)
be.updateRotation();
return;
}
List<Long> allEngines = new ArrayList<>(engines);
allEngines.add(controller.asLong());
for (TagKey<Fluid> fluidTag : getSupportedFuels()) {
if (fuelTank.getFluid().getFluid().is(fluidTag)) {
if (!canWork()) {
allEngines.forEach(l -> {
BlockPos pos = BlockPos.of(l);
if (level.getBlockEntity(pos) instanceof AbstractEngineBlockEntity be) {
be.rpm = 0;
be.torque = 0;
be.updateGeneratedRotation();
}
});
return;
}
allEngines.forEach(l -> {
BlockPos pos = BlockPos.of(l);
if (level.getBlockEntity(pos) instanceof AbstractEngineBlockEntity be) {
be.rpm = 4000 * speedModifier() * fuelInjectionRate;
be.torque = 15 * torqueModifier() * fuelInjectionRate * engineLength();
be.updateGeneratedRotation();
}
});
return;
}
}
updateGeneratedRotation();
getAllEngines().forEach(l -> {
if (hasLevel())
if (level.getBlockEntity(BlockPos.of(l)) instanceof AbstractEngineBlockEntity be) {
be.updateGeneratedRotation();
}
});
}
@Override
public float getGeneratedSpeed() {
float speed;
if (getBlockState().getValue(ENGINE_STATE) != SHAFT)
return 0;
if (hasLevel())
if (level.getBlockEntity(controller) instanceof AbstractEngineBlockEntity controller) {
if (controller.fuelTank.isEmpty())
return 0;
if (!controller.canWork())
return 0;
speed = rpm / 40;
if (reverse)
speed = speed * -1;
return convertToDirection(Math.min((int) speed, 256), getBlockState().getValue(HORIZONTAL_FACING));
}
return 0;
}
public boolean canWork() {
if(fuelTank.isEmpty())
return false;
if (exhaustTank.getSpace() == 0)
return false;
if (!nextComponent().isEmpty())
return false;
return true;
}
@Override
public void tick() {
super.tick();
upgrade.ifPresent(engineUpgrade -> engineUpgrade.tickUpgrade(this));
if (connectNextTick) {
connect();
connectNextTick = false;
}
if (signalChanged) {
signalChanged = false;
analogSignalChanged();
}
public void updateRotation() {
}
protected void analogSignalChanged() {
if (controllerPosition != null)
return;
int newSignal = level.getBestNeighborSignal(getBlockPos());
signal = newSignal;
if (!isController()) {
if (level.getBlockEntity(controller) instanceof AbstractEngineBlockEntity be) {
be.analogSignalChanged();
return;
}
}
for (long posLong : engines) {
BlockPos pos = BlockPos.of(posLong);
newSignal = Math.max(level.getBestNeighborSignal(pos), newSignal);
}
newSignal = Math.max(level.getBestNeighborSignal(controller), newSignal);
highestSignal = newSignal;
fuelInjectionRate = highestSignal / 15f;
updateRotation();
}
public abstract float efficiencyModifier();
public abstract float speedModifier();
@@ -352,15 +209,15 @@ public abstract class AbstractEngineBlockEntity extends KineticElectricBlockEnti
return matchingType.get();
}
private void refreshCapability() {
public void refreshCapability() {
LazyOptional<IFluidHandler> oldCap = fluidCapability;
fluidCapability = LazyOptional.of(this::handlerForCapability);
oldCap.invalidate();
}
private IFluidHandler handlerForCapability() {
return isController() ? new CombinedTankWrapper(fuelTank, exhaustTank)
: getControllerBE().handlerForCapability();
public IFluidHandler handlerForCapability() {
return new CombinedTankWrapper(fuelTank, exhaustTank);
}
@Nonnull
@@ -378,141 +235,12 @@ public abstract class AbstractEngineBlockEntity extends KineticElectricBlockEnti
}
public boolean insertItem(ItemStack itemStack, boolean shifting, Player player, InteractionHand hand) {
Direction facing = getBlockState().getValue(HORIZONTAL_FACING);
if (itemStack.is(AllBlocks.SHAFT.asItem()) && getBlockState().getValue(ENGINE_STATE) == NORMAL && !(level.getBlockEntity(getBlockPos().relative(facing)) instanceof AbstractEngineBlockEntity)) {
playInsertionSound();
level.setBlock(getBlockPos(), getBlockState().setValue(ENGINE_STATE, SHAFT), 2);
itemStack.shrink(1);
updateRotation();
setChanged();
sendData();
return true;
}
if (itemStack.is(TFMGItems.SCREWDRIVER.get())) {
for (int i = componentsInventory.components.size() - 1; i >= 0; i--) {
if (!componentsInventory.getItem(i).isEmpty()) {
dropItem(componentsInventory.getItem(i));
componentsInventory.setStackInSlot(i, ItemStack.EMPTY);
playRemovalSound();
updateRotation();
setChanged();
sendData();
return true;
}
}
}
if (itemStack.is(TFMGItems.COOLING_FLUID_BOTTLE.get())) {
if (level.getBlockEntity(controller) instanceof AbstractEngineBlockEntity be) {
int toDrain = Math.min(2000 - coolingFluid, itemStack.getOrCreateTag().getInt("amount"));
itemStack.getOrCreateTag().putInt("amount", itemStack.getOrCreateTag().getInt("amount") - toDrain);
be.coolingFluid += toDrain;
level.playSound(null, getBlockPos(), SoundEvents.BUCKET_FILL, SoundSource.BLOCKS, 1f, 1f);
return true;
}
}
if (itemStack.is(TFMGItems.OIL_CAN.get())) {
if (level.getBlockEntity(controller) instanceof AbstractEngineBlockEntity be) {
int toDrain = Math.min(2000 - oil, itemStack.getOrCreateTag().getInt("amount"));
itemStack.getOrCreateTag().putInt("amount", itemStack.getOrCreateTag().getInt("amount") - toDrain);
be.oil += toDrain;
level.playSound(null, getBlockPos(), SoundEvents.BUCKET_FILL, SoundSource.BLOCKS, 1f, 1f);
updateRotation();
return true;
}
}
if (itemStack.is(TFMGFluids.COOLING_FLUID.getBucket().get())) {
if (coolingFluid <= 1000) {
coolingFluid += 1000;
player.setItemInHand(hand, Items.BUCKET.getDefaultInstance());
level.playSound(null, getBlockPos(), SoundEvents.BUCKET_FILL, SoundSource.BLOCKS, 1f, 1f);
updateRotation();
return true;
}
}
if (itemStack.is(TFMGFluids.LUBRICATION_OIL.getBucket().get())) {
if (oil <= 1000) {
oil += 1000;
player.setItemInHand(hand, Items.BUCKET.getDefaultInstance());
level.playSound(null, getBlockPos(), SoundEvents.BUCKET_FILL, SoundSource.BLOCKS, 1f, 1f);
updateRotation();
return true;
}
}
if (EngineUpgrade.getUpgrades().containsKey(itemStack.getItem())) {
Optional<? extends EngineUpgrade> itemUpgrade = EngineUpgrade.getUpgrades().get(itemStack.getItem()).createUpgrade();
if (itemUpgrade.isPresent() && isUpgradeFirst(itemUpgrade.get())) {
upgrade = itemUpgrade;
playInsertionSound();
updateRotation();
upgrade.ifPresent(u -> u.updateUpgrade(this));
itemStack.shrink(1);
if (upgrade.isPresent())
if (upgrade.get() instanceof TransmissionUpgrade transmissionUpgrade) {
if (itemStack.getOrCreateTag().contains("Position") && itemStack.getOrCreateTag().get("Position") != null) {
BlockPos pos = BlockPos.of(itemStack.getOrCreateTag().getLong("Position"));
if (level.getBlockEntity(pos) instanceof EngineControllerBlockEntity engineControllerBE) {
getControllerBE().controllerPosition = pos;
engineControllerBE.enginePos = this.getBlockPos();
getControllerBE().highestSignal = 0;
}
}
}
setChanged();
sendData();
return true;
}
}
if (!isController())
return false;
if (nextComponent().test(itemStack)) {
if (componentsInventory.insertItem(itemStack)) {
if (!itemStack.is(TFMGItems.SCREWDRIVER.get()))
itemStack.shrink(1);
playInsertionSound();
updateRotation();
setChanged();
sendData();
return true;
}
}
return false;
}
public boolean isUpgradeFirst(EngineUpgrade itemUpgrade) {
for (AbstractEngineBlockEntity be : getEngines()) {
if (be.upgrade.isPresent() && be.upgrade.get().getItem() == itemUpgrade.getItem())
return false;
}
return true;
}
public List<Long> getAllEngines() {
List<Long> list = new ArrayList<>(engines);
list.add(controller.asLong());
return list;
}
public void changeDirection() {
playInsertionSound();
reverse = !reverse;
updateRotation();
}
public void dropItem(ItemStack stack) {
Vec3 dropVec = VecHelper.getCenterOf(worldPosition).add(0, 0.3f, 0);
ItemEntity dropped = new ItemEntity(level, dropVec.x, dropVec.y, dropVec.z, stack);
@@ -521,9 +249,6 @@ public abstract class AbstractEngineBlockEntity extends KineticElectricBlockEnti
level.addFreshEntity(dropped);
}
public int engineLength() {
return engines.size();
}
public void playInsertionSound() {
level.playSound(null, getBlockPos(), SoundEvents.ITEM_PICKUP, SoundSource.BLOCKS, 0.4f, 0.5f);
@@ -533,211 +258,77 @@ public abstract class AbstractEngineBlockEntity extends KineticElectricBlockEnti
level.playSound(null, getBlockPos(), SoundEvents.ITEM_PICKUP, SoundSource.BLOCKS, 0.4f, 0.5f);
}
@Override
public void onLoad() {
super.onLoad();
if (this.hasUpgrade() && this.upgrade.get().getItem() == TFMGBlocks.INDUSTRIAL_PIPE.asItem()) {
((EnginePipingUpgrade) this.upgrade.get()).findTank(this);
}
}
@Override
protected void read(CompoundTag compound, boolean clientPacket) {
super.read(compound, clientPacket);
controller = BlockPos.of(compound.getLong("Controller"));
reverse = compound.getBoolean("Reverse");
if (EngineUpgrade.getUpgrades().get(ItemStack.of(compound.getCompound("UpgradeItem")).getItem()) != null)
upgrade = Optional.of(EngineUpgrade.getUpgrades().get(ItemStack.of(compound.getCompound("UpgradeItem")).getItem()));
if (isController()) {
if (!BlockPos.of(compound.getLong("ControllerPos")).equals(new BlockPos(0, 0, 0)))
controllerPosition = BlockPos.of(compound.getLong("ControllerPos"));
componentsInventory.deserializeNBT(compound.getCompound("Components"));
fuelTank.readFromNBT(compound.getCompound("FuelTank"));
exhaustTank.readFromNBT(compound.getCompound("ExhaustTank"));
oil = compound.getInt("Oil");
coolingFluid = compound.getInt("CoolingFluid");
}
reverse = compound.getBoolean("Reverse");
signal = compound.getInt("Signal");
controlled = compound.getBoolean("Controlled");
rpm = compound.getFloat("RPM");
// if (isController()) {
// if (!BlockPos.of(compound.getLong("ControllerPos")).equals(new BlockPos(0, 0, 0)))
// controller = BlockPos.of(compound.getLong("ControllerPos"));
fuelTank.readFromNBT(compound.getCompound("FuelTank"));
exhaustTank.readFromNBT(compound.getCompound("ExhaustTank"));
highestSignal = compound.getInt("HighestSignal");
signalChanged = true;
updateRotation();
updateGeneratedRotation();
//}
}
@Override
protected void write(CompoundTag compound, boolean clientPacket) {
super.write(compound, clientPacket);
compound.putLong("Controller", controller.asLong());
compound.putBoolean("Reverse", reverse);
if (upgrade.isPresent())
compound.put("UpgradeItem", upgrade.get().getItem().getDefaultInstance().serializeNBT());
if (isController()) {
if (controllerPosition != null) {
compound.putLong("ControllerPos", controllerPosition.asLong());
} else compound.remove("ControllerPos");
compound.put("Components", componentsInventory.serializeNBT());
compound.put("FuelTank", fuelTank.writeToNBT(new CompoundTag()));
compound.put("ExhaustTank", exhaustTank.writeToNBT(new CompoundTag()));
compound.putInt("Oil", oil);
compound.putInt("CoolingFluid", coolingFluid);
}
compound.putInt("Signal", signal);
compound.putBoolean("Controlled", controlled);
compound.putFloat("RPM", rpm);
compound.put("FuelTank", fuelTank.writeToNBT(new CompoundTag()));
compound.put("ExhaustTank", exhaustTank.writeToNBT(new CompoundTag()));
compound.putInt("HighestSignal", highestSignal);
}
public boolean isController() {
return controller.equals(getBlockPos());
}
public abstract int getFuelConsumption();
@Override
public boolean addToGoggleTooltip(List<Component> tooltip, boolean isPlayerSneaking) {
if (controllerPosition != null)
CreateLang.text("CONTROLLED").forGoggles(tooltip);
CreateLang.text("Speed Efficiency " + getSpeedEfficiency()).forGoggles(tooltip);
CreateLang.text("Efficiency " + efficiencyModifier()).forGoggles(tooltip);
CreateLang.text("Fuel Consumption " + getFuelConsumption()).forGoggles(tooltip);
CreateLang.text("Rpm " + rpm).forGoggles(tooltip);
CreateLang.text("Torque " + torque).forGoggles(tooltip);
CreateLang.text("Injection Rate " + fuelInjectionRate).forGoggles(tooltip);
CreateLang.text("Signal " + highestSignal).forGoggles(tooltip);
CreateLang.number(rpm).style(ChatFormatting.AQUA).forGoggles(tooltip);
CreateLang.number(engineNumber).style(ChatFormatting.DARK_GREEN).forGoggles(tooltip);
if (isController() && !nextComponent().isEmpty())
CreateLang.text(nextComponent().getItems()[0].getDisplayName().getString()).forGoggles(tooltip);
TFMGUtils.createFluidTooltip(this, tooltip);
return true;
public void onPlaced() {
super.onPlaced();
}
public AbstractEngineBlockEntity getControllerBE() {
if (isController())
return this;
BlockEntity blockEntity = level.getBlockEntity(controller);
if (blockEntity instanceof AbstractEngineBlockEntity)
return (AbstractEngineBlockEntity) blockEntity;
return null;
}
@Override
public void remove() {
super.remove();
if (level.getBlockEntity(controller) instanceof AbstractEngineBlockEntity be) {
be.updateOthers();
} else updateOthers();
}
public void updateOthers() {
for (long id : engines) {
BlockPos pos = BlockPos.of(id);
if (level.getBlockEntity(pos) instanceof AbstractEngineBlockEntity be) {
be.connectNextTick = true;
}
}
}
//
public void neighbourChanged() {
if (!hasLevel())
return;
int power = level.getBestNeighborSignal(getBlockPos());
if (power != this.signal)
this.signalChanged = true;
}
//
public void connect() {
Direction updateDirection = getBlockState().getValue(HORIZONTAL_FACING).getAxis() == Direction.Axis.X ? Direction.WEST : Direction.NORTH;
if (level.getBlockEntity(getBlockPos().relative(updateDirection)) instanceof AbstractEngineBlockEntity be) {
be.connect();
return;
}
engines = new ArrayList<>();
for (int i = 0; i < getMaxLength(); i++) {
BlockPos pos = getBlockPos().relative(updateDirection.getOpposite(), i);
if (level.getBlockEntity(pos) instanceof AbstractEngineBlockEntity be) {
if (be.getBlockState().getValue(HORIZONTAL_FACING).getAxis() != updateDirection.getAxis())
return;
if (be instanceof RegularEngineBlockEntity be1 && this instanceof RegularEngineBlockEntity be2 && be1.type != be2.type)
return;
be.detashEngines();
engines.add(pos.asLong());
be.engineNumber = i;
be.engines = new ArrayList<>();
be.controller = getBlockPos();
be.refreshCapability();
if (i > 0)
level.setBlock(pos, be.getBlockState().setValue(HORIZONTAL_FACING, i > 0 ? updateDirection.getOpposite() : updateDirection), 2);
onUpdated();
be.sendData();
be.setChanged();
if (be.getBlockState().getValue(ENGINE_STATE) != NORMAL && i != 0) {
break;
}
} else return;
}
updateRotation();
setChanged();
sendData();
}
public void detashEngines() {
for (long id : engines) {
BlockPos pos = BlockPos.of(id);
if (level.getBlockEntity(pos) instanceof AbstractEngineBlockEntity be) {
be.controller = be.getBlockPos();
be.engineNumber = 0;
be.refreshCapability();
be.sendData();
be.setChanged();
}
}
}
public List<AbstractEngineBlockEntity> getEngines() {
List<AbstractEngineBlockEntity> values = new ArrayList<>();
for (Long position : getAllEngines()) {
BlockPos pos = BlockPos.of(position);
if (level.getBlockEntity(pos) instanceof AbstractEngineBlockEntity be)
values.add(be);
}
return values;
}
public float getUpgradeSpeedModifier() {
float modifier = 1;
for (AbstractEngineBlockEntity be : getEngines()) {
if (be.upgrade.isPresent())
modifier *= be.upgrade.get().getSpeedModifier(this);
}
return modifier;
}
public float getUpgradeTorqueModifier() {
float modifier = 1;
for (AbstractEngineBlockEntity be : getEngines()) {
if (be.upgrade.isPresent())
modifier *= be.upgrade.get().getTorqueModifier(this);
}
return modifier;
}
public float getUpgradeEfficiencyModifier() {
float modifier = 1;
for (AbstractEngineBlockEntity be : getEngines()) {
if (be.upgrade.isPresent())
modifier *= be.upgrade.get().getEfficiencyModifier(this);
}
return modifier;
}
}

View File

@@ -3,6 +3,7 @@ package com.drmangotea.tfmg.content.engines.base;
import com.drmangotea.tfmg.TFMG;
import com.drmangotea.tfmg.base.TFMGShapes;
import com.drmangotea.tfmg.content.engines.engine_controller.EngineControllerBlockEntity;
import com.drmangotea.tfmg.content.engines.types.AbstractSmallEngineBlockEntity;
import com.drmangotea.tfmg.content.engines.upgrades.EnginePipingUpgrade;
import com.drmangotea.tfmg.content.engines.upgrades.TransmissionUpgrade;
import com.drmangotea.tfmg.registry.TFMGBlocks;
@@ -21,7 +22,10 @@ import net.minecraft.world.level.LevelReader;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.StateDefinition;
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
import net.minecraft.world.level.block.state.properties.DirectionProperty;
import net.minecraft.world.level.block.state.properties.EnumProperty;
import net.minecraft.world.level.block.state.properties.Property;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.VoxelShape;
@@ -35,6 +39,8 @@ public class EngineBlock extends HorizontalKineticBlock {
public static final EnumProperty<EngineState> ENGINE_STATE = EnumProperty.create("engine_state", EngineState.class);
public static final Property<Direction> SHAFT_FACING = DirectionProperty.create("shaft_facing", Direction.Plane.HORIZONTAL);
public EngineBlock(Properties properties) {
super(properties);
registerDefaultState(defaultBlockState().setValue(ENGINE_STATE, EngineState.NORMAL));
@@ -44,20 +50,25 @@ public class EngineBlock extends HorizontalKineticBlock {
public InteractionResult onWrenched(BlockState state, UseOnContext context) {
Level level = context.getLevel();
BlockPos pos = context.getClickedPos();
if (level.getBlockEntity(pos) instanceof AbstractEngineBlockEntity be) {
if (level.getBlockEntity(pos) instanceof AbstractSmallEngineBlockEntity be) {
if (be.hasUpgrade()) {
if (be.upgrade.isPresent()) {
be.playRemovalSound();
be.dropItem(be.upgrade.get().getItem().getDefaultInstance());
if (be.upgrade.get() instanceof TransmissionUpgrade) {
if (be.getControllerBE().controllerPosition != null)
if (level.getBlockEntity(be.getControllerBE().controllerPosition) instanceof EngineControllerBlockEntity engineController) {
if (be.getControllerBE().controller != null){
if (level.getBlockEntity(be.getControllerBE().controller) instanceof EngineControllerBlockEntity engineController) {
engineController.enginePos = null;
engineController.engine = null;
engineController.disconnectEngine();
}
be.getControllerBE().controllerPosition = null;
}
be.getControllerBE().controlled =false;
be.getControllerBE().highestSignal = 0;
be.getControllerBE().updateGeneratedRotation();
be.getControllerBE().updateRotation();
be.getControllerBE().controller = null;
}
}
@@ -86,7 +97,7 @@ public class EngineBlock extends HorizontalKineticBlock {
@Override
public InteractionResult use(BlockState blockState, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult blockHitResult) {
if (level.getBlockEntity(pos) instanceof AbstractEngineBlockEntity be) {
if (level.getBlockEntity(pos) instanceof AbstractSmallEngineBlockEntity be) {
if (be.insertItem(player.getItemInHand(hand), player.isShiftKeyDown(), player, hand))
return InteractionResult.SUCCESS;
}
@@ -100,18 +111,18 @@ public class EngineBlock extends HorizontalKineticBlock {
@Override
public boolean hasShaftTowards(LevelReader world, BlockPos pos, BlockState state, Direction face) {
return state.getValue(ENGINE_STATE) == EngineState.SHAFT && face == state.getValue(HORIZONTAL_FACING);
return state.getValue(ENGINE_STATE) == EngineState.SHAFT && face == state.getValue(SHAFT_FACING);
}
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
builder.add(ENGINE_STATE);
builder.add(ENGINE_STATE,SHAFT_FACING);
}
@Override
public void neighborChanged(BlockState state, Level level, BlockPos pos, Block block, BlockPos neighbor, boolean b) {
if (level.getBlockEntity(pos) instanceof AbstractEngineBlockEntity be) {
if (level.getBlockEntity(pos) instanceof AbstractSmallEngineBlockEntity be) {
if (be.hasUpgrade() && be.upgrade.get().getItem() == TFMGBlocks.INDUSTRIAL_PIPE.asItem()) {
((EnginePipingUpgrade) be.upgrade.get()).findTank(be);
}
@@ -130,7 +141,8 @@ public class EngineBlock extends HorizontalKineticBlock {
NORMAL("normal"),
SHAFT("front"),
BACK("back");
BACK("back"),
SINGLE("single");
private final String name;
EngineState(String name) {

View File

@@ -39,11 +39,12 @@ public class EngineCTBehavior extends ConnectedTextureBehaviour.Base {
@Override
public boolean connectsTo(BlockState state, BlockState other, BlockAndTintGetter reader, BlockPos pos, BlockPos otherPos, Direction face) {
if(reader.getBlockEntity(pos) instanceof AbstractEngineBlockEntity be && reader.getBlockEntity(otherPos) instanceof AbstractEngineBlockEntity be2){
if(be.controller.asLong()==be2.controller.asLong())
return true;
}
return false;
//if(reader.getBlockEntity(pos) instanceof AbstractEngineBlockEntity be && reader.getBlockEntity(otherPos) instanceof AbstractEngineBlockEntity be2){
// if(be.controller.asLong()==be2.controller.asLong())
// return true;
//}
// return false;
return true;
}
@Override

View File

@@ -1,6 +1,8 @@
package com.drmangotea.tfmg.content.engines.base;
import com.drmangotea.tfmg.TFMG;
import com.simibubi.create.foundation.fluid.SmartFluidTank;
import net.minecraft.tags.TagKey;
import net.minecraft.world.level.material.Fluid;
import net.minecraftforge.fluids.FluidStack;
@@ -12,10 +14,31 @@ public class EngineFluidTank extends SmartFluidTank {
final boolean extractionAllowed;
final boolean insertionAllowed;
final TagKey<Fluid> allowedFluids;
final TagKey<Fluid> fluidBlacklist;
public EngineFluidTank(int capacity, boolean extractionAllowed, boolean insertionAllowed, Consumer<FluidStack> updateCallback) {
super(capacity, updateCallback);
this.extractionAllowed = extractionAllowed;
this.insertionAllowed = insertionAllowed;
this.allowedFluids = null;
this.fluidBlacklist = null;
}
public EngineFluidTank(int capacity, boolean extractionAllowed, boolean insertionAllowed, TagKey<Fluid> allowedFluid, Consumer<FluidStack> updateCallback) {
super(capacity, updateCallback);
this.extractionAllowed = extractionAllowed;
this.insertionAllowed = insertionAllowed;
this.allowedFluids = allowedFluid;
this.fluidBlacklist = null;
}
public EngineFluidTank(int capacity, boolean extractionAllowed, boolean insertionAllowed, Consumer<FluidStack> updateCallback,TagKey<Fluid> fluidBlacklist) {
super(capacity, updateCallback);
this.extractionAllowed = extractionAllowed;
this.insertionAllowed = insertionAllowed;
this.allowedFluids = null;
this.fluidBlacklist = fluidBlacklist;
}
@@ -25,13 +48,13 @@ public class EngineFluidTank extends SmartFluidTank {
return super.drain(resource, action);
}
public FluidStack forceDrain(FluidStack resource, FluidAction action){
return super.drain(resource,action);
public FluidStack forceDrain(FluidStack resource, FluidAction action) {
return super.drain(resource, action);
}
public FluidStack forceDrain(int resource, FluidAction action){
return super.drain(resource,action);
public FluidStack forceDrain(int resource, FluidAction action) {
return super.drain(resource, action);
}
@Override
@@ -46,6 +69,15 @@ public class EngineFluidTank extends SmartFluidTank {
@Override
public int fill(FluidStack resource, FluidAction action) {
if(fluidBlacklist!=null&&resource.getFluid().is(fluidBlacklist))
return 0;
if (allowedFluids != null&& !resource.getFluid().is(allowedFluids))
return 0;
if (!insertionAllowed) return 0;
return super.fill(resource, action);
}

View File

@@ -11,7 +11,7 @@ import net.minecraft.world.level.block.state.BlockState;
import net.minecraftforge.client.model.generators.ModelFile;
import static com.drmangotea.tfmg.content.engines.base.EngineBlock.ENGINE_STATE;
import static com.drmangotea.tfmg.content.engines.regular_engine.RegularEngineBlock.EXTENDED;
import static com.drmangotea.tfmg.content.engines.types.regular_engine.RegularEngineBlock.EXTENDED;
public class EngineGenerator extends SpecialBlockStateGen {
@@ -22,7 +22,7 @@ public class EngineGenerator extends SpecialBlockStateGen {
@Override
protected int getYRotation(BlockState state) {
return horizontalAngle(state.getValue(EngineBlock.HORIZONTAL_FACING).getOpposite());
return horizontalAngle(state.getValue(EngineBlock.SHAFT_FACING).getOpposite());
}

View File

@@ -1,9 +1,10 @@
package com.drmangotea.tfmg.content.engines.base;
import com.drmangotea.tfmg.content.decoration.pipes.TFMGPipes;
import com.drmangotea.tfmg.content.engines.regular_engine.PistonPosition;
import com.drmangotea.tfmg.content.engines.types.regular_engine.PistonPosition;
import com.drmangotea.tfmg.registry.TFMGBlocks;
import com.drmangotea.tfmg.registry.TFMGItems;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllItems;
import net.minecraft.world.item.crafting.Ingredient;
@@ -56,6 +57,22 @@ public class EngineProperties {
pistonPositions.add(new PistonPosition(0.5f,0.05f,0.3f,-90));
return pistonPositions;
}
public static List<PistonPosition> pistonsRadial(){
float i = 15/16f;
float f = 10/16f;
List<PistonPosition> pistonPositions = new ArrayList<>();
pistonPositions.add(new PistonPosition(0,i,0,0));
pistonPositions.add(new PistonPosition(0,f,-f,45));
pistonPositions.add(new PistonPosition(0,0,-i,90));
pistonPositions.add(new PistonPosition(0,-f,-f,135));
pistonPositions.add(new PistonPosition(0,-i,0,180));
pistonPositions.add(new PistonPosition(0,-f,f,225));
pistonPositions.add(new PistonPosition(0,0,i,270));
pistonPositions.add(new PistonPosition(0,f,f,315));
return pistonPositions;
}
//
//public static List<ItemStack> componentsW(){
@@ -84,5 +101,18 @@ public class EngineProperties {
return components;
}
public static List<Ingredient> turbineEngineComponents(){
List<Ingredient> components = new ArrayList<>();
components.add(Ingredient.of(AllBlocks.SHAFT.asStack()));
components.add(Ingredient.of(TFMGBlocks.STEEL_COGWHEEL.asStack()));
components.add(Ingredient.of(TFMGPipes.TFMG_PIPES.get(TFMGPipes.PipeMaterial.STEEL).get(0).asStack()));
components.add(Ingredient.of(TFMGPipes.TFMG_PIPES.get(TFMGPipes.PipeMaterial.STEEL).get(0).asStack()));
components.add(Ingredient.of(TFMGItems.STEEL_MECHANISM.asStack()));
components.add(Ingredient.of(TFMGItems.STEEL_MECHANISM.asStack()));
return components;
}
}

View File

@@ -1,5 +1,6 @@
package com.drmangotea.tfmg.content.engines.base;
import com.drmangotea.tfmg.content.engines.types.AbstractSmallEngineBlockEntity;
import com.mojang.blaze3d.vertex.PoseStack;
import com.simibubi.create.AllPartialModels;
import com.simibubi.create.content.kinetics.base.KineticBlockEntityRenderer;
@@ -13,14 +14,14 @@ import net.minecraft.world.level.block.state.BlockState;
import static com.drmangotea.tfmg.content.engines.base.EngineBlock.ENGINE_STATE;
import static com.simibubi.create.content.kinetics.base.HorizontalKineticBlock.HORIZONTAL_FACING;
public class EngineRenderer extends KineticBlockEntityRenderer<AbstractEngineBlockEntity> {
public class EngineRenderer extends KineticBlockEntityRenderer<AbstractSmallEngineBlockEntity> {
public EngineRenderer(BlockEntityRendererProvider.Context context) {
super(context);
}
@Override
protected void renderSafe(AbstractEngineBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer, int light, int overlay) {
protected void renderSafe(AbstractSmallEngineBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer, int light, int overlay) {
if(be.hasUpgrade()){
@@ -33,7 +34,7 @@ public class EngineRenderer extends KineticBlockEntityRenderer<AbstractEngineBlo
}
@Override
protected SuperByteBuffer getRotatedModel(AbstractEngineBlockEntity be, BlockState state) {
protected SuperByteBuffer getRotatedModel(AbstractSmallEngineBlockEntity be, BlockState state) {
return CachedBuffers.partialFacing(AllPartialModels.SHAFT_HALF, state,state.getValue(HORIZONTAL_FACING));
}
}

View File

@@ -32,6 +32,11 @@ public class EngineControllerBlock extends TFMGHorizontalDirectionalBlock implem
return InteractionResult.PASS;
}
@Override
public void onRemove(BlockState state, Level level, BlockPos pos, BlockState newState, boolean isMoving) {
IBE.onRemove(state, level, pos, newState);
}
@Override
public InteractionResult onWrenched(BlockState state, UseOnContext context) {
return onBlockEntityUse(context.getLevel(), context.getClickedPos(), be -> be.use(context.getPlayer()));

View File

@@ -3,6 +3,7 @@ package com.drmangotea.tfmg.content.engines.engine_controller;
import com.drmangotea.tfmg.TFMG;
import com.drmangotea.tfmg.base.TFMGUtils;
import com.drmangotea.tfmg.content.engines.base.AbstractEngineBlockEntity;
import com.drmangotea.tfmg.content.engines.types.AbstractSmallEngineBlockEntity;
import com.drmangotea.tfmg.content.engines.upgrades.TransmissionUpgrade;
import com.simibubi.create.AllItems;
import com.simibubi.create.api.equipment.goggles.IHaveGoggleInformation;
@@ -53,7 +54,7 @@ public class EngineControllerBlockEntity extends SmartBlockEntity implements IHa
public TransmissionUpgrade.TransmissionState shift = TransmissionUpgrade.TransmissionState.NEUTRAL;
public int accelerationRate = 0;
public AbstractEngineBlockEntity engine = null;
public AbstractSmallEngineBlockEntity engine = null;
public BlockPos enginePos = null;
public boolean engineStarted = false;
@@ -69,6 +70,8 @@ public class EngineControllerBlockEntity extends SmartBlockEntity implements IHa
public LerpedFloat clutchPedalMotion = LerpedFloat.linear();
public LerpedFloat gasPedalMotion = LerpedFloat.linear();
public LerpedFloat brakePedalMotion = LerpedFloat.linear();
public LerpedFloat fuelDial = LerpedFloat.angular();
public LerpedFloat rpmDial = LerpedFloat.angular();
public EngineControllerBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
super(type, pos, state);
@@ -92,6 +95,8 @@ public class EngineControllerBlockEntity extends SmartBlockEntity implements IHa
compound.putLong("EnginePos", enginePos.asLong());
compound.putString("Shift", shift.name());
compound.putBoolean("EngineStarted",engineStarted);
compound.put("FrequencyItems", frequencyItems.serializeNBT());
if (user != null)
@@ -102,9 +107,14 @@ public class EngineControllerBlockEntity extends SmartBlockEntity implements IHa
protected void read(CompoundTag compound, boolean clientPacket) {
super.read(compound, clientPacket);
enginePos = BlockPos.of(compound.getLong("EnginePos"));
engineStarted = compound.getBoolean("EngineStarted");
if(engineStarted&&accelerationRate==0)
accelerationRate =4;
frequencyItems.deserializeNBT(compound.getCompound("FrequencyItems"));
shift = TransmissionUpgrade.TransmissionState.valueOf(compound.getString("Shift"));
user = compound.hasUUID("User") ? compound.getUUID("User") : null;
updateEngine();
}
public void shiftForward() {
@@ -196,6 +206,12 @@ public class EngineControllerBlockEntity extends SmartBlockEntity implements IHa
}
@Override
public void remove() {
super.remove();
disconnectEngine();
}
@Override
public boolean addToGoggleTooltip(List<Component> tooltip, boolean isPlayerSneaking) {
@@ -232,8 +248,11 @@ public class EngineControllerBlockEntity extends SmartBlockEntity implements IHa
if (enginePos != null && (engine == null)) {
if (level.getBlockEntity(enginePos) instanceof AbstractEngineBlockEntity be)
if (level.getBlockEntity(enginePos) instanceof AbstractSmallEngineBlockEntity be) {
engine = be;
TFMG.LOGGER.debug("TICK");
engine.getControllerBE().highestSignal=4;
}
}
tickBraking();
@@ -260,13 +279,23 @@ public class EngineControllerBlockEntity extends SmartBlockEntity implements IHa
public void updateEngine() {
if (engine == null)
return;
TFMG.LOGGER.debug("Update Engine");
engine.highestSignal = accelerationRate;
engine.fuelInjectionRate = accelerationRate/15f;
engine.updateRotation();
TFMG.LOGGER.debug("Update Engine "+accelerationRate);
engine.getControllerBE().controlled = true;
engine.getControllerBE().highestSignal = accelerationRate;
engine.getControllerBE().fuelInjectionRate = engine.getControllerBE().highestSignal / 15f;
engine.getControllerBE().updateRotation();
}
public void disconnectEngine() {
if (engine == null)
return;
TFMG.LOGGER.debug("DISCONNECT");
engine.getControllerBE().highestSignal = 0;
engine.getControllerBE().controlled = false;
engine.getControllerBE().updateGeneratedRotation();
}
public void tickRendering() {
if (Minecraft.getInstance()
@@ -284,12 +313,17 @@ public class EngineControllerBlockEntity extends SmartBlockEntity implements IHa
transmissionLeverAngle.chase(shift == TransmissionUpgrade.TransmissionState.REVERSE ? -20 : (shift.value * 20), 0.25, LerpedFloat.Chaser.EXP);
fuelDial.chase(engine == null ? 0 : ((double) engine.getControllerBE().fuelTank.getFluidAmount() / (double) engine.fuelTank.getCapacity()) * 180f, 0.25, LerpedFloat.Chaser.EXP);
rpmDial.chase(engine == null ? 0 : ((double) engine.getControllerBE().rpm / 6000f) * 180f, 0.25, LerpedFloat.Chaser.EXP);
transmissionLeverAngle.tickChaser();
steeringWheelAngle.tickChaser();
clutchPedalMotion.tickChaser();
gasPedalMotion.tickChaser();
brakePedalMotion.tickChaser();
fuelDial.tickChaser();
rpmDial.tickChaser();
}
public boolean isPressed(int id) {
@@ -343,6 +377,7 @@ public class EngineControllerBlockEntity extends SmartBlockEntity implements IHa
private void stopUsing(Player player) {
TFMG.LOGGER.debug("STOP USING");
user = null;
if (player != null)
player.getPersistentData().remove("IsUsingEngineController");

View File

@@ -68,13 +68,41 @@ public class EngineControllerRenderer extends SafeBlockEntityRenderer<EngineCont
CachedBuffers.partial(TFMGPartialModels.TRANSMISSION_LEVER,state)
.center()
.rotateYDegrees(toYRot(facing))
.translateY(-4/16f)
//.translateZ(5/16f)
.rotateXDegrees(be.transmissionLeverAngle.getValue(partialTicks))
.uncenter()
.light(light)
.renderInto(ms, bufferSource.getBuffer(RenderType.solid()));
CachedBuffers.partial(TFMGPartialModels.ENGINE_CONTROLLER_DIAL, state)
.center()
.rotateYDegrees(toYRot(facing))
.rotateXDegrees(22.5f)
.translateX(2.5f/16f)
.translateZ(6.7f/16f)
.translateY(5.3f/16f)
.rotateZDegrees(be.fuelDial.getValue(partialTicks)-90)
.uncenter()
.light(light)
.renderInto(ms, bufferSource.getBuffer(RenderType.solid()));
CachedBuffers.partial(TFMGPartialModels.ENGINE_CONTROLLER_DIAL, state)
.center()
.rotateYDegrees(toYRot(facing))
.rotateXDegrees(22.5f)
.translateX(-2.5f/16f)
.translateZ(6.7f/16f)
.translateY(5.3f/16f)
.rotateZDegrees(be.rpmDial.getValue(partialTicks)-90)
.uncenter()
.light(light)
.renderInto(ms, bufferSource.getBuffer(RenderType.solid()));
ms.popPose();

View File

@@ -0,0 +1,652 @@
package com.drmangotea.tfmg.content.engines.types;
import com.drmangotea.tfmg.TFMG;
import com.drmangotea.tfmg.base.TFMGUtils;
import com.drmangotea.tfmg.content.engines.base.AbstractEngineBlockEntity;
import com.drmangotea.tfmg.content.engines.base.EngineComponentsInventory;
import com.drmangotea.tfmg.content.engines.base.EngineProperties;
import com.drmangotea.tfmg.content.engines.engine_controller.EngineControllerBlockEntity;
import com.drmangotea.tfmg.content.engines.upgrades.EnginePipingUpgrade;
import com.drmangotea.tfmg.content.engines.upgrades.EngineUpgrade;
import com.drmangotea.tfmg.content.engines.upgrades.TransmissionUpgrade;
import com.drmangotea.tfmg.registry.TFMGBlocks;
import com.drmangotea.tfmg.registry.TFMGFluids;
import com.drmangotea.tfmg.registry.TFMGItems;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.foundation.fluid.CombinedTankWrapper;
import com.simibubi.create.foundation.utility.CreateLang;
import net.minecraft.ChatFormatting;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.chat.Component;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource;
import net.minecraft.tags.TagKey;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.item.crafting.Ingredient;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.Fluid;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.capability.IFluidHandler;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import static com.drmangotea.tfmg.content.engines.base.EngineBlock.ENGINE_STATE;
import static com.drmangotea.tfmg.content.engines.base.EngineBlock.EngineState.NORMAL;
import static com.drmangotea.tfmg.content.engines.base.EngineBlock.EngineState.SHAFT;
import static com.drmangotea.tfmg.content.engines.base.EngineBlock.SHAFT_FACING;
import static com.simibubi.create.content.kinetics.base.HorizontalKineticBlock.HORIZONTAL_FACING;
public abstract class AbstractSmallEngineBlockEntity extends AbstractEngineBlockEntity {
public Optional<? extends EngineUpgrade> upgrade = Optional.empty();
int oil = 0;
int coolingFluid = 0;
public EngineComponentsInventory componentsInventory;
public BlockPos controller = getBlockPos();
public boolean connectNextTick = true;
public boolean delayedConnect = false;
public List<Long> engines = new ArrayList<>();
public int engineNumber = 0;
public AbstractSmallEngineBlockEntity(BlockEntityType<?> typeIn, BlockPos pos, BlockState state) {
super(typeIn, pos, state);
componentsInventory = new EngineComponentsInventory(this, EngineProperties.commonRegularComponents());
}
public int getFuelConsumption() {
if (getGeneratedSpeed() == 0)
return 0;
return (int) (12.5f * (1 / efficiencyModifier()) * getSpeedEfficiency() * fuelInjectionRate) * (engineLength() + 1);
}
public void detashEngines() {
//for (long id : engines) {
// BlockPos pos = BlockPos.of(id);
// if (level.getBlockEntity(pos) instanceof AbstractEngineBlockEntity be) {
// be.controller = be.getBlockPos();
// be.engineNumber = 0;
// be.refreshCapability();
// be.sendData();
// be.setChanged();
// }
//}
}
public void setBlockStates(AbstractSmallEngineBlockEntity be, BlockPos last) {
if (!be.isController()) {
level.setBlock(be.getBlockPos(), level.getBlockState(be.getBlockPos()).setValue(SHAFT_FACING, getBlockState().getValue(SHAFT_FACING).getOpposite()), 2);
}
}
public boolean hasAllComponents() {
if (level.getBlockEntity(controller) instanceof AbstractSmallEngineBlockEntity be) {
return be.nextComponent() == Ingredient.EMPTY;
}
return false;
}
public boolean hasUpgrade() {
return upgrade.isPresent();
}
@Override
public int voltageGeneration() {
if (upgrade.isPresent() && upgrade.get().getItem() == TFMGBlocks.GENERATOR.asItem())
return (int) (20 * (rpm / 3000));
return 0;
}
@Override
public int powerGeneration() {
if (upgrade.isPresent() && upgrade.get().getItem() == TFMGBlocks.GENERATOR.asItem())
return (int) rpm;
return 0;
}
@Override
public void lazyTick() {
super.lazyTick();
upgrade.ifPresent(engineUpgrade -> engineUpgrade.lazyTickUpgrade(this));
}
@Override
public void neighbourChanged() {
if (controller == null)
return;
super.neighbourChanged();
}
@Override
public void onLoad() {
super.onLoad();
if (this.hasUpgrade() && this.upgrade.get().getItem() == TFMGBlocks.INDUSTRIAL_PIPE.asItem()) {
((EnginePipingUpgrade) this.upgrade.get()).findTank(this);
}
}
@Override
protected void read(CompoundTag compound, boolean clientPacket) {
if (EngineUpgrade.getUpgrades().get(ItemStack.of(compound.getCompound("UpgradeItem")).getItem()) != null)
upgrade = Optional.of(EngineUpgrade.getUpgrades().get(ItemStack.of(compound.getCompound("UpgradeItem")).getItem()));
oil = compound.getInt("Oil");
coolingFluid = compound.getInt("CoolingFluid");
componentsInventory.deserializeNBT(compound.getCompound("Components"));
super.read(compound, clientPacket);
controller = BlockPos.of(compound.getLong("Controller"));
}
public int engineLength() {
return engines.size();
}
@Override
public boolean canWork() {
if (!nextComponent().isEmpty())
return false;
return super.canWork();
}
public Ingredient nextComponent() {
if (!isController())
return Ingredient.EMPTY;
for (int i = 0; i < componentsInventory.getSlots(); i++) {
if (componentsInventory.getStackInSlot(i).isEmpty()) {
return componentsInventory.components.get(i);
}
}
return Ingredient.EMPTY;
}
protected void analogSignalChanged() {
if (controller == null)
return;
if (controlled) {
fuelInjectionRate = highestSignal / 15f;
return;
}
getControllerBE().updateRotation();
getControllerBE().updateGeneratedRotation();
int newSignal = level.getBestNeighborSignal(getBlockPos());
signal = newSignal;
if (!isController()) {
if (level.getBlockEntity(controller) instanceof AbstractSmallEngineBlockEntity be) {
be.analogSignalChanged();
return;
}
}
for (long posLong : engines) {
BlockPos pos = BlockPos.of(posLong);
newSignal = Math.max(level.getBestNeighborSignal(pos), newSignal);
}
newSignal = Math.max(level.getBestNeighborSignal(controller), newSignal);
highestSignal = newSignal;
fuelInjectionRate = highestSignal / 15f;
updateRotation();
}
@Override
public IFluidHandler handlerForCapability() {
return isController() || getControllerBE() == this ? new CombinedTankWrapper(fuelTank, exhaustTank)
: getControllerBE().handlerForCapability();
}
@Override
protected void write(CompoundTag compound, boolean clientPacket) {
compound.putLong("Controller", controller.asLong());
if (controller != null) {
compound.putLong("ControllerPos", controller.asLong());
} else compound.remove("ControllerPos");
if (upgrade.isPresent())
compound.put("UpgradeItem", upgrade.get().getItem().getDefaultInstance().serializeNBT());
compound.put("Components", componentsInventory.serializeNBT());
compound.putInt("Oil", oil);
compound.putInt("CoolingFluid", coolingFluid);
super.write(compound, clientPacket);
}
public void updateRotation() {
if (!isController()) {
if (level.getBlockEntity(controller) instanceof AbstractSmallEngineBlockEntity be)
be.updateRotation();
return;
}
List<Long> allEngines = new ArrayList<>(engines);
allEngines.add(controller.asLong());
for (TagKey<Fluid> fluidTag : getSupportedFuels()) {
if (fuelTank.getFluid().getFluid().is(fluidTag)) {
if (!canWork()) {
allEngines.forEach(l -> {
BlockPos pos = BlockPos.of(l);
if (level.getBlockEntity(pos) instanceof AbstractEngineBlockEntity be) {
be.rpm = 0;
be.torque = 0;
be.updateGeneratedRotation();
}
});
return;
}
allEngines.forEach(l -> {
BlockPos pos = BlockPos.of(l);
if (level.getBlockEntity(pos) instanceof AbstractEngineBlockEntity be) {
be.rpm = 4000 * speedModifier() * fuelInjectionRate;
be.torque = 15 * torqueModifier() * fuelInjectionRate * engineLength();
be.updateGeneratedRotation();
}
});
return;
}
}
updateGeneratedRotation();
getAllEngines().forEach(l -> {
if (hasLevel())
if (level.getBlockEntity(BlockPos.of(l)) instanceof AbstractEngineBlockEntity be) {
be.updateGeneratedRotation();
}
});
}
@Override
public float getGeneratedSpeed() {
float speed;
if (getBlockState().getValue(ENGINE_STATE) != SHAFT)
return 0;
if (hasLevel())
if (level.getBlockEntity(controller) instanceof AbstractEngineBlockEntity controller) {
if (controller.fuelTank.isEmpty())
return 0;
if (!controller.canWork())
return 0;
speed = rpm / 40;
if (reverse)
speed = speed * -1;
return convertToDirection(Math.min((int) speed, 256), getBlockState().getValue(HORIZONTAL_FACING));
}
return 0;
}
@Override
public void tankUpdated(FluidStack stack) {
if (stack.getFluid().isSame(TFMGFluids.CARBON_DIOXIDE.get()) && stack.getAmount() >= exhaustTank.getSpace())
updateRotation();
super.tankUpdated(stack);
}
public boolean insertItem(ItemStack itemStack, boolean shifting, Player player, InteractionHand hand) {
Direction shaft_facing = getBlockState().getValue(SHAFT_FACING);
if (itemStack.is(AllBlocks.SHAFT.asItem()) && getBlockState().getValue(ENGINE_STATE) == NORMAL && !(level.getBlockEntity(getBlockPos().relative(shaft_facing)) instanceof AbstractEngineBlockEntity)) {
playInsertionSound();
level.setBlock(getBlockPos(), getBlockState().setValue(ENGINE_STATE, SHAFT), 2);
itemStack.shrink(1);
updateRotation();
setChanged();
sendData();
return true;
}
if (itemStack.is(TFMGItems.SCREWDRIVER.get())) {
for (int i = componentsInventory.components.size() - 1; i >= 0; i--) {
if (!componentsInventory.getItem(i).isEmpty()) {
dropItem(componentsInventory.getItem(i));
componentsInventory.setStackInSlot(i, ItemStack.EMPTY);
playRemovalSound();
updateRotation();
setChanged();
sendData();
return true;
}
}
}
if (itemStack.is(TFMGItems.COOLING_FLUID_BOTTLE.get())) {
if (level.getBlockEntity(controller) instanceof AbstractSmallEngineBlockEntity be) {
int toDrain = Math.min(2000 - coolingFluid, itemStack.getOrCreateTag().getInt("amount"));
itemStack.getOrCreateTag().putInt("amount", itemStack.getOrCreateTag().getInt("amount") - toDrain);
be.coolingFluid += toDrain;
level.playSound(null, getBlockPos(), SoundEvents.BUCKET_FILL, SoundSource.BLOCKS, 1f, 1f);
return true;
}
}
if (itemStack.is(TFMGItems.OIL_CAN.get())) {
if (level.getBlockEntity(controller) instanceof AbstractSmallEngineBlockEntity be) {
int toDrain = Math.min(2000 - oil, itemStack.getOrCreateTag().getInt("amount"));
itemStack.getOrCreateTag().putInt("amount", itemStack.getOrCreateTag().getInt("amount") - toDrain);
be.oil += toDrain;
level.playSound(null, getBlockPos(), SoundEvents.BUCKET_FILL, SoundSource.BLOCKS, 1f, 1f);
updateRotation();
return true;
}
}
if (itemStack.is(TFMGFluids.COOLING_FLUID.getBucket().get())) {
if (coolingFluid <= 1000) {
coolingFluid += 1000;
player.setItemInHand(hand, Items.BUCKET.getDefaultInstance());
level.playSound(null, getBlockPos(), SoundEvents.BUCKET_FILL, SoundSource.BLOCKS, 1f, 1f);
updateRotation();
return true;
}
}
if (itemStack.is(TFMGFluids.LUBRICATION_OIL.getBucket().get())) {
if (oil <= 1000) {
oil += 1000;
player.setItemInHand(hand, Items.BUCKET.getDefaultInstance());
level.playSound(null, getBlockPos(), SoundEvents.BUCKET_FILL, SoundSource.BLOCKS, 1f, 1f);
updateRotation();
return true;
}
}
if (EngineUpgrade.getUpgrades().containsKey(itemStack.getItem())) {
Optional<? extends EngineUpgrade> itemUpgrade = EngineUpgrade.getUpgrades().get(itemStack.getItem()).createUpgrade();
if (itemUpgrade.isPresent() && isUpgradeFirst(itemUpgrade.get())) {
upgrade = itemUpgrade;
playInsertionSound();
updateRotation();
upgrade.ifPresent(u -> u.updateUpgrade(this));
itemStack.shrink(1);
if (upgrade.isPresent())
if (upgrade.get() instanceof TransmissionUpgrade transmissionUpgrade) {
if (itemStack.getOrCreateTag().contains("Position") && itemStack.getOrCreateTag().get("Position") != null) {
BlockPos pos = BlockPos.of(itemStack.getOrCreateTag().getLong("Position"));
if (level.getBlockEntity(pos) instanceof EngineControllerBlockEntity engineControllerBE) {
this.getControllerBE().updateGeneratedRotation();
getControllerBE().controller = pos;
engineControllerBE.enginePos = this.getBlockPos();
TFMG.LOGGER.debug("INSERT ITEM");
getControllerBE().highestSignal = 0;
}
}
}
setChanged();
sendData();
return true;
}
}
if (!isController())
return false;
if (nextComponent().test(itemStack)) {
if (componentsInventory.insertItem(itemStack)) {
if (!itemStack.is(TFMGItems.SCREWDRIVER.get()))
itemStack.shrink(1);
playInsertionSound();
updateRotation();
setChanged();
sendData();
return true;
}
}
return false;
}
public List<AbstractSmallEngineBlockEntity> getEngines() {
List<AbstractSmallEngineBlockEntity> values = new ArrayList<>();
for (Long position : getAllEngines()) {
BlockPos pos = BlockPos.of(position);
if (level.getBlockEntity(pos) instanceof AbstractSmallEngineBlockEntity be)
values.add(be);
}
return values;
}
public boolean isController() {
if (controller == null)
controller = getBlockPos();
if (engineNumber == 0)
controller = getBlockPos();
return controller.equals(getBlockPos());
}
@Override
public boolean addToGoggleTooltip(List<Component> tooltip, boolean isPlayerSneaking) {
if (controller.asLong() == getBlockPos().asLong())
CreateLang.text("CONTROLLER").forGoggles(tooltip);
CreateLang.text("Speed Efficiency " + getSpeedEfficiency()).forGoggles(tooltip);
CreateLang.text("Efficiency " + efficiencyModifier()).forGoggles(tooltip);
CreateLang.text("Fuel Consumption " + getFuelConsumption()).forGoggles(tooltip);
CreateLang.text("Rpm " + rpm).forGoggles(tooltip);
CreateLang.text("length " + engineLength()).forGoggles(tooltip);
CreateLang.text("Torque " + torque).forGoggles(tooltip);
CreateLang.text("Injection Rate " + fuelInjectionRate).forGoggles(tooltip);
CreateLang.text("Signal " + highestSignal).forGoggles(tooltip);
CreateLang.number(engineNumber).style(ChatFormatting.DARK_GREEN).forGoggles(tooltip);
if (isController() && !nextComponent().isEmpty())
CreateLang.text(nextComponent().getItems()[0].getDisplayName().getString()).forGoggles(tooltip);
TFMGUtils.createFluidTooltip(this, tooltip);
return true;
}
public boolean isUpgradeFirst(EngineUpgrade itemUpgrade) {
for (AbstractSmallEngineBlockEntity be : getEngines()) {
if (be.upgrade.isPresent() && be.upgrade.get().getItem() == itemUpgrade.getItem())
return false;
}
return true;
}
public List<Long> getAllEngines() {
List<Long> list = new ArrayList<>(engines);
list.add(controller.asLong());
return list;
}
public AbstractSmallEngineBlockEntity getControllerBE() {
if (isController())
return this;
BlockEntity blockEntity = level.getBlockEntity(controller);
if (blockEntity instanceof AbstractSmallEngineBlockEntity)
return (AbstractSmallEngineBlockEntity) blockEntity;
return this;
}
@Override
public void tick() {
upgrade.ifPresent(engineUpgrade -> engineUpgrade.tickUpgrade(this));
if (connectNextTick) {
if (isController()) {
connect();
connectNextTick = false;
}
}
super.tick();
}
public void connect() {
Direction facing = getBlockState().getValue(HORIZONTAL_FACING);
Direction updateDirection = facing.getOpposite();
if (level.getBlockEntity(getBlockPos().relative(facing)) instanceof AbstractSmallEngineBlockEntity be && be.getBlockState().getBlock() == this.getBlockState().getBlock()) {
be.connect();
return;
}
TFMG.LOGGER.debug("CONNECT");
engines = new ArrayList<>();
for (int i = 0; i < getMaxLength(); i++) {
BlockPos pos = getBlockPos().relative(updateDirection, i);
if (level.getBlockEntity(pos) instanceof AbstractSmallEngineBlockEntity be) {
if (be.getBlockState().getValue(HORIZONTAL_FACING) != facing) {
return;
}
level.setBlock(be.getBlockPos(), be.getBlockState().setValue(SHAFT_FACING, be.getBlockPos() == this.getBlockPos() ? facing : updateDirection), 2);
//if (be instanceof RegularEngineBlockEntity be1 && this instanceof RegularEngineBlockEntity be2 && be1.type != be2.type) {
// setBlockStates(this, getBlockPos().relative(updateDirection, i - 1));
// TFMG.LOGGER.debug("set blockstates");
// return;
//}
be.detashEngines();
engines.add(pos.asLong());
// level.setBlock(be.getBlockPos().above(), Blocks.GOLD_BLOCK.defaultBlockState(),3);
be.engineNumber = i;
TFMG.LOGGER.debug("ADD " + be.engineNumber);
be.engines = new ArrayList<>();
be.controller = getBlockPos();
be.refreshCapability();
setBlockStates(be, null);
updateGeneratedRotation();
onUpdated();
be.sendData();
be.setChanged();
if (be.getBlockState().getValue(ENGINE_STATE) != NORMAL && i != 0) {
setBlockStates(this, getBlockPos().relative(updateDirection, i - 1));
break;
}
if (i == getMaxLength() - 1)
setBlockStates(this, getBlockPos().relative(updateDirection, i));
} else {
TFMG.LOGGER.debug("END");
setBlockStates(this, getBlockPos().relative(updateDirection, i - 1));
return;
}
}
updateGeneratedRotation();
updateRotation();
setChanged();
sendData();
}
@Override
public void remove() {
super.remove();
updateOthers();
}
public void updateOthers() {
if (!isController()) {
getControllerBE().connectNextTick = true;
}
Direction facing = getBlockState().getValue(HORIZONTAL_FACING);
for (Direction direction : Direction.values()) {
if (direction.getAxis() != facing.getAxis())
continue;
if (level.getBlockEntity(getBlockPos().relative(direction)) instanceof AbstractSmallEngineBlockEntity be) {
level.setBlockAndUpdate(be.getBlockPos(), be.getBlockState().setValue(SHAFT_FACING, direction.getOpposite()));
be.delayedConnect = true;
be.connectNextTick = true;
be.connect();
}
}
}
public float getUpgradeSpeedModifier() {
float modifier = 1;
for (AbstractSmallEngineBlockEntity be : getEngines()) {
if (be.upgrade.isPresent())
modifier *= be.upgrade.get().getSpeedModifier(this);
}
return modifier;
}
public float getUpgradeTorqueModifier() {
float modifier = 1;
for (AbstractSmallEngineBlockEntity be : getEngines()) {
if (be.upgrade.isPresent())
modifier *= be.upgrade.get().getTorqueModifier(this);
}
return modifier;
}
public float getUpgradeEfficiencyModifier() {
float modifier = 1;
for (AbstractSmallEngineBlockEntity be : getEngines()) {
if (be.upgrade.isPresent())
modifier *= be.upgrade.get().getEfficiencyModifier(this);
}
return modifier;
}
}

View File

@@ -0,0 +1,36 @@
package com.drmangotea.tfmg.content.engines.types.radial_engine;
import com.drmangotea.tfmg.content.engines.types.regular_engine.RegularEngineBlock;
import com.drmangotea.tfmg.content.engines.types.regular_engine.RegularEngineBlockEntity;
import com.drmangotea.tfmg.registry.TFMGBlockEntities;
import com.simibubi.create.foundation.block.IBE;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.level.LevelReader;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
public class RadialEngineBlock extends RegularEngineBlock {
public RadialEngineBlock(Properties properties) {
super(properties);
registerDefaultState(defaultBlockState().setValue(ENGINE_STATE, EngineState.SINGLE));
}
@Override
public boolean hasShaftTowards(LevelReader world, BlockPos pos, BlockState state, Direction face) {
//if(state.getValue(ENGINE_STATE)==EngineState.NORMAL)
// return false;
if(state.getValue(ENGINE_STATE)==EngineState.SINGLE)
return face.getAxis() == state.getValue(SHAFT_FACING).getAxis();
return face==state.getValue(SHAFT_FACING);
}
@Override
public BlockEntityType<? extends RegularEngineBlockEntity> getBlockEntityType() {
return TFMGBlockEntities.RADIAL_ENGINE.get();
}
}

View File

@@ -0,0 +1,82 @@
package com.drmangotea.tfmg.content.engines.types.radial_engine;
import com.drmangotea.tfmg.content.engines.base.AbstractEngineBlockEntity;
import com.drmangotea.tfmg.content.engines.types.AbstractSmallEngineBlockEntity;
import com.drmangotea.tfmg.content.engines.types.regular_engine.RegularEngineBlockEntity;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.AABB;
import static com.drmangotea.tfmg.content.engines.base.EngineBlock.ENGINE_STATE;
import static com.drmangotea.tfmg.content.engines.base.EngineBlock.EngineState.*;
import static com.drmangotea.tfmg.content.engines.base.EngineBlock.SHAFT_FACING;
import static com.simibubi.create.content.kinetics.base.HorizontalKineticBlock.HORIZONTAL_FACING;
public class RadialEngineBlockEntity extends RegularEngineBlockEntity {
public RadialEngineBlockEntity(BlockEntityType<?> typeIn, BlockPos pos, BlockState state) {
super(typeIn, pos, state);
}
@Override
public float getGeneratedSpeed() {
float speed;
if (hasLevel())
if (level.getBlockEntity(controller) instanceof AbstractEngineBlockEntity controller) {
if (controller.fuelTank.isEmpty())
return 0;
if (!controller.canWork())
return 0;
speed = rpm / 40;
if (reverse)
speed = speed * -1;
return convertToDirection(Math.min((int) speed, 256), getBlockState().getValue(HORIZONTAL_FACING));
}
return 0;
}
@Override
public AABB getRenderBoundingBox() {
return new AABB(getBlockPos()).inflate(1);
}
@Override
public EngineType getDefaultEngineType() {
return EngineType.RADIAL;
}
public void setBlockStates(AbstractSmallEngineBlockEntity be, BlockPos last) {
Direction facing = getBlockState().getValue(SHAFT_FACING).getOpposite();
if(level.getBlockState(getBlockPos().relative(facing)).getBlock()!=this.getBlockState().getBlock()&&level.getBlockState(getBlockPos().relative(facing.getOpposite())).getBlock()!=this.getBlockState().getBlock()){
level.setBlock(getBlockPos(), level.getBlockState(getBlockPos()).setValue(ENGINE_STATE, SINGLE), 2);
return;
}
//if(level.getBlockState(getBlockPos().relative(facing.getOpposite())).getBlock()!=this.getBlockState().getBlock()&&isController()){
// level.setBlock(getBlockPos(), level.getBlockState(getBlockPos()).setValue(ENGINE_STATE, SINGLE), 2);
// return;
//}
if(last!=null){
level.setBlock(last, level.getBlockState(last).setValue(ENGINE_STATE, BACK), 2);
return;
}
if (be.isController()) {
level.setBlock(be.getBlockPos(), be.getBlockState().setValue(ENGINE_STATE, SHAFT), 2);
} else {
level.setBlock(be.getBlockPos(), be.getBlockState().setValue(SHAFT_FACING, getBlockState().getValue(SHAFT_FACING).getOpposite()).setValue(ENGINE_STATE, NORMAL), 2);
}
}
}

View File

@@ -1,4 +1,4 @@
package com.drmangotea.tfmg.content.engines.regular_engine;
package com.drmangotea.tfmg.content.engines.types.regular_engine;
public class PistonPosition {

View File

@@ -1,8 +1,9 @@
package com.drmangotea.tfmg.content.engines.regular_engine;
package com.drmangotea.tfmg.content.engines.types.regular_engine;
import com.drmangotea.tfmg.content.electricity.base.IElectric;
import com.drmangotea.tfmg.content.engines.base.AbstractEngineBlockEntity;
import com.drmangotea.tfmg.content.engines.base.EngineBlock;
import com.drmangotea.tfmg.content.engines.types.AbstractSmallEngineBlockEntity;
import com.drmangotea.tfmg.registry.TFMGBlockEntities;
import com.drmangotea.tfmg.registry.TFMGItems;
import com.simibubi.create.foundation.block.IBE;
@@ -39,7 +40,7 @@ public class RegularEngineBlock extends EngineBlock implements IBE<RegularEngine
ItemStack itemStack = player.getItemInHand(hand);
if (level.getBlockEntity(pos) instanceof RegularEngineBlockEntity be && !be.isController() && level.getBlockEntity(be.controller) instanceof AbstractEngineBlockEntity controller) {
if (level.getBlockEntity(pos) instanceof RegularEngineBlockEntity be && !be.isController() && level.getBlockEntity(be.controller) instanceof AbstractSmallEngineBlockEntity controller) {
if (controller.nextComponent().test(itemStack))
if (controller.componentsInventory.insertItem(itemStack)) {
if (!itemStack.is(TFMGItems.SCREWDRIVER.get()))

View File

@@ -1,10 +1,9 @@
package com.drmangotea.tfmg.content.engines.regular_engine;
package com.drmangotea.tfmg.content.engines.types.regular_engine;
import com.drmangotea.tfmg.TFMG;
import com.drmangotea.tfmg.content.engines.base.AbstractEngineBlockEntity;
import com.drmangotea.tfmg.content.engines.fuels.FuelType;
import com.drmangotea.tfmg.content.engines.types.AbstractSmallEngineBlockEntity;
import com.drmangotea.tfmg.registry.TFMGItems;
import com.drmangotea.tfmg.registry.TFMGTags;
import com.simibubi.create.AllItems;
import com.simibubi.create.AllSoundEvents;
import com.simibubi.create.foundation.item.SmartInventory;
@@ -12,18 +11,13 @@ import com.simibubi.create.foundation.item.SmartInventory;
import com.simibubi.create.foundation.utility.CreateLang;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.core.registries.Registries;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource;
import net.minecraft.tags.TagKey;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.crafting.Ingredient;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.Fluid;
@@ -31,18 +25,16 @@ import net.minecraftforge.registries.ForgeRegistries;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import static com.drmangotea.tfmg.content.engines.base.EngineProperties.*;
import static com.drmangotea.tfmg.content.engines.regular_engine.RegularEngineBlock.EXTENDED;
import static com.drmangotea.tfmg.registry.TFMGTags.forgeFluidTag;
import static com.drmangotea.tfmg.content.engines.types.regular_engine.RegularEngineBlock.EXTENDED;
import static com.drmangotea.tfmg.registry.TFMGTags.optionalTag;
import static com.simibubi.create.content.kinetics.base.HorizontalKineticBlock.HORIZONTAL_FACING;
public class RegularEngineBlockEntity extends AbstractEngineBlockEntity {
public class RegularEngineBlockEntity extends AbstractSmallEngineBlockEntity {
public EngineType type = EngineType.I;
public EngineType type = getDefaultEngineType();
public SmartInventory pistonInventory;
@@ -56,6 +48,10 @@ public class RegularEngineBlockEntity extends AbstractEngineBlockEntity {
}
public EngineType getDefaultEngineType(){
return EngineType.I;
}
public void updateInventory() {
pistonInventory = createInventory();
}
@@ -115,8 +111,8 @@ public class RegularEngineBlockEntity extends AbstractEngineBlockEntity {
for (Long position : controller.getAllEngines()) {
if (level.getBlockEntity(BlockPos.of(position)) instanceof RegularEngineBlockEntity be) {
for(int i =0;i<be.pistonInventory.getSlots();i++){
if(be.pistonInventory.getItem(i).isEmpty()) {
for (int i = 0; i < be.pistonInventory.getSlots(); i++) {
if (be.pistonInventory.getItem(i).isEmpty()) {
return false;
}
}
@@ -133,15 +129,17 @@ public class RegularEngineBlockEntity extends AbstractEngineBlockEntity {
if (itemStack.is(AllItems.EMPTY_SCHEMATIC.get())) {
boolean next = false;
TFMG.LOGGER.debug("INSERT");
if (type == EngineType.BOXER) {
updateEngineType(EngineType.I);
if (level.getBlockEntity(controller) instanceof RegularEngineBlockEntity be)
be.updateEngineType(EngineType.I);
AllSoundEvents.CONFIRM.play(level, null, getBlockPos(), 1, 1);
return true;
}
for (EngineType engineType : EngineType.values()) {
if (next) {
updateEngineType(engineType);
if (level.getBlockEntity(controller) instanceof RegularEngineBlockEntity be)
be.updateEngineType(engineType);
AllSoundEvents.CONFIRM.play(level, null, getBlockPos(), 1, 1);
return true;
}
@@ -196,7 +194,7 @@ public class RegularEngineBlockEntity extends AbstractEngineBlockEntity {
}
if (nextComponent().test(itemStack) && !isController()) {
if (level.getBlockEntity(controller) instanceof AbstractEngineBlockEntity be) {
if (level.getBlockEntity(controller) instanceof AbstractSmallEngineBlockEntity be) {
return be.insertItem(itemStack, shifting, player, hand);
}
@@ -248,7 +246,7 @@ public class RegularEngineBlockEntity extends AbstractEngineBlockEntity {
public boolean updateEngineType(EngineType newType) {
Direction updateDirection = getBlockState().getValue(HORIZONTAL_FACING).getAxis() == Direction.Axis.X ? Direction.WEST : Direction.NORTH;
Direction updateDirection = getBlockState().getValue(HORIZONTAL_FACING);
if (level.getBlockEntity(getBlockPos().relative(updateDirection)) instanceof RegularEngineBlockEntity be) {
return be.updateEngineType(newType);
}
@@ -294,17 +292,17 @@ public class RegularEngineBlockEntity extends AbstractEngineBlockEntity {
@Override
public float efficiencyModifier() {
return type.effeciencyModifier * getFuelType().getEfficiency()*getUpgradeEfficiencyModifier();
return type.effeciencyModifier * getFuelType().getEfficiency() * getUpgradeEfficiencyModifier();
}
@Override
public float speedModifier() {
return type.speedModifier * getFuelType().getSpeed()*getUpgradeSpeedModifier();
return type.speedModifier * getFuelType().getSpeed() * getUpgradeSpeedModifier();
}
@Override
public float torqueModifier() {
return type.torqueModifier * getFuelType().getStress()*getUpgradeTorqueModifier();
return type.torqueModifier * getFuelType().getStress() * getUpgradeTorqueModifier();
}
@Override
@@ -329,11 +327,12 @@ public class RegularEngineBlockEntity extends AbstractEngineBlockEntity {
}
public enum EngineType {
I("engine_i", pistonsI(), 1, 1, 1,true),
I("engine_i", pistonsI(), 1, 1, 1, true),
V("engine_v", pistonsV(), 1.2f, 1.3f, 0.8f),
W("engine_w", pistonsW(), 1.3f, 1.1f, 0.5f),
U("engine_u", pistonsU(), 1, 1.5f, 0.9f,true),
BOXER("engine_boxer", pistonsBoxer(), 1, 0.8f, 1.2f);
U("engine_u", pistonsU(), 1, 1.5f, 0.9f, true),
BOXER("engine_boxer", pistonsBoxer(), 1, 0.8f, 1.2f),
RADIAL("radial", pistonsRadial(), 1, 0.8f, 1.2f);
public final float speedModifier;
public final float torqueModifier;
public final float effeciencyModifier;
@@ -344,16 +343,16 @@ public class RegularEngineBlockEntity extends AbstractEngineBlockEntity {
EngineType(String name, List<PistonPosition> positions, float speedModifier,
float torqueModifier, float efficiencyModifier, boolean upgradesOnSide) {
this(name, positions, speedModifier, torqueModifier, efficiencyModifier,upgradesOnSide, new ArrayList<>());
this(name, positions, speedModifier, torqueModifier, efficiencyModifier, upgradesOnSide, new ArrayList<>());
}
EngineType(String name, List<PistonPosition> positions, float speedModifier,
float torqueModifier, float efficiencyModifier) {
this(name, positions, speedModifier, torqueModifier, efficiencyModifier,false, new ArrayList<>());
this(name, positions, speedModifier, torqueModifier, efficiencyModifier, false, new ArrayList<>());
}
EngineType(String name, List<PistonPosition> positions, float speedModifier,
float torqueModifier, float efficiencyModifier,boolean upgradesOnSide , List<Fluid> fluidBlacklist) {
float torqueModifier, float efficiencyModifier, boolean upgradesOnSide, List<Fluid> fluidBlacklist) {
this.name = name;
this.pistons = positions;
this.speedModifier = speedModifier;

View File

@@ -1,11 +1,12 @@
package com.drmangotea.tfmg.content.engines.regular_engine;
package com.drmangotea.tfmg.content.engines.types.regular_engine;
import com.drmangotea.tfmg.content.engines.base.AbstractEngineBlockEntity;
import com.drmangotea.tfmg.content.engines.base.EngineBlock;
import com.drmangotea.tfmg.content.engines.base.EngineRenderer;
import com.drmangotea.tfmg.content.engines.types.AbstractSmallEngineBlockEntity;
import com.drmangotea.tfmg.registry.TFMGPartialModels;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import dev.engine_room.flywheel.lib.model.baked.PartialModel;
import net.createmod.catnip.render.CachedBuffers;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.RenderType;
@@ -13,9 +14,7 @@ import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
import net.minecraft.core.Direction;
import net.minecraft.world.level.block.state.BlockState;
import static com.drmangotea.tfmg.content.engines.base.EngineBlock.ENGINE_STATE;
import static com.simibubi.create.content.kinetics.base.HorizontalKineticBlock.HORIZONTAL_FACING;
import static net.minecraft.world.level.block.HorizontalDirectionalBlock.FACING;
public class RegularEngineRenderer extends EngineRenderer {
public RegularEngineRenderer(BlockEntityRendererProvider.Context context) {
@@ -23,7 +22,7 @@ public class RegularEngineRenderer extends EngineRenderer {
}
@Override
protected void renderSafe(AbstractEngineBlockEntity be1, float partialTicks, PoseStack ms, MultiBufferSource buffer, int light, int overlay) {
protected void renderSafe(AbstractSmallEngineBlockEntity be1, float partialTicks, PoseStack ms, MultiBufferSource buffer, int light, int overlay) {
RegularEngineBlockEntity be = (RegularEngineBlockEntity) be1;
BlockState blockState = be.getBlockState();
@@ -36,7 +35,7 @@ public class RegularEngineRenderer extends EngineRenderer {
if (be.type.pistons.size() == be.pistonInventory.getSlots())
ms.pushPose();
if (!be.pistonInventory.getStackInSlot(i).isEmpty())
CachedBuffers.partial(be.type == RegularEngineBlockEntity.EngineType.I || be.type == RegularEngineBlockEntity.EngineType.U || be.type == RegularEngineBlockEntity.EngineType.BOXER ? TFMGPartialModels.SMALL_CYLINDER : TFMGPartialModels.CYLINDER, blockState)
CachedBuffers.partial(getCylinderModel(be), blockState)
.center()
.light(light)
.rotateYDegrees(blockState.getValue(HORIZONTAL_FACING).getAxis() == Direction.Axis.Z ? 0 : 90)
@@ -51,4 +50,14 @@ public class RegularEngineRenderer extends EngineRenderer {
super.renderSafe(be1, partialTicks, ms, buffer, light, overlay);
}
private PartialModel getCylinderModel(RegularEngineBlockEntity be){
return switch (be.type){
case I, U, BOXER -> TFMGPartialModels.SMALL_CYLINDER;
case V, W -> TFMGPartialModels.CYLINDER;
case RADIAL -> TFMGPartialModels.RADIAL_ENGINE_CYLINDER;
};
}
}

View File

@@ -0,0 +1,39 @@
package com.drmangotea.tfmg.content.engines.types.turbine_engine;
import com.drmangotea.tfmg.content.electricity.base.IElectric;
import com.drmangotea.tfmg.content.engines.base.EngineBlock;
import com.drmangotea.tfmg.registry.TFMGBlockEntities;
import com.simibubi.create.foundation.block.IBE;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.LevelReader;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
public class TurbineEngineBlock extends EngineBlock implements IBE<TurbineEngineBlockEntity> {
public TurbineEngineBlock(Properties properties) {
super(properties);
}
@Override
public void onPlace(BlockState pState, Level level, BlockPos pos, BlockState pOldState, boolean pIsMoving) {
withBlockEntityDo(level, pos, IElectric::onPlaced);
}
@Override
public void onRemove(BlockState state, Level level, BlockPos pos, BlockState newState, boolean isMoving) {
IBE.onRemove(state, level, pos, newState);
}
@Override
public boolean hasShaftTowards(LevelReader world, BlockPos pos, BlockState state, Direction face) {
return face==state.getValue(SHAFT_FACING)&&state.getValue(ENGINE_STATE)==EngineState.BACK;
}
@Override
public Class<TurbineEngineBlockEntity> getBlockEntityClass() {
return TurbineEngineBlockEntity.class;
}
@Override
public BlockEntityType<? extends TurbineEngineBlockEntity> getBlockEntityType() {
return TFMGBlockEntities.TURBINE_ENGINE.get();
}
}

View File

@@ -0,0 +1,208 @@
package com.drmangotea.tfmg.content.engines.types.turbine_engine;
import com.drmangotea.tfmg.content.engines.base.AbstractEngineBlockEntity;
import com.drmangotea.tfmg.content.engines.base.EngineBlock;
import com.drmangotea.tfmg.content.engines.base.EngineComponentsInventory;
import com.drmangotea.tfmg.content.engines.base.EngineProperties;
import com.drmangotea.tfmg.content.engines.types.AbstractSmallEngineBlockEntity;
import com.drmangotea.tfmg.content.engines.types.regular_engine.RegularEngineBlockEntity;
import com.drmangotea.tfmg.registry.TFMGItems;
import com.drmangotea.tfmg.registry.TFMGTags;
import com.simibubi.create.AllItems;
import com.simibubi.create.AllSoundEvents;
import com.simibubi.create.foundation.item.SmartInventory;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.tags.TagKey;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.Fluid;
import java.util.List;
import static com.drmangotea.tfmg.content.engines.base.EngineBlock.ENGINE_STATE;
import static com.drmangotea.tfmg.content.engines.base.EngineBlock.EngineState.*;
import static com.drmangotea.tfmg.content.engines.base.EngineBlock.SHAFT_FACING;
import static com.simibubi.create.content.kinetics.base.HorizontalKineticBlock.HORIZONTAL_FACING;
public class TurbineEngineBlockEntity extends AbstractSmallEngineBlockEntity {
public SmartInventory turbineBladeInventory;
public TurbineEngineBlockEntity(BlockEntityType<?> typeIn, BlockPos pos, BlockState state) {
super(typeIn, pos, state);
componentsInventory = new EngineComponentsInventory(this, EngineProperties.turbineEngineComponents());
turbineBladeInventory = createInventory();
}
public SmartInventory createInventory() {
return new SmartInventory(4, this)
.withMaxStackSize(1)
.whenContentsChanged(this::onInventoryChanged);
}
public void updateInventory() {
turbineBladeInventory = createInventory();
}
@Override
public boolean canWork() {
if (level.getBlockEntity(controller) instanceof TurbineEngineBlockEntity controller) {
for (Long position : controller.getAllEngines()) {
if (level.getBlockEntity(BlockPos.of(position)) instanceof TurbineEngineBlockEntity be) {
for(int i =0;i<be.turbineBladeInventory.getSlots();i++){
if(be.turbineBladeInventory.getItem(i).isEmpty()) {
return false;
}
}
}
}
return super.canWork();
}
return false;
}
private void onInventoryChanged(int integer) {
updateRotation();
sendData();
setChanged();
}
@Override
public boolean insertItem(ItemStack itemStack, boolean shifting, Player player, InteractionHand hand) {
if (itemStack.is(TFMGItems.SCREWDRIVER.get())) {
if (!turbineBladeInventory.isEmpty()) {
for (int i = 0; i < turbineBladeInventory.getSlots(); i++) {
if (!turbineBladeInventory.getItem(i).isEmpty()) {
dropItem(turbineBladeInventory.getItem(i));
turbineBladeInventory.setItem(i, ItemStack.EMPTY);
playRemovalSound();
updateRotation();
setChanged();
sendData();
return true;
}
}
}
for (int i = componentsInventory.components.size() - 1; i >= 0; i--) {
if (!componentsInventory.getItem(i).isEmpty()) {
dropItem(componentsInventory.getItem(i));
componentsInventory.setItem(i, ItemStack.EMPTY);
playRemovalSound();
updateRotation();
setChanged();
sendData();
return true;
}
}
}
if (hasAllComponents())
if (itemStack.is(TFMGItems.TURBINE_BLADE.get())) {
for (int i = turbineBladeInventory.getSlots() - 1; i >= 0; i--) {
if (turbineBladeInventory.getItem(i).isEmpty()) {
ItemStack toInsert = itemStack.copy();
toInsert.setCount(1);
turbineBladeInventory.setItem(i, toInsert);
itemStack.shrink(1);
playInsertionSound();
updateRotation();
setChanged();
sendData();
return true;
}
}
}
if (nextComponent().test(itemStack) && !isController()) {
if (level.getBlockEntity(controller) instanceof AbstractSmallEngineBlockEntity be) {
return be.insertItem(itemStack, shifting, player, hand);
}
}
return super.insertItem(itemStack, shifting, player, hand);
}
@Override
public float getGeneratedSpeed() {
float speed;
if (hasLevel())
if (level.getBlockEntity(controller) instanceof AbstractEngineBlockEntity controller) {
if (controller.fuelTank.isEmpty())
return 0;
if (!controller.canWork())
return 0;
speed = rpm / 40;
if (reverse)
speed = speed * -1;
return convertToDirection(Math.min((int) speed, 256), getBlockState().getValue(HORIZONTAL_FACING));
}
return 0;
}
@Override
protected void write(CompoundTag compound, boolean clientPacket) {
super.write(compound, clientPacket);
compound.put("TurbineBlades", turbineBladeInventory.serializeNBT());
}
@Override
protected void read(CompoundTag compound, boolean clientPacket) {
super.read(compound, clientPacket);
turbineBladeInventory.deserializeNBT(compound.getCompound("TurbineBlades"));
}
public void setBlockStates(AbstractSmallEngineBlockEntity be, BlockPos last) {
if(last!=null){
level.setBlock(last, level.getBlockState(last).setValue(ENGINE_STATE, BACK), 2);
return;
}
if (be.isController()) {
level.setBlock(be.getBlockPos(), be.getBlockState().setValue(ENGINE_STATE, SHAFT), 2);
} else {
level.setBlock(be.getBlockPos(), be.getBlockState().setValue(SHAFT_FACING, getBlockState().getValue(SHAFT_FACING).getOpposite()).setValue(ENGINE_STATE, NORMAL), 2);
}
}
@Override
public List<TagKey<Fluid>> getSupportedFuels() {
return List.of(TFMGTags.TFMGFluidTags.KEROSENE.tag);
}
@Override
public float efficiencyModifier() {
return getFuelType().getEfficiency() * getUpgradeEfficiencyModifier();
}
@Override
public float speedModifier() {
return getFuelType().getSpeed() * getUpgradeSpeedModifier();
}
@Override
public float torqueModifier() {
return getFuelType().getStress() * getUpgradeTorqueModifier();
}
@Override
public String engineId() {
return "turbine";
}
}

View File

@@ -0,0 +1,43 @@
package com.drmangotea.tfmg.content.engines.types.turbine_engine;
import com.drmangotea.tfmg.TFMG;
import com.drmangotea.tfmg.content.engines.base.EngineBlock;
import com.simibubi.create.foundation.data.SpecialBlockStateGen;
import com.tterrag.registrate.providers.DataGenContext;
import com.tterrag.registrate.providers.RegistrateBlockstateProvider;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraftforge.client.model.generators.ModelFile;
import static com.drmangotea.tfmg.content.engines.base.EngineBlock.ENGINE_STATE;
import static com.drmangotea.tfmg.content.engines.types.regular_engine.RegularEngineBlock.EXTENDED;
public class TurbineEngineGenerator extends SpecialBlockStateGen {
@Override
protected int getXRotation(BlockState state) {
return 0;
}
@Override
protected int getYRotation(BlockState state) {
return horizontalAngle(state.getValue(EngineBlock.SHAFT_FACING).getOpposite());
}
@Override
public <T extends Block> ModelFile getModel(DataGenContext<Block, T> ctx, RegistrateBlockstateProvider prov,
BlockState state) {
String path = "block/" +ctx.getName()+"/block_"
+ state.getValue(ENGINE_STATE).getSerializedName();
return prov.models()
.getExistingFile(TFMG.asResource(path));
}
}

View File

@@ -2,7 +2,8 @@ package com.drmangotea.tfmg.content.engines.upgrades;
import com.drmangotea.tfmg.TFMG;
import com.drmangotea.tfmg.content.engines.base.AbstractEngineBlockEntity;
import com.drmangotea.tfmg.content.engines.types.AbstractSmallEngineBlockEntity;
import com.drmangotea.tfmg.registry.TFMGBlocks;
import com.simibubi.create.content.fluids.tank.FluidTankBlockEntity;
import net.minecraft.core.BlockPos;
@@ -19,7 +20,7 @@ public class EnginePipingUpgrade extends EngineUpgrade {
public Optional<FluidTankBlockEntity> tank = Optional.empty();
public void findTank(AbstractEngineBlockEntity be) {
public void findTank(AbstractSmallEngineBlockEntity be) {
Level level = be.getLevel();
for (Direction direction : Direction.values()) {
@@ -34,16 +35,16 @@ public class EnginePipingUpgrade extends EngineUpgrade {
}
@Override
public void updateUpgrade(AbstractEngineBlockEntity be) {
public void updateUpgrade(AbstractSmallEngineBlockEntity be) {
findTank(be);
}
@Override
public void lazyTickUpgrade(AbstractEngineBlockEntity engine) {
public void lazyTickUpgrade(AbstractSmallEngineBlockEntity engine) {
if (tank.isPresent()) {
AbstractEngineBlockEntity controller = engine.getControllerBE();
AbstractSmallEngineBlockEntity controller = engine.getControllerBE();
FluidTankBlockEntity tankBE = tank.get();
int maxOutput = tankBE.getTankInventory().drain(500, IFluidHandler.FluidAction.SIMULATE).getAmount();

View File

@@ -1,6 +1,6 @@
package com.drmangotea.tfmg.content.engines.upgrades;
import com.drmangotea.tfmg.content.engines.base.AbstractEngineBlockEntity;
import com.drmangotea.tfmg.content.engines.types.AbstractSmallEngineBlockEntity;
import com.drmangotea.tfmg.registry.TFMGBlocks;
import com.drmangotea.tfmg.registry.TFMGItems;
import com.mojang.blaze3d.vertex.PoseStack;
@@ -21,21 +21,21 @@ public abstract class EngineUpgrade {
public abstract Optional<? extends EngineUpgrade> createUpgrade();
public void tickUpgrade(AbstractEngineBlockEntity engine) {}
public void lazyTickUpgrade(AbstractEngineBlockEntity engine) {}
public void render(AbstractEngineBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer, int light) {}
public float getTorqueModifier(AbstractEngineBlockEntity engine) {
public void tickUpgrade(AbstractSmallEngineBlockEntity engine) {}
public void lazyTickUpgrade(AbstractSmallEngineBlockEntity engine) {}
public void render(AbstractSmallEngineBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer, int light) {}
public float getTorqueModifier(AbstractSmallEngineBlockEntity engine) {
return 1;
}
public void updateUpgrade(AbstractEngineBlockEntity be ){}
public void updateUpgrade(AbstractSmallEngineBlockEntity be ){}
public abstract Item getItem();
public float getSpeedModifier(AbstractEngineBlockEntity engine) {
public float getSpeedModifier(AbstractSmallEngineBlockEntity engine) {
return 1;
}
public float getEfficiencyModifier(AbstractEngineBlockEntity engine) {
public float getEfficiencyModifier(AbstractSmallEngineBlockEntity engine) {
return 1;
}

View File

@@ -1,7 +1,7 @@
package com.drmangotea.tfmg.content.engines.upgrades;
import com.drmangotea.tfmg.content.engines.base.AbstractEngineBlockEntity;
import com.drmangotea.tfmg.content.engines.regular_engine.RegularEngineBlockEntity;
import com.drmangotea.tfmg.content.engines.types.AbstractSmallEngineBlockEntity;
import com.drmangotea.tfmg.content.engines.types.regular_engine.RegularEngineBlockEntity;
import com.drmangotea.tfmg.registry.TFMGBlocks;
import com.drmangotea.tfmg.registry.TFMGPartialModels;
import com.mojang.blaze3d.vertex.PoseStack;
@@ -23,7 +23,7 @@ public class GeneratorEngineUpgrade extends EngineUpgrade {
}
@Override
public void render(AbstractEngineBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer, int light) {
public void render(AbstractSmallEngineBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer, int light) {
@@ -56,7 +56,7 @@ public class GeneratorEngineUpgrade extends EngineUpgrade {
}
@Override
public float getTorqueModifier(AbstractEngineBlockEntity engine) {
public float getTorqueModifier(AbstractSmallEngineBlockEntity engine) {
return 0.7f;
}
}

View File

@@ -1,8 +1,7 @@
package com.drmangotea.tfmg.content.engines.upgrades;
import com.drmangotea.tfmg.TFMG;
import com.drmangotea.tfmg.content.engines.base.AbstractEngineBlockEntity;
import com.drmangotea.tfmg.content.engines.regular_engine.RegularEngineBlockEntity;
import com.drmangotea.tfmg.content.engines.types.AbstractSmallEngineBlockEntity;
import com.drmangotea.tfmg.content.engines.types.regular_engine.RegularEngineBlockEntity;
import com.drmangotea.tfmg.registry.TFMGItems;
import com.drmangotea.tfmg.registry.TFMGPartialModels;
import dev.engine_room.flywheel.lib.model.baked.PartialModel;
@@ -40,7 +39,7 @@ public class GoldenTurboUpgradeData extends EngineUpgrade {
}
@Override
public void tickUpgrade(AbstractEngineBlockEntity engine) {
public void tickUpgrade(AbstractSmallEngineBlockEntity engine) {
if (!engine.getLevel().isClientSide)
return;
speed.chase(engine.rpm / 200, 1 / 128f, LerpedFloat.Chaser.EXP);
@@ -49,7 +48,7 @@ public class GoldenTurboUpgradeData extends EngineUpgrade {
@Override
public void render(AbstractEngineBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer, int light) {
public void render(AbstractSmallEngineBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer, int light) {
angle+=be.rpm/500f;
angle %= 360;
@@ -84,7 +83,7 @@ public class GoldenTurboUpgradeData extends EngineUpgrade {
}
@Override
public float getTorqueModifier(AbstractEngineBlockEntity engine) {
public float getTorqueModifier(AbstractSmallEngineBlockEntity engine) {
return 1.4f;
}
@@ -94,7 +93,7 @@ public class GoldenTurboUpgradeData extends EngineUpgrade {
}
@Override
public float getSpeedModifier(AbstractEngineBlockEntity engine) {
public float getSpeedModifier(AbstractSmallEngineBlockEntity engine) {
return 1.3f;
}

View File

@@ -1,8 +1,7 @@
package com.drmangotea.tfmg.content.engines.upgrades;
import com.drmangotea.tfmg.TFMG;
import com.drmangotea.tfmg.content.engines.base.AbstractEngineBlockEntity;
import com.drmangotea.tfmg.content.engines.regular_engine.RegularEngineBlockEntity;
import com.drmangotea.tfmg.content.engines.types.AbstractSmallEngineBlockEntity;
import com.drmangotea.tfmg.content.engines.types.regular_engine.RegularEngineBlockEntity;
import com.drmangotea.tfmg.registry.TFMGItems;
import com.drmangotea.tfmg.registry.TFMGPartialModels;
import dev.engine_room.flywheel.lib.model.baked.PartialModel;
@@ -14,7 +13,6 @@ import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.core.Direction;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.state.BlockState;
import java.util.Optional;
@@ -42,7 +40,7 @@ public class TurboUpgradeData extends EngineUpgrade {
}
@Override
public void tickUpgrade(AbstractEngineBlockEntity engine) {
public void tickUpgrade(AbstractSmallEngineBlockEntity engine) {
if (!engine.getLevel().isClientSide)
return;
@@ -53,7 +51,7 @@ public class TurboUpgradeData extends EngineUpgrade {
@Override
public void render(AbstractEngineBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer, int light) {
public void render(AbstractSmallEngineBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer, int light) {
if(!Minecraft.getInstance().isPaused()) {
@@ -94,7 +92,7 @@ public class TurboUpgradeData extends EngineUpgrade {
}
@Override
public float getTorqueModifier(AbstractEngineBlockEntity engine) {
public float getTorqueModifier(AbstractSmallEngineBlockEntity engine) {
return 1.2f;
}
@@ -104,12 +102,12 @@ public class TurboUpgradeData extends EngineUpgrade {
}
@Override
public float getSpeedModifier(AbstractEngineBlockEntity engine) {
public float getSpeedModifier(AbstractSmallEngineBlockEntity engine) {
return 1.3f;
}
@Override
public float getEfficiencyModifier(AbstractEngineBlockEntity engine) {
public float getEfficiencyModifier(AbstractSmallEngineBlockEntity engine) {
return 0.7f;
}
}

View File

@@ -44,6 +44,14 @@ public class SpoolItem extends Item {
this.type = type;
}
@Override
public void onCraftedBy(ItemStack stack, Level p_41448_, Player p_41449_) {
stack.getOrCreateTag().putInt("Amount",1000);
super.onCraftedBy(stack, p_41448_, p_41449_);
}
@Override
public InteractionResultHolder<ItemStack> use(Level level, Player player, InteractionHand hand) {
ItemStack stack = player.getItemInHand(hand);

View File

@@ -28,6 +28,7 @@ public class WindingMachineRenderer extends KineticBlockEntityRenderer<WindingMa
public WindingMachineRenderer(BlockEntityRendererProvider.Context context) {
super(context);
}
@Override
protected void renderSafe(WindingMachineBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource bufferSource, int light, int overlay) {
@@ -36,11 +37,11 @@ public class WindingMachineRenderer extends KineticBlockEntityRenderer<WindingMa
.getItemRenderer();
VertexConsumer vb = bufferSource.getBuffer(RenderType.solid());
if(!Minecraft.getInstance().isPaused()) {
if (!Minecraft.getInstance().isPaused()) {
be.angle += be.spoolSpeed.getValue(partialTicks) * 3 / 10f;
be.angle %= 360;
}
if(!be.spool.isEmpty()) {
if (!be.spool.isEmpty()) {
CachedBuffers.partial(TFMGPartialModels.SPOOL, blockState)
.light(light)
.center()
@@ -50,8 +51,8 @@ public class WindingMachineRenderer extends KineticBlockEntityRenderer<WindingMa
.rotateXDegrees(be.angle)
.uncenter()
.renderInto(ms, bufferSource.getBuffer(RenderType.cutoutMipped()));
if(((SpoolItem)be.spool.getItem()).model !=null){
CachedBuffers.partial(((SpoolItem)be.spool.getItem()).model, blockState)
if (((SpoolItem) be.spool.getItem()).model != null) {
CachedBuffers.partial(((SpoolItem) be.spool.getItem()).model, blockState)
.light(light)
.center()
.rotateYDegrees(blockState.getValue(HORIZONTAL_FACING).getAxis() == Direction.Axis.Z ? Math.abs(blockState.getValue(FACING).toYRot() - 180) : blockState.getValue(FACING).toYRot())
@@ -60,9 +61,9 @@ public class WindingMachineRenderer extends KineticBlockEntityRenderer<WindingMa
.rotateXDegrees(be.angle)
.uncenter()
.renderInto(ms, vb);
if(!be.inventory.isEmpty()){
if (!be.inventory.isEmpty()) {
CachedBuffers.partial(be.getSpeed()!=0 ? TFMGPartialModels.CONNNECTING_WIRE_ANIMATED : TFMGPartialModels.CONNNECTING_WIRE, blockState)
CachedBuffers.partial(be.getSpeed() != 0 ? TFMGPartialModels.CONNNECTING_WIRE_ANIMATED : TFMGPartialModels.CONNNECTING_WIRE, blockState)
.light(light)
.center()
.rotateYDegrees(blockState.getValue(HORIZONTAL_FACING).getAxis() == Direction.Axis.Z ? Math.abs(blockState.getValue(FACING).toYRot() - 180) : blockState.getValue(FACING).toYRot())
@@ -75,7 +76,7 @@ public class WindingMachineRenderer extends KineticBlockEntityRenderer<WindingMa
}
}
}
if(!be.inventory.isEmpty()){
if (!be.inventory.isEmpty()) {
ItemStack item = be.inventory.getItem(0);
BakedModel bakedModel = itemRenderer.getModel(item, null, null, 0);
boolean blockItem = bakedModel.isGui3d();
@@ -87,14 +88,14 @@ public class WindingMachineRenderer extends KineticBlockEntityRenderer<WindingMa
.translateZ(0.4f)
.translateY(0.33f)
.rotateXDegrees(be.angle)
.rotateZDegrees(item.is(TFMGTags.TFMGItemTags.RODS.tag) ? 45 : 0 )
.rotateZDegrees(item.is(TFMGTags.TFMGItemTags.RODS.tag) ? 45 : 0)
.rotateZDegrees(blockItem ? 90 : 0)
.scale(blockItem ? .5f : .375f);
itemRenderer.render(item, ItemDisplayContext.FIXED, false, ms, bufferSource, light, overlay, bakedModel);
ms.popPose();
}
super.renderSafe(be, partialTicks, ms ,bufferSource,light,overlay);
super.renderSafe(be, partialTicks, ms, bufferSource, light, overlay);
}
@Override

View File

@@ -54,7 +54,7 @@ public class VatBlock extends Block implements IWrenchable, IBE<VatBlockEntity>
super(properties);
registerDefaultState(defaultBlockState().setValue(TOP, true)
.setValue(BOTTOM, true)
.setValue(SHAPE, Shape.WINDOW));
.setValue(SHAPE, Shape.PLAIN));
this.vatType = vatType;
}
public static boolean isVat(BlockState state) {

View File

@@ -16,12 +16,11 @@ import com.simibubi.create.foundation.blockEntity.behaviour.fluid.SmartFluidTank
import com.simibubi.create.foundation.fluid.CombinedTankWrapper;
import com.simibubi.create.foundation.fluid.FluidIngredient;
import com.simibubi.create.foundation.fluid.SmartFluidTank;
import com.simibubi.create.foundation.item.SmartInventory;
import com.simibubi.create.foundation.recipe.RecipeFinder;
import com.simibubi.create.foundation.utility.CreateLang;
import net.createmod.catnip.animation.LerpedFloat;
import com.simibubi.create.infrastructure.config.AllConfigs;
import net.createmod.catnip.animation.LerpedFloat;
import net.createmod.catnip.lang.LangBuilder;
import net.minecraft.ChatFormatting;
import net.minecraft.core.BlockPos;
@@ -72,7 +71,7 @@ public class VatBlockEntity extends SmartBlockEntity implements IHaveGoggleInfor
protected BlockPos lastKnownPos;
protected boolean updateConnectivity;
protected boolean updateCapability;
protected boolean window;
protected boolean window = false;
protected int luminosity;
protected int width;
protected int height;
@@ -97,13 +96,16 @@ public class VatBlockEntity extends SmartBlockEntity implements IHaveGoggleInfor
for (int i = 0; i < 8; i++) {
fluidLevel[i] = LerpedFloat.linear();
}
window = false;
// if(Objects.equals(((VatBlock) getBlockState().getBlock()).vatType, "tfmg:firebrick_lined_vat"))
// window = false;
inputInventory = new VatInventory(4, this);
outputInventory = new VatInventory(4, this);
itemCapability = LazyOptional.of(() -> new CombinedInvWrapper(inputInventory, outputInventory));
forceFluidLevelUpdate = true;
updateConnectivity = false;
updateCapability = false;
window = ((VatBlock)getBlockState().getBlock()).vatType != "tfmg:firebrick_lined_vat";
//window = ((VatBlock)getBlockState().getBlock()).vatType != "tfmg:firebrick_lined_vat";
height = 1;
width = 1;
refreshCapability();
@@ -184,7 +186,12 @@ public class VatBlockEntity extends SmartBlockEntity implements IHaveGoggleInfor
}
}
}
if (heatLevel >= 2) {
heatCondition = HeatCondition.HEATED;
}
if (heatLevel >= 4) {
heatCondition = HeatCondition.SUPERHEATED;
}
if (heatLevel != prevHeat)
notifyUpdate();
}
@@ -204,12 +211,14 @@ public class VatBlockEntity extends SmartBlockEntity implements IHaveGoggleInfor
if (!Objects.equals(testedRecipe.machines, machines)) {
continue;
}
if (!testedRecipe.getRollableResultsAsItemStacks().isEmpty())
TFMG.LOGGER.debug("AAAAAAAAAAAAA " + testedRecipe.getRollableResultsAsItemStacks().get(0).toString());
if (!testedRecipe.allowedVatTypes.contains(((VatBlock) getBlockState().getBlock()).vatType.replace("tfmg:", ""))) {
if (!testedRecipe.allowedVatTypes.contains(((VatBlock) getBlockState().getBlock()).vatType)) {
continue;
}
//for(int i =0;i<machines.size();i++){
// if(!Objects.equals(machines.get(i),testedRecipe.machines)){
// doesntMatch = true;
@@ -253,26 +262,53 @@ public class VatBlockEntity extends SmartBlockEntity implements IHaveGoggleInfor
}
//same but with items
Map<Integer, Integer> isFound = new HashMap<>();
for (int i = 0; i < testedRecipe.getIngredients().size(); i++) {
Integer foundAt = null;
if (testedRecipe.getIngredients().get(i).isEmpty())
break;
SmartInventory testInventory = new SmartInventory(8, this);
for (int y = 0; y < itemHandler.getSlots(); y++) {
if (isFound.containsValue(y))
continue;
ItemStack stack = itemHandler.getStackInSlot(y);
if (testedRecipe.getIngredients().get(i).test(stack)) {
foundAt = y;
for (int i = 0; i < 4; i++) {
testInventory.setStackInSlot(i, inputInventory.getStackInSlot(i).copy());
}
for (int i = 0; i < 4; i++) {
testInventory.setStackInSlot(i + 4, outputInventory.getStackInSlot(i).copy());
}
for (int i = 0; i < testedRecipe.getIngredients().size(); i++) {
Ingredient ingredient = testedRecipe.getIngredients().get(i);
boolean found = false;
for (int y = 0; y < 8; y++) {
ItemStack stack = testInventory.getStackInSlot(y).copy();
if (ingredient.test(stack)) {
found = true;
testInventory.getItem(y).shrink(1);
break;
}
}
if (foundAt != null) {
isFound.put(i, foundAt);
} else doesntMatch = true;
if(!found) {
doesntMatch = true;
break;
}
}
if (false) {
Map<Integer, Integer> isFound = new HashMap<>();
for (int i = 0; i < testedRecipe.getIngredients().size(); i++) {
Integer foundAt = null;
if (testedRecipe.getIngredients().get(i).isEmpty())
break;
for (int y = 0; y < itemHandler.getSlots(); y++) {
if (isFound.containsValue(y))
continue;
ItemStack stack = itemHandler.getStackInSlot(y);
if (testedRecipe.getIngredients().get(i).test(stack)) {
foundAt = y;
break;
}
}
if (foundAt != null) {
isFound.put(i, foundAt);
} else doesntMatch = true;
}
}
//////////////////////////////////////////
if (doesntMatch)
@@ -336,6 +372,8 @@ public class VatBlockEntity extends SmartBlockEntity implements IHaveGoggleInfor
public void tick() {
super.tick();
handleRecipe();
if (syncCooldown > 0) {
@@ -682,7 +720,7 @@ public class VatBlockEntity extends SmartBlockEntity implements IHaveGoggleInfor
if (be == null)
return;
if(((VatBlock)getBlockState().getBlock()).vatType == "tfmg:firebrick_lined_vat")
if (((VatBlock) getBlockState().getBlock()).vatType == "tfmg:firebrick_lined_vat")
return;
be.setWindows(!be.window);

View File

@@ -84,7 +84,7 @@ public class ElectrodeHolderBlockEntity extends ElectricBlockEntity implements I
}
boolean isSuperheated(){
return electrodeType == ElectrodeHolderBlockEntity.ElectrodeType.GRAPHITE && getCurrent() >= TFMGConfigs.common().machines.graphiteElectrodeCurrent.get();
return electrodeType == ElectrodeType.GRAPHITE && getCurrent() >= TFMGConfigs.common().machines.graphiteElectrodeCurrent.get();
}
boolean isOperational(){
return getCurrent() >= TFMGConfigs.common().machines.electrolysisMinimumCurrent.get();

View File

@@ -6,6 +6,7 @@ import com.drmangotea.tfmg.datagen.recipes.TFMGRecipeProvider;
import com.drmangotea.tfmg.datagen.recipes.values.*;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.simibubi.create.foundation.data.recipe.MechanicalCraftingRecipeGen;
import com.simibubi.create.foundation.utility.FilesHelper;
import com.tterrag.registrate.providers.ProviderType;
import net.minecraft.core.HolderLookup;
@@ -38,11 +39,12 @@ public class TFMGDatagen {
// generator.addProvider(true, new DamageTypeTagGen(output, lookupProvider, existingFileHelper));
RECIPE_GENERATORS.add(new IndustrialBlastingRecipeGen(output));
RECIPE_GENERATORS.add(new TFMGIndustrialBlastingRecipeGen(output));
RECIPE_GENERATORS.add(new CastingRecipeGen(output));
RECIPE_GENERATORS.add(new VatRecipeGen(output));
RECIPE_GENERATORS.add(new TFMGStandardRecipeGen(output));
RECIPE_GENERATORS.add(new TFMGMechanicalCraftingRecipeGen(output));
//generator.addProvider(event.includeServer(), new TFMGMechanicalCraftingRecipeGen(output));
generator.addProvider(true, new TFMGSequencedAssemblyRecipeGen(output));
generator.addProvider(true, new DataProvider() {

View File

@@ -2,11 +2,9 @@ package com.drmangotea.tfmg.datagen.recipes;
import com.drmangotea.tfmg.TFMG;
import com.drmangotea.tfmg.datagen.recipes.values.*;
import com.simibubi.create.Create;
import com.simibubi.create.content.processing.recipe.ProcessingRecipe;
import com.simibubi.create.content.processing.recipe.ProcessingRecipeBuilder;
import com.simibubi.create.content.processing.recipe.ProcessingRecipeSerializer;
import com.simibubi.create.foundation.data.recipe.CreateRecipeProvider;
import com.simibubi.create.foundation.recipe.IRecipeTypeInfo;
import net.createmod.catnip.platform.CatnipServices;
import net.minecraft.data.CachedOutput;
@@ -36,6 +34,8 @@ public abstract class TFMGProcessingRecipeGen extends TFMGRecipeProvider {
GENERATORS.add(new WindingRecipeGen(output));
GENERATORS.add(new PolarizingRecipeGen(output));
GENERATORS.add(new HotBlastRecipeGen(output));
GENERATORS.add(new TFMGItemApplicationRecipeGen(output));
GENERATORS.add(new TFMGFillingRecipeGen(output));
gen.addProvider(true, new DataProvider() {

View File

@@ -12,6 +12,7 @@ import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllFluids;
import com.simibubi.create.AllItems;
import com.simibubi.create.AllTags;
import com.simibubi.create.content.decoration.palettes.AllPaletteBlocks;
import com.simibubi.create.content.decoration.palettes.AllPaletteStoneTypes;
import com.simibubi.create.content.processing.recipe.ProcessingRecipe;
import com.simibubi.create.content.processing.recipe.ProcessingRecipeSerializer;
@@ -166,6 +167,12 @@ public class TFMGRecipeProvider extends RecipeProvider {
public static TagKey<Item> copperWire() {
return TFMGTags.forgeItemTag("wires/copper");
}
public static TagKey<Item> constantanWire() {
return TFMGTags.forgeItemTag("wires/constantan");
}
public static TagKey<Item> aluminumWire() {
return TFMGTags.forgeItemTag("wires/aluminum");
}
//
@@ -182,6 +189,8 @@ public class TFMGRecipeProvider extends RecipeProvider {
public static ItemLike plasticSheet() {
return TFMGItems.PLASTIC_SHEET.get();
}
public static ItemLike crimsite() {
return AllPaletteStoneTypes.CRIMSITE.getBaseBlock().get();
}
@@ -254,6 +263,9 @@ public class TFMGRecipeProvider extends RecipeProvider {
public static ItemLike aluminumCasing() {
return TFMGBlocks.ALUMINUM_CASING.get();
}
public static ItemLike lightBulb() {
return TFMGBlocks.LIGHT_BULB.get();
}
public static ItemLike heavyPlate() {
@@ -301,6 +313,9 @@ public class TFMGRecipeProvider extends RecipeProvider {
public static ItemLike castIronTank() {
return TFMGBlocks.CAST_IRON_FLUID_TANK;
}
public static ItemLike circuitBoard() {
return TFMGItems.CIRCUIT_BOARD;
}
public static ItemLike aluminumTank() {
return TFMGBlocks.ALUMINUM_FLUID_TANK;
}
@@ -334,6 +349,9 @@ public class TFMGRecipeProvider extends RecipeProvider {
public static ItemLike aluminumPipe() {
return TFMGPipes.TFMG_PIPES.get(TFMGPipes.PipeMaterial.ALUMINUM).get(0);
}
public static ItemLike plasticPipe() {
return TFMGPipes.TFMG_PIPES.get(TFMGPipes.PipeMaterial.PLASTIC).get(0);
}
public static ItemLike turbineBlade() {
return TFMGItems.TURBINE_BLADE.get();
}
@@ -361,10 +379,16 @@ public class TFMGRecipeProvider extends RecipeProvider {
public static TagKey<Item> gold() {
return AllTags.forgeItemTag("ingots/gold");
}
public static TagKey<Item> string() {
return AllTags.forgeItemTag("string");
}
public static ItemLike propeller() {
return AllItems.PROPELLER.get();
}
public static ItemLike framedGlass() {
return AllPaletteBlocks.FRAMED_GLASS;
}
//"steel", "aluminum", "cast_iron", "lead", "nickel","constantan" , "copper", "zinc", "brass"
public static ItemLike steelTruss() {
return TFMGBlocks.TRUSSES.get(0).get();
@@ -449,6 +473,7 @@ public class TFMGRecipeProvider extends RecipeProvider {
return TFMGBlocks.FIREPROOF_BRICKS.get();
}
public static ItemLike shaft() {
return AllBlocks.SHAFT.get();
}
@@ -457,6 +482,10 @@ public class TFMGRecipeProvider extends RecipeProvider {
return AllBlocks.COGWHEEL.get();
}
public static ItemLike rubber() {
return TFMGItems.RUBBER_SHEET.get();
}
public static ItemLike largeCog() {
return AllBlocks.LARGE_COGWHEEL.get();
}
@@ -465,7 +494,7 @@ public class TFMGRecipeProvider extends RecipeProvider {
return AllBlocks.ANDESITE_CASING.get();
}
public static TagKey<Item> brass() {
public static TagKey<Item> brassIngot() {
return AllTags.forgeItemTag("ingots/brass");
}
@@ -529,7 +558,7 @@ public class TFMGRecipeProvider extends RecipeProvider {
return AllTags.forgeItemTag("flour/wheat");
}
public static ItemLike copper() {
public static ItemLike copperIngot() {
return Items.COPPER_INGOT;
}
@@ -574,13 +603,13 @@ public class TFMGRecipeProvider extends RecipeProvider {
return Ingredient.of(stack);
}
public static Ingredient coil1000Ohms(){
public static Ingredient coil1000Turns(){
ItemStack stack = TFMGItems.ELECTROMAGNETIC_COIL.asStack();
stack.getOrCreateTag().putInt("Turns",1000);
return Ingredient.of(stack);
}
}
public static class F {

View File

@@ -17,6 +17,11 @@ public class CastingRecipeGen extends TFMGProcessingRecipeGen {
STEEL_INGOT = create("steel", b ->b
.require(TFMGFluids.MOLTEN_STEEL.get(),144)
.output(TFMGItems.STEEL_INGOT)
.duration(60)),
SILICON = create("silicon", b ->b
.require(TFMGFluids.LIQUID_SILICON.get(),144)
.output(TFMGItems.SILICON_INGOT)
.duration(60));
;
public CastingRecipeGen(PackOutput output) {

View File

@@ -1,56 +0,0 @@
package com.drmangotea.tfmg.datagen.recipes.values;
import com.drmangotea.tfmg.datagen.recipes.TFMGRecipeProvider;
import com.drmangotea.tfmg.datagen.recipes.builder.IndustrialBlastingRecipeBuilder;
import com.drmangotea.tfmg.registry.TFMGFluids;
import com.drmangotea.tfmg.registry.TFMGTags;
import com.simibubi.create.AllItems;
import net.minecraft.data.PackOutput;
import net.minecraft.world.item.Items;
import net.minecraft.world.item.crafting.Ingredient;
import static com.drmangotea.tfmg.datagen.recipes.TFMGRecipeProvider.I.ironDust;
public class IndustrialBlastingRecipeGen extends TFMGRecipeProvider{
GeneratedRecipe
STEEL = createIndustrialBlastingRecipe("steel", b -> (IndustrialBlastingRecipeBuilder) b
.require(AllItems.CRUSHED_IRON)
.require(TFMGTags.TFMGItemTags.FLUX.tag)
.output(TFMGFluids.MOLTEN_STEEL.get(),144)
.output(TFMGFluids.MOLTEN_SLAG.get(),144)
.output(TFMGFluids.FURNACE_GAS.get(),20)
.duration(60)
, 20),
STEEL_DOUBLE = createIndustrialBlastingRecipe("steel_from_raw_iron", b -> (IndustrialBlastingRecipeBuilder) b
.require(Items.RAW_IRON)
.require(Ingredient.of(TFMGTags.TFMGItemTags.FLUX.tag))
.require(Ingredient.of(TFMGTags.TFMGItemTags.FLUX.tag))
.output(TFMGFluids.MOLTEN_STEEL.get(),288)
.output(TFMGFluids.MOLTEN_SLAG.get(),288)
.output(TFMGFluids.FURNACE_GAS.get(),20)
.duration(120)
, 30),
STEEL_DUST = createIndustrialBlastingRecipe("steel_from_dust", b -> (IndustrialBlastingRecipeBuilder) b
.require(ironDust())
.require(TFMGTags.TFMGItemTags.FLUX.tag)
.output(TFMGFluids.MOLTEN_STEEL.get(),144)
.output(TFMGFluids.MOLTEN_SLAG.get(),144)
.output(TFMGFluids.FURNACE_GAS.get(),20)
.duration(50)
, 20)
;
public IndustrialBlastingRecipeGen(PackOutput output) {super(output);}
}

View File

@@ -20,7 +20,12 @@ public class TFMGPressingRecipeGen extends TFMGProcessingRecipeGen {
.output(leadSheetTFMG()).duration(50)),
NICKEL_SHEET = create("nickel_ingot", b -> b.require(nickelIngot())
.output(nickelSheetTFMG()).duration(50));
.output(nickelSheetTFMG()).duration(50)),
SYNTHETIC_LEATHER = create("synthetic_leather", b -> b
.require(rubber())
.output(syntheticLeather())
.duration(200));
public TFMGPressingRecipeGen(PackOutput output) {
super(output);

View File

@@ -42,7 +42,7 @@ public class TFMGSequencedAssemblyRecipeGen extends CreateRecipeProvider {
.addOutput(TFMGBlocks.STEEL_CASING.get(), 8)
.addOutput(TFMGBlocks.STEEL_COGWHEEL.get(), 8)
.addOutput(TFMGItems.CAPACITOR.get(), 8)
.loops(5)
.loops(3)
.addStep(DeployerApplicationRecipe::new, rb -> rb.require(TFMGItems.CAPACITOR))
.addStep(DeployerApplicationRecipe::new, rb -> rb.require(steelSheet()))
.addStep(WindingRecipe::new, rb -> rb.require(TFMGItems.COPPER_SPOOL.get()).duration(75))
@@ -51,12 +51,34 @@ public class TFMGSequencedAssemblyRecipeGen extends CreateRecipeProvider {
.addStep(DeployerApplicationRecipe::new, rb -> rb.require(TFMGItems.SCREWDRIVER))
),
CIRCUIT_BOARD = create("unfinished_circuit_board", b -> b.require(TFMGItems.ETCHED_CIRCUIT_BOARD)
.transitionTo(TFMGItems.UNFINISHED_CIRCUIT_BOARD.get())
.addOutput(TFMGItems.CIRCUIT_BOARD.get(), 1)
.loops(4)
.addStep(DeployerApplicationRecipe::new, rb -> rb.require(TFMGItems.CAPACITOR))
.addStep(DeployerApplicationRecipe::new, rb -> rb.require(resistor100Ohms()))
.addStep(DeployerApplicationRecipe::new, rb -> rb.require(TFMGItems.TRANSISTOR))
.addStep(DeployerApplicationRecipe::new, rb -> rb.require(resistor100Ohms()))
),
HEAVY_PLATE = create("heavy_plate", b -> b.require(TFMGItems.HEAVY_PLATE)
.transitionTo(TFMGItems.UNPROCESSED_HEAVY_PLATE.get())
.addOutput(TFMGItems.HEAVY_PLATE.get(), 1)
.loops(1)
.addStep(PressingRecipe::new,rb -> rb)
.addStep(PressingRecipe::new,rb -> rb)
.addStep(PressingRecipe::new,rb -> rb)
),
MOTOR = create("motor", b -> b.require(shaft())
.transitionTo(TFMGItems.UNFINISHED_GENERATOR.get())
.addOutput(TFMGBlocks.ELECTRIC_MOTOR.get(), 120)
.addOutput(TFMGBlocks.STEEL_CASING.get(), 8)
.addOutput(TFMGItems.NICKEL_SHEET.get(), 8)
.loops(5)
.loops(3)
.addStep(DeployerApplicationRecipe::new, rb -> rb.require(nickelSheet()))
.addStep(WindingRecipe::new, rb -> rb.require(TFMGItems.COPPER_SPOOL.get()).duration(75))
.addStep(DeployerApplicationRecipe::new, rb -> rb.require(magnet()))

View File

@@ -1,21 +1,19 @@
package com.drmangotea.tfmg.datagen.recipes.values;
import com.drmangotea.tfmg.TFMG;
import com.drmangotea.tfmg.datagen.recipes.TFMGRecipeProvider;
import com.drmangotea.tfmg.datagen.recipes.builder.IndustrialBlastingRecipeBuilder;
import com.drmangotea.tfmg.datagen.recipes.builder.VatMachineRecipeBuilder;
import com.drmangotea.tfmg.registry.TFMGFluids;
import com.drmangotea.tfmg.registry.TFMGItems;
import com.drmangotea.tfmg.registry.TFMGTags;
import com.simibubi.create.content.processing.recipe.HeatCondition;
import net.minecraft.data.PackOutput;
import net.minecraft.world.item.Items;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.material.Fluids;
import net.minecraftforge.common.Tags;
import java.util.ArrayList;
import static com.drmangotea.tfmg.datagen.recipes.TFMGRecipeProvider.I.*;
import static com.drmangotea.tfmg.datagen.recipes.TFMGRecipeProvider.I.crushedRawIron;
import static com.drmangotea.tfmg.datagen.recipes.builder.VatMachineRecipeBuilder.VatRecipeParams;
public class VatRecipeGen extends TFMGRecipeProvider {
@@ -31,42 +29,36 @@ public class VatRecipeGen extends TFMGRecipeProvider {
.require(Fluids.WATER, 250)
.output(TFMGFluids.LIQUID_CONCRETE.get(), 1000)
, mixing()),
DEBUG = createVatRecipe("debug", b -> (VatMachineRecipeBuilder) b
.require(Blocks.GOLD_BLOCK.asItem())
.require(TFMGItems.CINDERBLOCK)
.output(TFMGItems.ALUMINUM_INGOT, 2)
, mixing()),
DEBUG_2 = createVatRecipe("debug_2", b -> (VatMachineRecipeBuilder) b
.require(TFMGItems.ALUMINUM_INGOT)
.require(TFMGItems.CINDERFLOURBLOCK)
.output(TFMGItems.BITUMEN, 2)
, electrolysis()),
ARC_FURNACE_STEEL = createVatRecipe("arc_furnace_steel", b -> (VatMachineRecipeBuilder) b
.require(crushedRawIron())
.require(TFMGTags.TFMGItemTags.FLUX.tag)
.require(TFMGTags.TFMGItemTags.BLAST_FURNACE_FUEL.tag)
.output(TFMGItems.STEEL_INGOT, 2)
.output(TFMGFluids.MOLTEN_STEEL.get(), 288)
.output(TFMGFluids.MOLTEN_SLAG.get(), 288)
, arcBlasting()),
NEON = createVatRecipe("neon", b -> (VatMachineRecipeBuilder) b
.require(TFMGFluids.AIR.get(), 1000)
.output(TFMGFluids.NEON.get(), 1)
.duration(10)
, centrifuge()),
ETCHED_CIRCUIT_BOARD = createVatRecipe("etched_circuit_board", b -> (VatMachineRecipeBuilder) b
.require(TFMGItems.COATED_CIRCUIT_BOARD)
.require(Fluids.WATER.getSource(), 100)
.require(TFMGFluids.SULFURIC_ACID.getSource(), 250)
.output(TFMGItems.ETCHED_CIRCUIT_BOARD)
.duration(100)
, new VatRecipeParams()),
DEBUG_3 = createVatRecipe("debug_3", b -> (VatMachineRecipeBuilder) b
.require(Blocks.GOLD_BLOCK.asItem())
.require(TFMGFluids.LIQUID_CONCRETE.getSource(), 1)
.require(TFMGFluids.HEAVY_OIL.getSource(), 1)
.output(TFMGItems.ALUMINUM_INGOT, 2)
, mixing()),
DEBUG_4 = createVatRecipe("debug_4", b -> (VatMachineRecipeBuilder) b
.require(Blocks.GOLD_BLOCK.asItem())
.require(Blocks.DIAMOND_BLOCK.asItem())
.require(TFMGFluids.LIQUID_CONCRETE.getSource(), 1)
.require(TFMGFluids.HEAVY_OIL.getSource(), 1)
.require(TFMGFluids.HEAVY_OIL.getSource(), 1)
.output(TFMGItems.ALUMINUM_INGOT, 2)
, mixing()),
ALUMINUM = createVatRecipe("aluminum", b -> (VatMachineRecipeBuilder) b
.require(TFMGItems.BAUXITE_POWDER)
.require(TFMGItems.BAUXITE_POWDER)
.require(TFMGItems.BAUXITE_POWDER)
.require(TFMGItems.BAUXITE_POWDER)
.output(TFMGItems.ALUMINUM_INGOT)
.output(.5f, TFMGItems.ALUMINUM_NUGGET, 4)
.output(.25f, TFMGItems.ALUMINUM_NUGGET, 2)
.output(TFMGFluids.CARBON_DIOXIDE.get(), 500)
.duration(100)
.requiresHeat(HeatCondition.HEATED)
, electrolysis()),
DEBUG_5 = createVatRecipe("debug_5", b -> (VatMachineRecipeBuilder) b
.require(Blocks.GOLD_BLOCK.asItem())
.require(Blocks.DIAMOND_BLOCK.asItem())
@@ -128,7 +120,7 @@ public class VatRecipeGen extends TFMGRecipeProvider {
params.machines.add("tfmg:graphite_electrode");
params.minSize = 9;
params.allowedVatTypes = new ArrayList<>();
params.allowedVatTypes.add(TFMG.asResource("firebrick_lined_vat").getPath());
params.allowedVatTypes.add("tfmg:firebrick_lined_vat");
return params;
}
}

View File

@@ -1,10 +1,7 @@
package com.drmangotea.tfmg.mixin;
import com.drmangotea.tfmg.TFMG;
import com.drmangotea.tfmg.datagen.recipes.values.TFMGSequencedAssemblyRecipeGen;
import com.drmangotea.tfmg.datagen.recipes.values.TFMGStandardRecipeGen;
import com.drmangotea.tfmg.datagen.recipes.values.IndustrialBlastingRecipeGen;
import com.drmangotea.tfmg.datagen.recipes.values.VatRecipeGen;
import com.drmangotea.tfmg.datagen.recipes.values.*;
import net.minecraft.data.recipes.RecipeProvider;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
@@ -17,8 +14,9 @@ public class RecipeProviderMixin {
@Inject(at = @At("HEAD"), method = "getName",cancellable = true , remap = false)
public final void getName(CallbackInfoReturnable<String> cir) {
TFMG.LOGGER.debug("ALMOOGUS");
if((Object)this instanceof IndustrialBlastingRecipeGen)
if((Object)this instanceof TFMGMechanicalCraftingRecipeGen)
cir.setReturnValue("TFMG'S Mechanical Crafting Recipes");
if((Object)this instanceof TFMGIndustrialBlastingRecipeGen)
cir.setReturnValue("TFMG'S Industrial Blasting Recipes");
if((Object)this instanceof VatRecipeGen)
cir.setReturnValue("TFMG'S Vat Recipes");
@@ -27,6 +25,7 @@ public class RecipeProviderMixin {
if((Object)this instanceof TFMGSequencedAssemblyRecipeGen)
cir.setReturnValue("TFMG'S Sequenced Assembly Recipes");
}
}

View File

@@ -54,8 +54,13 @@ import com.drmangotea.tfmg.content.engines.engine_controller.EngineControllerBlo
import com.drmangotea.tfmg.content.engines.engine_controller.EngineControllerRenderer;
import com.drmangotea.tfmg.content.engines.engine_gearbox.EngineGearboxBlockEntity;
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.engines.types.large_engine.LargeEngineBlock;
import com.drmangotea.tfmg.content.engines.types.large_engine.LargeEngineBlockEntity;
import com.drmangotea.tfmg.content.engines.types.large_engine.LargeEngineRenderer;
import com.drmangotea.tfmg.content.engines.types.radial_engine.RadialEngineBlockEntity;
import com.drmangotea.tfmg.content.engines.types.regular_engine.RegularEngineBlockEntity;
import com.drmangotea.tfmg.content.engines.types.regular_engine.RegularEngineRenderer;
import com.drmangotea.tfmg.content.engines.types.turbine_engine.TurbineEngineBlockEntity;
import com.drmangotea.tfmg.content.machinery.metallurgy.blast_furnace.BlastFurnaceHatchBlockEntity;
import com.drmangotea.tfmg.content.machinery.metallurgy.blast_furnace.BlastFurnaceOutputBlockEntity;
import com.drmangotea.tfmg.content.machinery.metallurgy.blast_furnace.BlastFurnaceRenderer;
@@ -165,7 +170,7 @@ public class TFMGBlockEntities {
public static final BlockEntityEntry<RotorBlockEntity> ROTOR = REGISTRATE
.blockEntity("rotor", RotorBlockEntity::new)
.visual(() -> SingleAxisRotatingVisual::shaft)
.visual(() -> RotorVisual::new)
.validBlocks(TFMGBlocks.ROTOR)
.renderer(() -> RotorRenderer::new)
.register();
@@ -264,6 +269,26 @@ public class TFMGBlockEntities {
.validBlocks(TFMGBlocks.REGULAR_ENGINE)
.register();
public static final BlockEntityEntry<TurbineEngineBlockEntity> TURBINE_ENGINE = REGISTRATE
.blockEntity("turbine_engine", TurbineEngineBlockEntity::new)
.validBlocks(TFMGBlocks.TURBINE_ENGINE)
.register();
public static final BlockEntityEntry<LargeEngineBlockEntity> LARGE_ENGINE = REGISTRATE
.blockEntity("large_engine", LargeEngineBlockEntity::new)
.renderer(()-> LargeEngineRenderer::new)
// .visual(() -> OrientedRotatingVisual.of(AllPartialModels.SHAFT_HALF))
.validBlocks(TFMGBlocks.LARGE_ENGINE,TFMGBlocks.SIMPLE_LARGE_ENGINE)
.register();
public static final BlockEntityEntry<RadialEngineBlockEntity> RADIAL_ENGINE = REGISTRATE
.blockEntity("radial_engine", RadialEngineBlockEntity::new)
// .visual(() -> OrientedRotatingVisual.of(AllPartialModels.SHAFT_HALF))
.renderer(() -> RegularEngineRenderer::new)
.validBlocks(TFMGBlocks.RADIAL_ENGINE)
.register();
public static final BlockEntityEntry<PotentiometerBlockEntity> POTENTIOMETER = REGISTRATE
.blockEntity("potentiometer", PotentiometerBlockEntity::new)
.validBlocks(TFMGBlocks.POTENTIOMETER, TFMGBlocks.ENCASED_POTENTIOMETER)

View File

@@ -64,7 +64,11 @@ 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.engines.types.large_engine.LargeEngineBlock;
import com.drmangotea.tfmg.content.engines.types.radial_engine.RadialEngineBlock;
import com.drmangotea.tfmg.content.engines.types.regular_engine.RegularEngineBlock;
import com.drmangotea.tfmg.content.engines.types.turbine_engine.TurbineEngineBlock;
import com.drmangotea.tfmg.content.engines.types.turbine_engine.TurbineEngineGenerator;
import com.drmangotea.tfmg.content.items.CoalCokeBlockItem;
import com.drmangotea.tfmg.content.items.weapons.explosives.napalm.NapalmBombBlock;
import com.drmangotea.tfmg.content.machinery.metallurgy.blast_furnace.BlastFurnaceHatchBlock;
@@ -88,10 +92,6 @@ import com.drmangotea.tfmg.content.machinery.misc.flarestack.FlarestackGenerator
import com.drmangotea.tfmg.content.machinery.misc.machine_input.MachineInputBlock;
import com.drmangotea.tfmg.content.machinery.misc.smokestack.SmokestackBlock;
import com.drmangotea.tfmg.content.machinery.misc.smokestack.SmokestackGenerator;
import com.drmangotea.tfmg.content.machinery.vat.base.VatBlock;
import com.drmangotea.tfmg.content.machinery.vat.base.VatGenerator;
import com.drmangotea.tfmg.content.machinery.vat.electrode_holder.ElectrodeHolderBlock;
import com.drmangotea.tfmg.content.machinery.vat.industrial_mixer.IndustrialMixerBlock;
import com.drmangotea.tfmg.content.machinery.misc.winding_machine.WindingMachineBlock;
import com.drmangotea.tfmg.content.machinery.oil_processing.distillation_tower.IndustrialPipeBlock;
import com.drmangotea.tfmg.content.machinery.oil_processing.distillation_tower.controller.DistillationControllerBlock;
@@ -107,6 +107,11 @@ import com.drmangotea.tfmg.content.machinery.oil_processing.pumpjack.pumpjack.ha
import com.drmangotea.tfmg.content.machinery.oil_processing.pumpjack.pumpjack.hammer.parts.large.LargePumpjackHammerHeadBlock;
import com.drmangotea.tfmg.content.machinery.oil_processing.pumpjack.pumpjack.hammer.parts.large.LargePumpjackHammerPartBlock;
import com.drmangotea.tfmg.content.machinery.oil_processing.surface_scanner.SurfaceScannerBlock;
import com.drmangotea.tfmg.content.machinery.vat.base.VatBlock;
import com.drmangotea.tfmg.content.machinery.vat.base.VatGenerator;
import com.drmangotea.tfmg.content.machinery.vat.electrode_holder.ElectrodeHolderBlock;
import com.drmangotea.tfmg.content.machinery.vat.industrial_mixer.IndustrialMixerBlock;
import com.simibubi.create.AllItems;
import com.simibubi.create.AllTags;
import com.simibubi.create.api.stress.BlockStressValues;
import com.simibubi.create.content.contraptions.bearing.StabilizedBearingMovementBehaviour;
@@ -126,7 +131,9 @@ import com.tterrag.registrate.providers.loot.RegistrateBlockLootTables;
import com.tterrag.registrate.util.DataIngredient;
import com.tterrag.registrate.util.entry.BlockEntry;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.data.recipes.RecipeCategory;
import net.minecraft.tags.BlockTags;
import net.minecraft.world.item.crafting.Ingredient;
import net.minecraft.world.item.enchantment.Enchantments;
import net.minecraft.world.level.block.*;
import net.minecraft.world.level.block.state.BlockBehaviour;
@@ -137,6 +144,7 @@ import net.minecraftforge.common.Tags;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import static com.drmangotea.tfmg.TFMG.REGISTRATE;
import static com.drmangotea.tfmg.base.TFMGBuilderTransformers.*;
@@ -149,6 +157,7 @@ import static com.simibubi.create.foundation.data.CreateRegistrate.connectedText
import static com.simibubi.create.foundation.data.ModelGen.customItemModel;
import static com.simibubi.create.foundation.data.TagGen.*;
import static com.simibubi.create.foundation.data.TagGen.tagBlockAndItem;
@SuppressWarnings("removal")
public class TFMGBlocks {
@@ -165,54 +174,52 @@ public class TFMGBlocks {
.initialProperties(() -> Blocks.IRON_BLOCK)
.properties(p -> p.sound(SoundType.NETHERITE_BLOCK))
.properties(BlockBehaviour.Properties::noOcclusion)
.onRegister(connectedTextures(()->new EngineCTBehavior(TFMGSpriteShifts.REGULAR_ENGINE_TOP, TFMGSpriteShifts.REGULAR_ENGINE_BOTTOM, TFMGSpriteShifts.REGULAR_ENGINE_SIDE)))
.onRegister(connectedTextures(() -> new EngineCTBehavior(TFMGSpriteShifts.REGULAR_ENGINE_TOP, TFMGSpriteShifts.REGULAR_ENGINE_BOTTOM, TFMGSpriteShifts.REGULAR_ENGINE_SIDE)))
.blockstate(new EngineGenerator()::generate)
.transform(TFMGStress.setCapacity(45.0))
.item()
.transform(customItemModel())
.register();
public static final BlockEntry<RegularEngineBlock> TURBINE_ENGINE = REGISTRATE.block("turbine_engine", RegularEngineBlock::new)
public static final BlockEntry<TurbineEngineBlock> TURBINE_ENGINE = REGISTRATE.block("turbine_engine", TurbineEngineBlock::new)
.initialProperties(() -> Blocks.IRON_BLOCK)
.properties(p -> p.sound(SoundType.NETHERITE_BLOCK))
.properties(BlockBehaviour.Properties::noOcclusion)
.onRegister(connectedTextures(()->new EngineCTBehavior(TFMGSpriteShifts.REGULAR_ENGINE_TOP, TFMGSpriteShifts.REGULAR_ENGINE_BOTTOM, TFMGSpriteShifts.REGULAR_ENGINE_SIDE)))
.blockstate(new EngineGenerator()::generate)
.addLayer(() -> RenderType::cutoutMipped)
.transform(TFMGStress.setCapacity(45.0))
.onRegister(connectedTextures(() -> new EngineCTBehavior(TFMGSpriteShifts.REGULAR_ENGINE_TOP, TFMGSpriteShifts.REGULAR_ENGINE_BOTTOM, TFMGSpriteShifts.REGULAR_ENGINE_SIDE)))
.blockstate(new TurbineEngineGenerator()::generate)
.item()
.transform(customItemModel())
.register();
public static final BlockEntry<RegularEngineBlock> ROTARY_ENGINE = REGISTRATE.block("rotary_engine", RegularEngineBlock::new)
public static final BlockEntry<RadialEngineBlock> RADIAL_ENGINE = REGISTRATE.block("radial_engine", RadialEngineBlock::new)
.initialProperties(() -> Blocks.IRON_BLOCK)
.properties(p -> p.sound(SoundType.NETHERITE_BLOCK))
.properties(BlockBehaviour.Properties::noOcclusion)
.onRegister(connectedTextures(()->new EngineCTBehavior(TFMGSpriteShifts.REGULAR_ENGINE_TOP, TFMGSpriteShifts.REGULAR_ENGINE_BOTTOM, TFMGSpriteShifts.REGULAR_ENGINE_SIDE)))
.blockstate(new EngineGenerator()::generate)
.transform(TFMGStress.setCapacity(45.0))
.onRegister(connectedTextures(() -> new EngineCTBehavior(TFMGSpriteShifts.REGULAR_ENGINE_TOP, TFMGSpriteShifts.REGULAR_ENGINE_BOTTOM, TFMGSpriteShifts.REGULAR_ENGINE_SIDE)))
.blockstate(new TurbineEngineGenerator()::generate)
.item()
.transform(customItemModel())
.register();
public static final BlockEntry<RegularEngineBlock> RADIAL_ENGINE = REGISTRATE.block("regular_engine", RegularEngineBlock::new)
public static final BlockEntry<LargeEngineBlock> LARGE_ENGINE = REGISTRATE.block("large_engine", LargeEngineBlock::new)
.initialProperties(() -> Blocks.IRON_BLOCK)
.properties(p -> p.sound(SoundType.NETHERITE_BLOCK))
.properties(BlockBehaviour.Properties::noOcclusion)
.onRegister(connectedTextures(()->new EngineCTBehavior(TFMGSpriteShifts.REGULAR_ENGINE_TOP, TFMGSpriteShifts.REGULAR_ENGINE_BOTTOM, TFMGSpriteShifts.REGULAR_ENGINE_SIDE)))
.blockstate(new EngineGenerator()::generate)
.transform(TFMGStress.setCapacity(45.0))
.blockstate((c, p) -> p.horizontalFaceBlock(c.get(), AssetLookup.partialBaseModel(c, p)))
.item()
.transform(customItemModel())
.register();
public static final BlockEntry<RegularEngineBlock> LARGE_ENGINE = REGISTRATE.block("regular_engine", RegularEngineBlock::new)
.initialProperties(() -> Blocks.IRON_BLOCK)
.properties(p -> p.sound(SoundType.NETHERITE_BLOCK))
.properties(BlockBehaviour.Properties::noOcclusion)
.onRegister(connectedTextures(()->new EngineCTBehavior(TFMGSpriteShifts.REGULAR_ENGINE_TOP, TFMGSpriteShifts.REGULAR_ENGINE_BOTTOM, TFMGSpriteShifts.REGULAR_ENGINE_SIDE)))
.blockstate(new EngineGenerator()::generate)
.item()
.transform(customItemModel())
.register();
public static final BlockEntry<Block> ENGINE_EXPANSION = REGISTRATE.block("engine_expansion", Block::new)
public static final BlockEntry<LargeEngineBlock> SIMPLE_LARGE_ENGINE = REGISTRATE.block("simple_large_engine", LargeEngineBlock::new)
.initialProperties(() -> Blocks.IRON_BLOCK)
.properties(p -> p.sound(SoundType.NETHERITE_BLOCK))
.properties(BlockBehaviour.Properties::noOcclusion)
.transform(TFMGStress.setCapacity(30))
.blockstate((c, p) -> p.horizontalFaceBlock(c.get(), AssetLookup.partialBaseModel(c, p)))
.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))
@@ -302,6 +309,7 @@ public class TFMGBlocks {
.properties(p -> p.sound(SoundType.STONE))
.transform(pickaxeOnly())
.tag(TFMGTags.TFMGBlockTags.INDUSTRIAL_PIPE.tag)
.recipe((c, p) -> p.stonecutting(DataIngredient.tag(AllTags.forgeItemTag("ingots/steel")), RecipeCategory.BUILDING_BLOCKS, c::get, 8))
.blockstate((ctx, prov) -> prov.simpleBlock(ctx.getEntry(), AssetLookup.partialBaseModel(ctx, prov)))
.item()
.build()
@@ -349,6 +357,8 @@ public class TFMGBlocks {
.properties(BlockBehaviour.Properties::noOcclusion)
.blockstate(BlockStateGen.horizontalBlockProvider(false))
.tag(TFMGTags.TFMGBlockTags.PUMPJACK_SMALL_PART.tag)
.recipe((c, p) -> p.stonecutting(DataIngredient.tag(AllTags.forgeItemTag("storage_blocks/steel")),
RecipeCategory.DECORATIONS, c::get, 2))
.item()
.build()
.register();
@@ -358,6 +368,8 @@ public class TFMGBlocks {
.properties(BlockBehaviour.Properties::noOcclusion)
.blockstate(BlockStateGen.horizontalBlockProvider(false))
.tag(TFMGTags.TFMGBlockTags.PUMPJACK_HEAD.tag)
.item()
.build()
.register();
@@ -376,6 +388,8 @@ public class TFMGBlocks {
.transform(pickaxeOnly())
.blockstate(BlockStateGen.horizontalBlockProvider(false))
.tag(TFMGTags.TFMGBlockTags.PUMPJACK_PART.tag)
.recipe((c, p) -> p.stonecutting(DataIngredient.tag(AllTags.forgeItemTag("storage_blocks/steel")),
RecipeCategory.DECORATIONS, c::get, 2))
.item()
.build()
.register();
@@ -481,7 +495,6 @@ public class TFMGBlocks {
.register();
//------------------ORES------------------//
public static final BlockEntry<Block> LEAD_ORE = REGISTRATE.block("lead_ore", Block::new)
.initialProperties(() -> Blocks.GOLD_ORE)
@@ -658,7 +671,6 @@ public class TFMGBlocks {
.register();
//------------------MISC_MACHINERY------------------//
public static final BlockEntry<AirIntakeBlock> AIR_INTAKE = REGISTRATE.block("air_intake", AirIntakeBlock::new)
.initialProperties(SharedProperties::copperMetal)
@@ -766,7 +778,7 @@ public class TFMGBlocks {
.initialProperties(() -> Blocks.IRON_BLOCK)
.properties(p -> p.requiresCorrectToolForDrops())
.transform(pickaxeOnly())
.onRegister(connectedTextures(()->new HorizontalCTBehaviour(TFMGSpriteShifts.BLAST_FURNACE_REINFORCEMENT)))
.onRegister(connectedTextures(() -> new HorizontalCTBehaviour(TFMGSpriteShifts.BLAST_FURNACE_REINFORCEMENT)))
.tag(TFMGTags.TFMGBlockTags.REINFORCED_BLAST_FURNACE_SUPPORT.tag)
.tag(BlockTags.NEEDS_STONE_TOOL)
.item(BlastFurnaceReinforcementBlockItem::new)
@@ -778,29 +790,29 @@ public class TFMGBlocks {
.properties(p -> p.requiresCorrectToolForDrops())
.transform(pickaxeOnly())
.properties(BlockBehaviour.Properties::noOcclusion)
.onRegister(connectedTextures(()->new HorizontalCTBehaviour(TFMGSpriteShifts.BLAST_FURNACE_REINFORCEMENT)))
.onRegister(connectedTextures(() -> new HorizontalCTBehaviour(TFMGSpriteShifts.BLAST_FURNACE_REINFORCEMENT)))
.tag(BlockTags.NEEDS_STONE_TOOL)
.blockstate(BlockStateGen.horizontalBlockProvider(false))
.loot((lt, block) -> lt.dropOther(block, TFMGBlocks.BLAST_FURNACE_REINFORCEMENT.get().asItem()))
.register();
//
public static final BlockEntry<Block> RUSTED_BLAST_FURNACE_REINFORCEMENT = REGISTRATE.block("rusted_blast_furnace_reinforcement", Block::new)
.initialProperties(() -> Blocks.IRON_BLOCK)
.properties(p -> p.requiresCorrectToolForDrops())
.transform(pickaxeOnly())
.onRegister(connectedTextures(()->new HorizontalCTBehaviour(TFMGSpriteShifts.RUSTED_BLAST_FURNACE_REINFORCEMENT)))
.tag(TFMGTags.TFMGBlockTags.REINFORCED_BLAST_FURNACE_SUPPORT.tag)
.tag(BlockTags.NEEDS_STONE_TOOL)
.item(BlastFurnaceReinforcementBlockItem::new)
.build()
.register();
//
public static final BlockEntry<Block> RUSTED_BLAST_FURNACE_REINFORCEMENT = REGISTRATE.block("rusted_blast_furnace_reinforcement", Block::new)
.initialProperties(() -> Blocks.IRON_BLOCK)
.properties(p -> p.requiresCorrectToolForDrops())
.transform(pickaxeOnly())
.onRegister(connectedTextures(() -> new HorizontalCTBehaviour(TFMGSpriteShifts.RUSTED_BLAST_FURNACE_REINFORCEMENT)))
.tag(TFMGTags.TFMGBlockTags.REINFORCED_BLAST_FURNACE_SUPPORT.tag)
.tag(BlockTags.NEEDS_STONE_TOOL)
.item(BlastFurnaceReinforcementBlockItem::new)
.build()
.register();
public static final BlockEntry<BlastFurnaceReinforcementWallBlock> RUSTED_BLAST_FURNACE_REINFORCEMENT_WALL = REGISTRATE.block("rusted_blast_furnace_reinforcement_wall", BlastFurnaceReinforcementWallBlock::new)
.initialProperties(() -> Blocks.IRON_BLOCK)
.properties(p -> p.requiresCorrectToolForDrops())
.transform(pickaxeOnly())
.properties(BlockBehaviour.Properties::noOcclusion)
.onRegister(connectedTextures(()->new HorizontalCTBehaviour(TFMGSpriteShifts.RUSTED_BLAST_FURNACE_REINFORCEMENT)))
.onRegister(connectedTextures(() -> new HorizontalCTBehaviour(TFMGSpriteShifts.RUSTED_BLAST_FURNACE_REINFORCEMENT)))
.tag(BlockTags.NEEDS_STONE_TOOL)
.blockstate(BlockStateGen.horizontalBlockProvider(false))
.loot((lt, block) -> lt.dropOther(block, TFMGBlocks.RUSTED_BLAST_FURNACE_REINFORCEMENT.get().asItem()))
@@ -852,10 +864,6 @@ public class TFMGBlocks {
.register();
//------------------GADGETS------------------//
public static final BlockEntry<NapalmBombBlock> NAPALM_BOMB = REGISTRATE.block("napalm_bomb", NapalmBombBlock::new)
@@ -974,7 +982,7 @@ public class TFMGBlocks {
.register();
public static final BlockEntry<CableTubeBlock> CABLE_TUBE =
REGISTRATE.block("cable_tube", p->new CableTubeBlock(p, false))
REGISTRATE.block("cable_tube", p -> new CableTubeBlock(p, false))
.initialProperties(() -> Blocks.IRON_BLOCK)
.transform(pickaxeOnly())
.properties(p -> p.noOcclusion())
@@ -984,7 +992,7 @@ public class TFMGBlocks {
.register();
public static final BlockEntry<CableTubeBlock> CONCRETE_ENCASED_CABLE_TUBE =
REGISTRATE.block("concrete_encased_cable_tube", p->new CableTubeBlock(p, true))
REGISTRATE.block("concrete_encased_cable_tube", p -> new CableTubeBlock(p, true))
.initialProperties(() -> Blocks.STONE)
.blockstate(BlockStateGen.axisBlockProvider(false))
.transform(pickaxeOnly())
@@ -992,7 +1000,7 @@ public class TFMGBlocks {
.register();
public static final BlockEntry<CableTubeBlock> ELECTRIC_POST =
REGISTRATE.block("electric_post", p->new CableTubeBlock(p, false))
REGISTRATE.block("electric_post", p -> new CableTubeBlock(p, false))
.initialProperties(() -> Blocks.IRON_BLOCK)
.blockstate(BlockStateGen.axisBlockProvider(false))
.transform(pickaxeOnly())
@@ -1001,7 +1009,7 @@ public class TFMGBlocks {
.register();
public static final BlockEntry<CableTubeBlock> CONCRETE_ENCASED_ELECTRIC_POST =
REGISTRATE.block("concrete_encased_electric_post", p->new CableTubeBlock(p, true))
REGISTRATE.block("concrete_encased_electric_post", p -> new CableTubeBlock(p, true))
.initialProperties(() -> Blocks.STONE)
.blockstate(BlockStateGen.axisBlockProvider(false))
.transform(pickaxeOnly())
@@ -1047,9 +1055,9 @@ public class TFMGBlocks {
.item(AccumulatorItem::new)
.build()
.register();
;
;
public static final BlockEntry<LightBulbBlock> LIGHT_BULB =
REGISTRATE.block("light_bulb", p->new LightBulbBlock(p, TFMGBlockEntities.LIGHT_BULB,TFMGShapes.LIGHT_BULB))
REGISTRATE.block("light_bulb", p -> new LightBulbBlock(p, TFMGBlockEntities.LIGHT_BULB, TFMGShapes.LIGHT_BULB))
.initialProperties(() -> Blocks.IRON_BLOCK)
.properties(p -> p.lightLevel(s -> s.getValue(LIGHT)))
.transform(pickaxeOnly())
@@ -1060,7 +1068,7 @@ public class TFMGBlocks {
.transform(customItemModel())
.register();
public static final BlockEntry<LightBulbBlock> CIRCULAR_LIGHT =
REGISTRATE.block("circular_light", p->new LightBulbBlock(p, TFMGBlockEntities.CIRCULAR_LIGHT,TFMGShapes.CIRCULAR_LIGHT))
REGISTRATE.block("circular_light", p -> new LightBulbBlock(p, TFMGBlockEntities.CIRCULAR_LIGHT, TFMGShapes.CIRCULAR_LIGHT))
.initialProperties(() -> Blocks.IRON_BLOCK)
.properties(p -> p.lightLevel(s -> s.getValue(LIGHT)))
.transform(pickaxeOnly())
@@ -1072,7 +1080,7 @@ public class TFMGBlocks {
.transform(customItemModel())
.register();
public static final BlockEntry<LightBulbBlock> MODERN_LIGHT =
REGISTRATE.block("modern_light", p->new LightBulbBlock(p, TFMGBlockEntities.MODERN_LIGHT,TFMGShapes.MODERN_LIGHT))
REGISTRATE.block("modern_light", p -> new LightBulbBlock(p, TFMGBlockEntities.MODERN_LIGHT, TFMGShapes.MODERN_LIGHT))
.initialProperties(() -> Blocks.IRON_BLOCK)
.properties(p -> p.lightLevel(s -> s.getValue(LIGHT)))
.transform(pickaxeOnly())
@@ -1084,7 +1092,7 @@ public class TFMGBlocks {
.transform(customItemModel())
.register();
public static final BlockEntry<LightBulbBlock> ALUMINUM_LAMP =
REGISTRATE.block("aluminum_lamp", p->new LightBulbBlock(p, TFMGBlockEntities.ALUMINUM_LAMP,TFMGShapes.ALUMINUM_LAMP))
REGISTRATE.block("aluminum_lamp", p -> new LightBulbBlock(p, TFMGBlockEntities.ALUMINUM_LAMP, TFMGShapes.ALUMINUM_LAMP))
.initialProperties(() -> Blocks.IRON_BLOCK)
.properties(p -> p.lightLevel(s -> s.getValue(LIGHT)))
.transform(pickaxeOnly())
@@ -1386,10 +1394,6 @@ public class TFMGBlocks {
.transform(BuilderTransformers.casing(() -> TFMGSpriteShifts.HEAVY_MACHINERY_CASING))
.properties(p -> p.sound(SoundType.NETHERITE_BLOCK))
.register();
public static final BlockEntry<CasingBlock> ELECTRIC_CASING = REGISTRATE.block("electric_casing", CasingBlock::new)
.transform(BuilderTransformers.casing(() -> TFMGSpriteShifts.ELECTRIC_CASING))
.properties(p -> p.sound(SoundType.NETHERITE_BLOCK))
.register();
public static final BlockEntry<CasingBlock> ALUMINUM_CASING = REGISTRATE.block("industrial_aluminum_casing", CasingBlock::new)
.transform(BuilderTransformers.casing(() -> TFMGSpriteShifts.INDUSTRIAL_ALUMINUM_CASING))
.properties(p -> p.sound(SoundType.COPPER))
@@ -1530,9 +1534,11 @@ public class TFMGBlocks {
.properties(p -> p.requiresCorrectToolForDrops())
.transform(pickaxeOnly())
.blockstate(simpleCubeAll("coal_coke_block"))
.tag(AllTags.forgeBlockTag("storage_blocks/coal_coke"))
.tag(BlockTags.NEEDS_STONE_TOOL)
.tag(Tags.Blocks.STORAGE_BLOCKS)
.item(CoalCokeBlockItem::new)
.tag(AllTags.forgeItemTag("storage_blocks/coal_coke"))
.tag(Tags.Items.STORAGE_BLOCKS)
.build()
.lang("Block of Coal Coke")
@@ -1678,11 +1684,12 @@ public class TFMGBlocks {
.strength(3.0F)
.requiresCorrectToolForDrops()
.sound(SoundType.CALCITE))
.recipe((c, p) -> p.stonecutting(DataIngredient.items(TFMGBlocks.SLAG_BLOCK.asItem()), RecipeCategory.BUILDING_BLOCKS, c::get, 1))
.transform(pickaxeOnly())
.simpleItem()
.register();
public static final MaterialSet SLAG_BRICKS_SET = makeVariants(SLAG_BRICKS);
public static final MaterialSet SLAG_BRICKS_SET = makeVariants(SLAG_BRICKS, true);
public static final BlockEntry<LithiumTorchBlock> LITHIUM_TORCH =
REGISTRATE.block("lithium_torch", LithiumTorchBlock::new)
.initialProperties(() -> Blocks.TORCH)
@@ -1695,15 +1702,29 @@ public class TFMGBlocks {
public static final BlockEntry<Block> FACTORY_FLOOR =
REGISTRATE.block("factory_floor", Block::new)
.initialProperties(() -> Blocks.IRON_BLOCK)
.properties(p -> p
.strength(3.0F)
.requiresCorrectToolForDrops()
.sound(SoundType.NETHERITE_BLOCK))
.recipe((c, p) -> p.stonecutting(DataIngredient.tag(AllTags.forgeItemTag("ingots/aluminum")), RecipeCategory.BUILDING_BLOCKS, c::get, 1))
.transform(pickaxeOnly())
.simpleItem()
.register();
public static final MaterialSet FACTORY_FLOOR_SET = makeVariants(FACTORY_FLOOR);
public static final MaterialSet FACTORY_FLOOR_SET = makeVariants(FACTORY_FLOOR, true);
public static final BlockEntry<Block> HARDENED_PLANKS =
REGISTRATE.block("hardened_planks", Block::new)
.initialProperties(() -> Blocks.OAK_PLANKS)
.properties(p -> p
.strength(2.0F)
.sound(SoundType.CHERRY_WOOD))
.transform(axeOnly())
.simpleItem()
.register();
public static final MaterialSet HARDENED_PLANKS_SET = makeVariants(HARDENED_PLANKS, true);
public static final BlockEntry<TrainTrapdoorBlock> STEEL_TRAPDOOR =
REGISTRATE.block("steel_trapdoor", TrainTrapdoorBlock::new)
@@ -1722,7 +1743,7 @@ public class TFMGBlocks {
ALUMINUM_FLYWHEEL = flywheel("aluminum", TFMGFlywheelBlock::aluminum),
NICKEL_FLYWHEEL = flywheel("nickel", TFMGFlywheelBlock::nickel);
public static String[] DECOR_METALS = {"steel", "aluminum", "cast_iron", "lead", "nickel","constantan" , "copper", "zinc", "brass"};
public static String[] DECOR_METALS = {"steel", "aluminum", "cast_iron", "lead", "nickel", "constantan", "copper", "zinc", "brass"};
public static final List<BlockEntry<TrussBlock>> TRUSSES = new ArrayList<>();
public static final List<BlockEntry<FrameBlock>> FRAMES = new ArrayList<>();
@@ -1780,7 +1801,7 @@ public class TFMGBlocks {
.transform(customItemModel())
.register();
public static final BlockEntry<RebarStairsBlock> REBAR_STAIRS =
REGISTRATE.block("rebar_stairs", p->new RebarStairsBlock(REBAR_PILE.getDefaultState(), p))
REGISTRATE.block("rebar_stairs", p -> new RebarStairsBlock(REBAR_PILE.getDefaultState(), p))
.initialProperties(() -> Blocks.IRON_BLOCK)
.properties(p -> p.noOcclusion())
.properties(p -> p.sound(SoundType.NETHERITE_BLOCK))
@@ -1805,6 +1826,11 @@ public class TFMGBlocks {
public static final MaterialSet CONCRETE = generateConcrete(false);
public static final MaterialSet REBAR_CONCRETE = generateConcrete(true);
public static final Map<String, MaterialSet> COLORED_CONCRETE = generateColoredConcrete(false);
public static final Map<String, MaterialSet> COLORED_REBAR_CONCRETE = generateColoredConcrete(true);
public static final BlockEntry<Block> ASPHALT = REGISTRATE.block("asphalt", Block::new)
.initialProperties(() -> Blocks.STONE)
.properties(p -> p.requiresCorrectToolForDrops())

View File

@@ -42,7 +42,7 @@ public class TFMGFluids {
PROPYLENE = gas("propylene"),
NEON = gas("neon"),
CARBON_DIOXIDE = gas("carbon_dioxide"),
AIR = gas("air"),
AIR = gas("air",TFMGTags.TFMGFluidTags.AIR.tag),
HOT_AIR = gas("hot_air");
@@ -60,7 +60,7 @@ public class TFMGFluids {
MOLTEN_PLASTIC = hotFluid("molten_plastic", 0x010101),
LIQUID_SILICON = hotFluid("liquid_silicon", 0x010101),
LUBRICATION_OIL = fluid("lubrication_oil", 0x010101, TFMGTags.TFMGFluidTags.LUBRICATION_OIL.tag, TFMGTags.TFMGFluidTags.FLAMMABLE.tag),
COOLING_FLUID = fluid("cooling_fluid", 0x010101),
COOLING_FLUID = fluid("cooling_fluid", 0x010101, TFMGTags.TFMGFluidTags.COOLING_FLUID.tag),
NAPALM = fluid("napalm", 0x010101),
SULFURIC_ACID = fluid("sulfuric_acid", 0x010101),

View File

@@ -3,15 +3,15 @@ package com.drmangotea.tfmg.registry;
import com.drmangotea.tfmg.TFMG;
import com.drmangotea.tfmg.base.TFMGArmorMaterials;
import com.drmangotea.tfmg.base.TFMGTiers;
import com.drmangotea.tfmg.content.electricity.measurement.MultimeterItem;
import com.drmangotea.tfmg.content.engines.CylinderItem;
import com.drmangotea.tfmg.content.decoration.gearbox.SteelVerticalGearboxItem;
import com.drmangotea.tfmg.content.electricity.connection.cables.CableConnection;
import com.drmangotea.tfmg.content.electricity.debug.DebugCinderBlockItem;
import com.drmangotea.tfmg.content.electricity.electrians_wrench.ElectriciansWrenchItem;
import com.drmangotea.tfmg.content.electricity.measurement.MultimeterItem;
import com.drmangotea.tfmg.content.electricity.utilities.fuse_block.FuseItem;
import com.drmangotea.tfmg.content.electricity.utilities.resistor.ResistorItem;
import com.drmangotea.tfmg.content.electricity.utilities.transformer.ElectromagneticCoilItem;
import com.drmangotea.tfmg.content.engines.CylinderItem;
import com.drmangotea.tfmg.content.engines.FluidContainingItem;
import com.drmangotea.tfmg.content.engines.upgrades.TransmissionItem;
import com.drmangotea.tfmg.content.items.CoalCokeItem;
@@ -28,15 +28,23 @@ import com.drmangotea.tfmg.content.items.weapons.lithium_blade.LithiumBladeItem;
import com.drmangotea.tfmg.content.items.weapons.quad_potato_cannon.QuadPotatoCannonItem;
import com.drmangotea.tfmg.content.machinery.misc.winding_machine.SpoolItem;
import com.drmangotea.tfmg.content.machinery.oil_processing.pumpjack.pumpjack.base.DepositItem;
import dev.engine_room.flywheel.lib.model.baked.PartialModel;
import com.simibubi.create.AllTags;
import com.simibubi.create.content.processing.sequenced.SequencedAssemblyItem;
import com.simibubi.create.foundation.data.AssetLookup;
import com.simibubi.create.foundation.data.CreateRegistrate;
import com.tterrag.registrate.builders.ItemBuilder;
import com.tterrag.registrate.util.DataIngredient;
import com.tterrag.registrate.util.entry.ItemEntry;
import dev.engine_room.flywheel.lib.model.baked.PartialModel;
import net.minecraft.data.recipes.RecipeCategory;
import net.minecraft.tags.TagKey;
import net.minecraft.world.item.*;
import net.minecraft.world.level.block.Blocks;
import net.minecraftforge.common.Tags;
import java.util.ArrayList;
import java.util.List;
import static com.drmangotea.tfmg.TFMG.REGISTRATE;
import static com.drmangotea.tfmg.base.TFMGBuilderTransformers.COLORS;
import static com.drmangotea.tfmg.content.items.weapons.explosives.thermite_grenades.ThermiteGrenade.ChemicalColor.*;
@@ -73,16 +81,30 @@ public class TFMGItems {
RAW_LEAD = taggedIngredient("raw_lead", forgeItemTag("raw_materials/lead"), forgeItemTag("raw_materials")),
RAW_NICKEL = taggedIngredient("raw_nickel", forgeItemTag("raw_materials/nickel"), forgeItemTag("raw_materials")),
RAW_LITHIUM = taggedIngredient("raw_lithium", forgeItemTag("raw_materials/lithium"), forgeItemTag("raw_materials")),
COPPER_WIRE = taggedIngredient("copper_wire", forgeItemTag("wires/copper")),
ALUMINUM_WIRE = taggedIngredient("aluminum_wire", forgeItemTag("wires/aluminum")),
CONSTANTAN_WIRE = taggedIngredient("constantan_wire", forgeItemTag("wires/constantan")),
SYNTHETIC_LEATHER = taggedIngredient("synthetic_leather", Tags.Items.LEATHER, AllTags.forgeItemTag("leather")),
SYNTHETIC_STRING = taggedIngredient("synthetic_string", Tags.Items.STRING, AllTags.forgeItemTag("string")),
LIMESAND = taggedIngredient("limesand", TFMGTags.TFMGItemTags.FLUX.tag),
SULFUR_DUST = taggedIngredient("sulfur_dust", forgeItemTag("dusts/sulfur")),
RUBBER_SHEET = taggedIngredient("rubber_sheet", forgeItemTag("ingots/rubber")),
SILICON_INGOT = taggedIngredient("silicon_ingot", forgeItemTag("ingots/silicon")),
REBAR = taggedIngredient("rebar", forgeItemTag("rods/steel"));
SILICON_INGOT = taggedIngredient("silicon_ingot", forgeItemTag("ingots/silicon"));
public static final ItemEntry<Item>
REBAR = REGISTRATE.item("rebar", Item::new)
.tag(AllTags.forgeItemTag("rods/steel"))
.recipe((c, p) -> p.stonecutting(DataIngredient.tag(AllTags.forgeItemTag("ingots/steel")), RecipeCategory.BUILDING_BLOCKS, c::get, 4))
.register(),
SYNTHETIC_STRING = REGISTRATE.item("synthetic_string", Item::new)
.tag(Tags.Items.STRING, AllTags.forgeItemTag("string"))
.recipe((c, p) -> p.stonecutting(DataIngredient.tag(AllTags.forgeItemTag("ingots/rubber")), RecipeCategory.MISC, c::get, 4))
.register();
public static final ItemEntry<Item>
COPPER_WIRE = REGISTRATE.item("copper_wire", Item::new).tag(AllTags.forgeItemTag("wires/copper"))
.recipe((c, p) -> p.stonecutting(DataIngredient.tag(AllTags.forgeItemTag("ingots/copper")), RecipeCategory.BUILDING_BLOCKS, c::get, 2)).register(),
ALUMINUM_WIRE = REGISTRATE.item("aluminum_wire", Item::new).tag(AllTags.forgeItemTag("wires/aluminum"))
.recipe((c, p) -> p.stonecutting(DataIngredient.tag(AllTags.forgeItemTag("ingots/aluminum")), RecipeCategory.BUILDING_BLOCKS, c::get, 2)).register(),
CONSTANTAN_WIRE = REGISTRATE.item("constantan_wire", Item::new).tag(AllTags.forgeItemTag("wires/constantan"))
.recipe((c, p) -> p.stonecutting(DataIngredient.tag(AllTags.forgeItemTag("ingots/constantan")), RecipeCategory.BUILDING_BLOCKS, c::get, 2)).register();
public static final ItemEntry<Item>
SPARK_PLUG = REGISTRATE.item("spark_plug", Item::new).register(),
@@ -90,13 +112,16 @@ public class TFMGItems {
BITUMEN = REGISTRATE.item("bitumen", Item::new).register(),
FIREPROOF_BRICK = REGISTRATE.item("fireproof_brick", Item::new).register(),
FIRECLAY_BALL = REGISTRATE.item("fireclay_ball", Item::new).register(),
SCREW = REGISTRATE.item("screw", Item::new).register(),
SCREW = REGISTRATE.item("screw", Item::new)
.recipe((c, p) -> p.stonecutting(DataIngredient.tag(AllTags.forgeItemTag("ingots/steel")), RecipeCategory.BUILDING_BLOCKS, c::get, 4))
.register(),
TURBINE_BLADE = REGISTRATE.item("turbine_blade", Item::new).register(),
THERMITE_POWDER = REGISTRATE.item("thermite_powder", Item::new).register(),
STEEL_MECHANISM = REGISTRATE.item("steel_mechanism", Item::new).register(),
NITRATE_DUST = REGISTRATE.item("nitrate_dust", Item::new).register(),
CONCRETE_MIXTURE = REGISTRATE.item("concrete_mixture", Item::new).register(),
MAGNETIC_ALLOY_INGOT = REGISTRATE.item("magnetic_alloy_ingot", Item::new).register(),
BAUXITE_POWDER = REGISTRATE.item("bauxite_powder", Item::new).register(),
MAGNET = REGISTRATE.item("magnet", Item::new).register(),
EMPTY_CIRCUIT_BOARD = REGISTRATE.item("empty_circuit_board", Item::new).register(),
COATED_CIRCUIT_BOARD = REGISTRATE.item("coated_circuit_board", Item::new).register(),
@@ -125,31 +150,42 @@ public class TFMGItems {
.lang("N-Semiconductor").register(),
COPPER_ELECTRODE = REGISTRATE.item("copper_electrode", Item::new)
.properties(p -> p.stacksTo(1))
.recipe((c, p) -> p.stonecutting(DataIngredient.tag(AllTags.forgeItemTag("storage_blocks/copper")), RecipeCategory.BUILDING_BLOCKS, c::get, 1))
.model((c, p) -> p.withExistingParent(c.getName(), TFMG.asResource("item/copper_electrode_model"))).register(),
ZINC_ELECTRODE = REGISTRATE.item("zinc_electrode", Item::new)
.properties(p -> p.stacksTo(1))
.recipe((c, p) -> p.stonecutting(DataIngredient.tag(AllTags.forgeItemTag("storage_blocks/zinc")), RecipeCategory.BUILDING_BLOCKS, c::get, 1))
.model((c, p) -> p.withExistingParent(c.getName(), TFMG.asResource("item/zinc_electrode_model"))).register(),
GRAPHITE_ELECTRODE = REGISTRATE.item("graphite_electrode", Item::new)
.properties(p -> p.stacksTo(1))
.recipe((c, p) -> p.stonecutting(DataIngredient.tag(AllTags.forgeItemTag("storage_blocks/coal_coke")), RecipeCategory.BUILDING_BLOCKS, c::get, 1))
.model((c, p) -> p.withExistingParent(c.getName(), TFMG.asResource("item/graphite_electrode_model"))).register(),
UNFIRED_INSULATOR = REGISTRATE.item("unfired_insulator", Item::new)
.model((c, p) -> p.withExistingParent(c.getName(), TFMG.asResource("item/unfired_insulator_model"))).register(),
.model((c, p) -> p.withExistingParent(c.getName(), TFMG.asResource("item/unfired_insulator_model")))
.recipe((c, p) -> p.stonecutting(DataIngredient.items(Blocks.CLAY.asItem()), RecipeCategory.BUILDING_BLOCKS, c::get, 1))
.register(),
UNFINISHED_INSULATOR = REGISTRATE.item("unfinished_insulator", Item::new)
.model((c, p) -> p.withExistingParent(c.getName(), TFMG.asResource("item/unfinished_insulator_model"))).register(),
GLASS_INSULATOR_SEGMENT = REGISTRATE.item("glass_insulator_segment", Item::new)
.model((c, p) -> p.withExistingParent(c.getName(), TFMG.asResource("item/glass_insulator_segment_model"))).register();
public static final ItemEntry<TransmissionItem>
TRANSMISSION = REGISTRATE.item("transmission", TransmissionItem::new).register();
TRANSMISSION = REGISTRATE.item("transmission", TransmissionItem::new)
.model((c, p) -> p.withExistingParent(c.getName(), TFMG.asResource("item/transmission_model"))).register();
public static final ItemEntry<ResistorItem>
UNFINISHED_RESISTOR = REGISTRATE.item("unfinished_resistor", ResistorItem::new).register();
public static final ItemEntry<CylinderItem>
ENGINE_CYLINDER = REGISTRATE.item("engine_cylinder", CylinderItem::new).register();
public static final ItemEntry<SpoolItem>
EMPTY_SPOOL = spoolItem("empty", null, 0x000000, CableConnection.CableType.NONE),
COPPER_SPOOL = spoolItem("copper", TFMGPartialModels.COPPER_SPOOL, 0xD8735A, CableConnection.CableType.COPPER),
ALUMINUM_SPOOL = spoolItem("aluminum", TFMGPartialModels.ALUMINUM_SPOOL, 0xEDEFEF, CableConnection.CableType.ALUMINUM),
CONSTANTAN_SPOOL = spoolItem("constantan", TFMGPartialModels.CONSTANTAN_SPOOL, 0xCFC2A8, CableConnection.CableType.CONSTANTAN);
EMPTY_SPOOL = spoolItem("empty", null, 0x000000, CableConnection.CableType.NONE)
.recipe((c, p) -> p.stonecutting(DataIngredient.items(TFMGBlocks.HARDENED_PLANKS.asItem()), RecipeCategory.BUILDING_BLOCKS, c::get, 1))
.register(),
COPPER_SPOOL = spoolItem("copper", TFMGPartialModels.COPPER_SPOOL, 0xD8735A, CableConnection.CableType.COPPER)
.register(),
ALUMINUM_SPOOL = spoolItem("aluminum", TFMGPartialModels.ALUMINUM_SPOOL, 0xEDEFEF, CableConnection.CableType.ALUMINUM)
.register(),
CONSTANTAN_SPOOL = spoolItem("constantan", TFMGPartialModels.CONSTANTAN_SPOOL, 0xCFC2A8, CableConnection.CableType.CONSTANTAN)
.register();
public static final ItemEntry<ElectromagneticCoilItem> ELECTROMAGNETIC_COIL =
REGISTRATE.item("electromagnetic_coil", ElectromagneticCoilItem::new)
@@ -183,11 +219,11 @@ public class TFMGItems {
STEEL_LEGGINGS = armor("steel_leggings", TFMGArmorMaterials.STEEL, ArmorItem.Type.LEGGINGS),
STEEL_BOOTS = armor("steel_boots", TFMGArmorMaterials.STEEL, ArmorItem.Type.BOOTS);
public static final ItemEntry<SwordItem>
STEEL_SWORD = toolset("steel", TFMGTiers.STEEL),
ALUMINUM_SWORD = toolset("aluminum", TFMGTiers.ALUMINUM);
public static final List<ItemEntry<?>>
STEEL_TOOLS = toolset("steel", TFMGTiers.STEEL),
ALUMINUM_TOOLS = toolset("aluminum", TFMGTiers.ALUMINUM);
public static final ItemEntry<LeadSwordItem> LEAD_SWORD = leadToolset();
public static final List<ItemEntry<?>> LEAD_TOOLS = leadToolset();
public static final ItemEntry<LithiumBladeItem> LITHIUM_BLADE =
REGISTRATE.item("lithium_blade", p -> new LithiumBladeItem(TFMGTiers.STEEL, 3, -2.4F, p))
@@ -226,6 +262,7 @@ public class TFMGItems {
UNFINISHED_STEEL_MECHANISM = sequencedIngredient("unfinished_steel_mechanism"),
UNFINISHED_TRANSISTOR = sequencedIngredient("unfinished_transistor"),
UNFINISHED_CAPACITOR = sequencedIngredient("unfinished_capacitor"),
UNFINISHED_CIRCUIT_BOARD = sequencedIngredient("unfinished_circuit_board"),
UNPROCESSED_HEAVY_PLATE = sequencedIngredient("unprocessed_heavy_plate");
@@ -247,7 +284,7 @@ public class TFMGItems {
.properties(p -> p.stacksTo(1))
.register();
public static final ItemEntry<ElectriciansWrenchItem>
ELECTRICIANS_WRENCH = REGISTRATE.item("electricians_wrench", ElectriciansWrenchItem::new)
CONFIGURATION_WRENCH = REGISTRATE.item("electricians_wrench", ElectriciansWrenchItem::new)
.lang("Configuration Wrench")
.register();
@@ -275,34 +312,38 @@ public class TFMGItems {
return REGISTRATE.item(name, p -> new ArmorItem(material, slot, p)).register();
}
private static ItemEntry<SwordItem> toolset(String material, Tier tier) {
private static List<ItemEntry<?>> toolset(String material, Tier tier) {
REGISTRATE.item(material + "_axe", p -> new AxeItem(tier, 6.0F, -3.2F, p))
.model((ctx, prov) -> prov
.withExistingParent(material + "_axe", "minecraft:item/handheld")
.texture("layer0", "tfmg:item/" + material + "_axe"))
.register();
REGISTRATE.item(material + "_hoe", p -> new HoeItem(tier, 0, -3.0F, p))
.model((ctx, prov) -> prov
.withExistingParent(material + "_hoe", "minecraft:item/handheld")
.texture("layer0", "tfmg:item/" + material + "_hoe"))
.register();
REGISTRATE.item(material + "_shovel", p -> new ShovelItem(tier, 1.5F, -3.0F, p))
.model((ctx, prov) -> prov
.withExistingParent(material + "_shovel", "minecraft:item/handheld")
.texture("layer0", "tfmg:item/" + material + "_shovel"))
.register();
REGISTRATE.item(material + "_pickaxe", p -> new PickaxeItem(tier, 1, -2.8F, p))
.model((ctx, prov) -> prov
.withExistingParent(material + "_pickaxe", "minecraft:item/handheld")
.texture("layer0", "tfmg:item/" + material + "_pickaxe"))
.register();
List<ItemEntry<?>> list = new ArrayList<>();
return REGISTRATE.item(material + "_sword", p -> new SwordItem(tier, 3, -2.4F, p))
list.add(REGISTRATE.item(material + "_sword", p -> new SwordItem(tier, 3, -2.4F, p))
.model((ctx, prov) -> prov
.withExistingParent(material + "_sword", "minecraft:item/handheld")
.texture("layer0", "tfmg:item/" + material + "_sword"))
.register();
.register());
list.add(REGISTRATE.item(material + "_pickaxe", p -> new PickaxeItem(tier, 1, -2.8F, p))
.model((ctx, prov) -> prov
.withExistingParent(material + "_pickaxe", "minecraft:item/handheld")
.texture("layer0", "tfmg:item/" + material + "_pickaxe"))
.register());
list.add(REGISTRATE.item(material + "_axe", p -> new AxeItem(tier, 6.0F, -3.2F, p))
.model((ctx, prov) -> prov
.withExistingParent(material + "_axe", "minecraft:item/handheld")
.texture("layer0", "tfmg:item/" + material + "_axe"))
.register());
list.add(REGISTRATE.item(material + "_shovel", p -> new ShovelItem(tier, 1.5F, -3.0F, p))
.model((ctx, prov) -> prov
.withExistingParent(material + "_shovel", "minecraft:item/handheld")
.texture("layer0", "tfmg:item/" + material + "_shovel"))
.register());
list.add(REGISTRATE.item(material + "_hoe", p -> new HoeItem(tier, 0, -3.0F, p))
.model((ctx, prov) -> prov
.withExistingParent(material + "_hoe", "minecraft:item/handheld")
.texture("layer0", "tfmg:item/" + material + "_hoe"))
.register());
return list;
}
public static final ItemEntry<SteelVerticalGearboxItem> STEEL_VERTICAL_GEARBOX =
@@ -312,35 +353,36 @@ public class TFMGItems {
.register();
private static ItemEntry<LeadSwordItem> leadToolset() {
REGISTRATE.item("lead_axe", p -> new LeadAxeItem(TFMGTiers.LEAD, 6.0F, -3.2F, p))
.model((ctx, prov) -> prov
.withExistingParent("lead_axe", "minecraft:item/handheld")
.texture("layer0", "tfmg:item/lead_axe"))
.register();
;
REGISTRATE.item("lead_hoe", p -> new HoeItem(TFMGTiers.LEAD, 0, -3.0F, p))
.model((ctx, prov) -> prov
.withExistingParent("lead_hoe", "minecraft:item/handheld")
.texture("layer0", "tfmg:item/lead_hoe"))
.register();
REGISTRATE.item("lead_shovel", p -> new ShovelItem(TFMGTiers.LEAD, 1.5F, -3.0F, p))
.model((ctx, prov) -> prov
.withExistingParent("lead_shovel", "minecraft:item/handheld")
.texture("layer0", "tfmg:item/lead_shovel"))
.register();
REGISTRATE.item("lead_pickaxe", p -> new PickaxeItem(TFMGTiers.LEAD, 1, -2.8F, p))
.model((ctx, prov) -> prov
.withExistingParent("lead_pickaxe", "minecraft:item/handheld")
.texture("layer0", "tfmg:item/lead_pickaxe"))
.register();
return REGISTRATE.item("lead_sword", p -> new LeadSwordItem(TFMGTiers.LEAD, 3, -2.4F, p))
private static List<ItemEntry<?>> leadToolset() {
List<ItemEntry<?>> list = new ArrayList<>();
list.add(REGISTRATE.item("lead_sword", p -> new LeadSwordItem(TFMGTiers.LEAD, 3, -2.4F, p))
.model((ctx, prov) -> prov
.withExistingParent("lead_sword", "minecraft:item/handheld")
.texture("layer0", "tfmg:item/lead_sword"))
.register();
.register());
list.add(REGISTRATE.item("lead_pickaxe", p -> new PickaxeItem(TFMGTiers.LEAD, 1, -2.8F, p))
.model((ctx, prov) -> prov
.withExistingParent("lead_pickaxe", "minecraft:item/handheld")
.texture("layer0", "tfmg:item/lead_pickaxe"))
.register());
list.add(REGISTRATE.item("lead_axe", p -> new LeadAxeItem(TFMGTiers.LEAD, 6.0F, -3.2F, p))
.model((ctx, prov) -> prov
.withExistingParent("lead_axe", "minecraft:item/handheld")
.texture("layer0", "tfmg:item/lead_axe"))
.register());
list.add(REGISTRATE.item("lead_shovel", p -> new ShovelItem(TFMGTiers.LEAD, 1.5F, -3.0F, p))
.model((ctx, prov) -> prov
.withExistingParent("lead_shovel", "minecraft:item/handheld")
.texture("layer0", "tfmg:item/lead_shovel"))
.register());
list.add(REGISTRATE.item("lead_hoe", p -> new HoeItem(TFMGTiers.LEAD, 0, -3.0F, p))
.model((ctx, prov) -> prov
.withExistingParent("lead_hoe", "minecraft:item/handheld")
.texture("layer0", "tfmg:item/lead_hoe"))
.register());
return list;
}
@@ -372,11 +414,11 @@ public class TFMGItems {
}
}
public static ItemEntry<SpoolItem> spoolItem(String name, PartialModel model, int barColor, CableConnection.CableType type) {
public static ItemBuilder<SpoolItem, CreateRegistrate> spoolItem(String name, PartialModel model, int barColor, CableConnection.CableType type) {
return REGISTRATE.item(name + "_spool", p -> new SpoolItem(p, model, barColor, type))
.tag(TFMGTags.TFMGItemTags.SPOOLS.tag)
.properties(p -> p.stacksTo(1))
.register();
.properties(p -> p.stacksTo(1));
}

View File

@@ -53,9 +53,6 @@ public enum TFMGPackets {
;
;
public static final ResourceLocation CHANNEL_NAME = TFMG.asResource("main");
public static final int NETWORK_VERSION = 3;
public static final String NETWORK_VERSION_STR = String.valueOf(NETWORK_VERSION);

View File

@@ -50,6 +50,7 @@ public class TFMGPartialModels {
TOWER_GAUGE = block("distillation_tower/gauge"),
SURFACE_SCANNER_DIAL = block("surface_scanner/dial"),
SURFACE_SCANNER_FLAG = block("surface_scanner/flag"),
ROTOR = block("rotor/block"),
INGOT_MOLD = block("casting_basin/mold_base"),
BlOCK_MOLD = block("casting_basin/block_mold"),
STATOR_OUTPUT = block("stator/output"),
@@ -61,8 +62,10 @@ public class TFMGPartialModels {
TRAFFIC_LIGHT = block("traffic_light/light"),
NEON_TUBE_LIGHT_CENTER = block("neon_tube/light_center"),
NEON_TUBE_LIGHT_SIDE = block("neon_tube/light_side"),
DIESEL_ENGINE_LINKAGE = block("diesel_engine/linkage"),
DIESEL_ENGINE_PISTON = block("diesel_engine/piston"),
LARGE_ENGINE_LINKAGE = block("large_engine/linkage"),
LARGE_ENGINE_PISTON = block("large_engine/piston"),
SIMPLE_LARGE_ENGINE_LINKAGE = block("simple_large_engine/linkage"),
SIMPLE_LARGE_ENGINE_PISTON = block("simple_large_engine/piston"),
STEEL_COGHWEEL = block("steel_cogwheel_shaftless"),
ENGINE_EXTENSION = block("regular_engine/extension"),
ENGINE_EXTENSION_FRONT = block("regular_engine/extension_front"),
@@ -74,6 +77,7 @@ public class TFMGPartialModels {
ALUMINUM_SPOOL = block("winding_machine/aluminum_spool"),
CONSTANTAN_SPOOL = block("winding_machine/constantan_spool"),
CYLINDER = block("regular_engine/cylinder"),
RADIAL_ENGINE_CYLINDER = block("radial_engine/cylinder"),
SMALL_CYLINDER = block("regular_engine/cylinder_small"),
TRANSFORMER_COIL = block("transformer/coil"),
FUSE = block("fuse_block/fuse"),
@@ -89,6 +93,7 @@ public class TFMGPartialModels {
GOLDEN_TURBO_PROPELLER = block("engine_upgrades/golden_turbo_propeller"),
STEERING_WHEEL = block("engine_controller/wheel"),
PEDAL = block("engine_controller/pedal"),
ENGINE_CONTROLLER_DIAL = block("engine_controller/dial"),
TRANSMISSION_LEVER = block("engine_controller/transmission_lever"),
SMALL_CENTRIFUGE_BOTTOM = block("industrial_mixer/small_centrifuge_bottom"),
SMALL_CENTRIFUGE_MIDDLE = block("industrial_mixer/small_centrifuge_middle"),

View File

@@ -189,6 +189,9 @@ public class TFMGTags {
FLAMMABLE(MOD),
FIREBOX_FUEL(MOD),
BLAST_STOVE_FUEL(MOD),
AIR(NameSpace.FORGE),
COOLING_FLUID(NameSpace.FORGE),
GASOLINE(NameSpace.FORGE),
DIESEL(NameSpace.FORGE),
KEROSENE(NameSpace.FORGE),

View File

@@ -1,8 +1,9 @@
{
"credit": "Made with Blockbench",
"render_type": "minecraft:cutout",
"textures": {
"2": "tfmg:block/aluminum_fluid_valve",
"4": "tfmg:block/aluminum_pipes",
"3": "tfmg:block/aluminum_valve_closed",
"particle": "tfmg:block/aluminum_block"
},
"elements": [
@@ -12,12 +13,38 @@
"to": [14, 14, 14],
"rotation": {"angle": 0, "axis": "y", "origin": [24, 11, 11]},
"faces": {
"north": {"uv": [6, 6, 12, 12], "texture": "#2"},
"east": {"uv": [6, 0, 12, 6], "texture": "#2"},
"south": {"uv": [0, 0, 6, 6], "texture": "#2"},
"west": {"uv": [6, 0, 12, 6], "texture": "#2"},
"up": {"uv": [0, 0, 6, 6], "rotation": 90, "texture": "#2"},
"down": {"uv": [0, 0, 6, 6], "rotation": 90, "texture": "#2"}
"north": {"uv": [1, 1, 7, 7], "rotation": 90, "texture": "#2"},
"east": {"uv": [9, 1, 15, 7], "rotation": 90, "texture": "#2"},
"south": {"uv": [1, 1, 7, 7], "rotation": 90, "texture": "#2"},
"west": {"uv": [9, 1, 15, 7], "rotation": 90, "texture": "#2"},
"up": {"uv": [1, 9, 7, 15], "rotation": 90, "texture": "#2"},
"down": {"uv": [1, 9, 7, 15], "rotation": 90, "texture": "#2"}
}
},
{
"name": "ValveCenter",
"from": [2, 2, 3],
"to": [14, 14, 2],
"rotation": {"angle": 0, "axis": "y", "origin": [24, 11, 12]},
"faces": {
"north": {"uv": [2, 2, 14, 14], "rotation": 90, "texture": "#3"},
"east": {"uv": [7.5, 1, 8, 7], "texture": "#2"},
"west": {"uv": [7.5, 1, 8, 7], "texture": "#2"},
"up": {"uv": [7.5, 1, 8, 7], "rotation": 90, "texture": "#2"},
"down": {"uv": [7.5, 1, 8, 7], "rotation": 90, "texture": "#2"}
}
},
{
"name": "ValveCenter",
"from": [2, 2, 14],
"to": [14, 14, 13],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 13.5]},
"faces": {
"east": {"uv": [7.5, 1, 8, 7], "texture": "#2"},
"south": {"uv": [2, 2, 14, 14], "rotation": 90, "texture": "#3"},
"west": {"uv": [7.5, 1, 8, 7], "texture": "#2"},
"up": {"uv": [7.5, 1, 8, 7], "rotation": 270, "texture": "#2"},
"down": {"uv": [7.5, 1, 8, 7], "rotation": 270, "texture": "#2"}
}
},
{
@@ -25,12 +52,12 @@
"to": [13, 16, 13],
"rotation": {"angle": 0, "axis": "z", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [4, 8.5, 9, 9.5], "texture": "#4"},
"east": {"uv": [4, 8.5, 9, 9.5], "texture": "#4"},
"south": {"uv": [4, 8.5, 9, 9.5], "texture": "#4"},
"west": {"uv": [4, 8.5, 9, 9.5], "texture": "#4"},
"up": {"uv": [11, 11, 16, 16], "rotation": 90, "texture": "#4"},
"down": {"uv": [0, 0, 0, 0], "rotation": 90, "texture": "#4"}
"north": {"uv": [7.5, 1.5, 8.5, 6.5], "rotation": 90, "texture": "#2"},
"east": {"uv": [7.5, 1.5, 8.5, 6.5], "rotation": 90, "texture": "#2"},
"south": {"uv": [7.5, 1.5, 8.5, 6.5], "rotation": 90, "texture": "#2"},
"west": {"uv": [7.5, 1.5, 8.5, 6.5], "rotation": 90, "texture": "#2"},
"up": {"uv": [1.5, 9.5, 6.5, 14.5], "rotation": 90, "texture": "#2"},
"down": {"uv": [0, 0, 0, 0], "rotation": 90, "texture": "#2"}
}
},
{
@@ -38,12 +65,12 @@
"to": [13, 2, 13],
"rotation": {"angle": 0, "axis": "z", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [4, 9.5, 9, 8.5], "texture": "#4"},
"east": {"uv": [4, 9.5, 9, 8.5], "texture": "#4"},
"south": {"uv": [4, 9.5, 9, 8.5], "texture": "#4"},
"west": {"uv": [4, 9.5, 9, 8.5], "texture": "#4"},
"up": {"uv": [0, 0, 0, 0], "rotation": 90, "texture": "#4"},
"down": {"uv": [16, 11, 11, 16], "rotation": 90, "texture": "#4"}
"north": {"uv": [8.5, 1.5, 7.5, 6.5], "rotation": 90, "texture": "#2"},
"east": {"uv": [8.5, 1.5, 7.5, 6.5], "rotation": 90, "texture": "#2"},
"south": {"uv": [8.5, 1.5, 7.5, 6.5], "rotation": 90, "texture": "#2"},
"west": {"uv": [8.5, 1.5, 7.5, 6.5], "rotation": 90, "texture": "#2"},
"up": {"uv": [0, 0, 0, 0], "rotation": 90, "texture": "#2"},
"down": {"uv": [7, 9, 1, 15], "rotation": 90, "texture": "#2"}
}
}
]

View File

@@ -1,8 +1,9 @@
{
"credit": "Made with Blockbench",
"render_type": "minecraft:cutout",
"textures": {
"2": "tfmg:block/aluminum_fluid_valve",
"4": "tfmg:block/aluminum_pipes",
"3": "tfmg:block/aluminum_valve_open",
"particle": "tfmg:block/aluminum_block"
},
"elements": [
@@ -12,12 +13,12 @@
"to": [14, 14, 14],
"rotation": {"angle": 0, "axis": "y", "origin": [24, 11, 11]},
"faces": {
"north": {"uv": [6, 6, 12, 12], "texture": "#2"},
"east": {"uv": [6, 0, 12, 6], "texture": "#2"},
"south": {"uv": [0, 6, 6, 12], "texture": "#2"},
"west": {"uv": [6, 0, 12, 6], "texture": "#2"},
"up": {"uv": [0, 0, 6, 6], "rotation": 90, "texture": "#2"},
"down": {"uv": [0, 0, 6, 6], "rotation": 90, "texture": "#2"}
"north": {"uv": [1, 1, 7, 7], "rotation": 90, "texture": "#2"},
"east": {"uv": [9, 1, 15, 7], "rotation": 90, "texture": "#2"},
"south": {"uv": [1, 1, 7, 7], "rotation": 90, "texture": "#2"},
"west": {"uv": [9, 1, 15, 7], "rotation": 90, "texture": "#2"},
"up": {"uv": [1, 9, 7, 15], "rotation": 90, "texture": "#2"},
"down": {"uv": [1, 9, 7, 15], "rotation": 90, "texture": "#2"}
}
},
{
@@ -25,12 +26,12 @@
"to": [13, 16, 13],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [4, 8.5, 9, 9.5], "texture": "#4"},
"east": {"uv": [4, 8.5, 9, 9.5], "texture": "#4"},
"south": {"uv": [4, 8.5, 9, 9.5], "texture": "#4"},
"west": {"uv": [4, 8.5, 9, 9.5], "texture": "#4"},
"up": {"uv": [11, 11, 16, 16], "rotation": 90, "texture": "#4"},
"down": {"uv": [0, 0, 0, 0], "rotation": 90, "texture": "#4"}
"north": {"uv": [7.5, 1.5, 8.5, 6.5], "rotation": 90, "texture": "#2"},
"east": {"uv": [7.5, 1.5, 8.5, 6.5], "rotation": 90, "texture": "#2"},
"south": {"uv": [7.5, 1.5, 8.5, 6.5], "rotation": 90, "texture": "#2"},
"west": {"uv": [7.5, 1.5, 8.5, 6.5], "rotation": 90, "texture": "#2"},
"up": {"uv": [1.5, 9.5, 6.5, 14.5], "rotation": 90, "texture": "#2"},
"down": {"uv": [0, 0, 0, 0], "rotation": 90, "texture": "#2"}
}
},
{
@@ -38,12 +39,38 @@
"to": [13, 2, 13],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [4, 9.5, 9, 8.5], "texture": "#4"},
"east": {"uv": [4, 9.5, 9, 8.5], "texture": "#4"},
"south": {"uv": [4, 9.5, 9, 8.5], "texture": "#4"},
"west": {"uv": [4, 9.5, 9, 8.5], "texture": "#4"},
"up": {"uv": [0, 0, 0, 0], "rotation": 90, "texture": "#4"},
"down": {"uv": [16, 11, 11, 16], "rotation": 90, "texture": "#4"}
"north": {"uv": [8.5, 1.5, 7.5, 6.5], "rotation": 90, "texture": "#2"},
"east": {"uv": [8.5, 1.5, 7.5, 6.5], "rotation": 90, "texture": "#2"},
"south": {"uv": [8.5, 1.5, 7.5, 6.5], "rotation": 90, "texture": "#2"},
"west": {"uv": [8.5, 1.5, 7.5, 6.5], "rotation": 90, "texture": "#2"},
"up": {"uv": [0, 0, 0, 0], "rotation": 90, "texture": "#2"},
"down": {"uv": [7, 9, 1, 15], "rotation": 90, "texture": "#2"}
}
},
{
"name": "ValveCenter",
"from": [2, 2, 3],
"to": [14, 14, 2],
"rotation": {"angle": 0, "axis": "y", "origin": [24, 11, 12]},
"faces": {
"north": {"uv": [2, 2, 14, 14], "rotation": 90, "texture": "#3"},
"east": {"uv": [7.5, 1, 8, 7], "texture": "#2"},
"west": {"uv": [7.5, 1, 8, 7], "texture": "#2"},
"up": {"uv": [7.5, 1, 8, 7], "rotation": 90, "texture": "#2"},
"down": {"uv": [7.5, 1, 8, 7], "rotation": 90, "texture": "#2"}
}
},
{
"name": "ValveCenter",
"from": [2, 2, 14],
"to": [14, 14, 13],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 13.5]},
"faces": {
"east": {"uv": [7.5, 1, 8, 7], "texture": "#2"},
"south": {"uv": [2, 2, 14, 14], "rotation": 90, "texture": "#3"},
"west": {"uv": [7.5, 1, 8, 7], "texture": "#2"},
"up": {"uv": [7.5, 1, 8, 7], "rotation": 270, "texture": "#2"},
"down": {"uv": [7.5, 1, 8, 7], "rotation": 270, "texture": "#2"}
}
}
]

View File

@@ -1,8 +1,9 @@
{
"credit": "Made with Blockbench",
"credit": "Made with Blockbench, praise the pufferfish",
"render_type": "minecraft:cutout",
"textures": {
"2": "tfmg:block/aluminum_fluid_valve",
"3": "tfmg:block/aluminum_pipes",
"4": "tfmg:block/aluminum_valve_closed",
"particle": "tfmg:block/aluminum_block"
},
"elements": [
@@ -12,12 +13,38 @@
"to": [14, 14, 14],
"rotation": {"angle": 0, "axis": "y", "origin": [24, 11, 11]},
"faces": {
"north": {"uv": [6, 6, 12, 12], "rotation": 90, "texture": "#2"},
"east": {"uv": [6, 6, 12, 12], "rotation": 90, "texture": "#2"},
"south": {"uv": [0, 0, 6, 6], "rotation": 90, "texture": "#2"},
"west": {"uv": [6, 6, 12, 12], "rotation": 90, "texture": "#2"},
"up": {"uv": [6, 0, 12, 6], "rotation": 90, "texture": "#2"},
"down": {"uv": [6, 0, 12, 6], "rotation": 90, "texture": "#2"}
"north": {"uv": [1, 1, 7, 7], "texture": "#2"},
"east": {"uv": [1, 9, 7, 15], "rotation": 90, "texture": "#2"},
"south": {"uv": [1, 1, 7, 7], "texture": "#2"},
"west": {"uv": [1, 9, 7, 15], "rotation": 90, "texture": "#2"},
"up": {"uv": [9, 1, 15, 7], "texture": "#2"},
"down": {"uv": [9, 1, 15, 7], "texture": "#2"}
}
},
{
"name": "ValveCenter",
"from": [2, 2, 3],
"to": [14, 14, 2],
"rotation": {"angle": 0, "axis": "y", "origin": [24, 11, 12]},
"faces": {
"north": {"uv": [2, 2, 14, 14], "texture": "#4"},
"east": {"uv": [7.5, 1, 8, 7], "texture": "#2"},
"west": {"uv": [7.5, 1, 8, 7], "texture": "#2"},
"up": {"uv": [7.5, 1, 8, 7], "rotation": 90, "texture": "#2"},
"down": {"uv": [7.5, 1, 8, 7], "rotation": 90, "texture": "#2"}
}
},
{
"name": "ValveCenter",
"from": [2, 2, 14],
"to": [14, 14, 13],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 13.5]},
"faces": {
"east": {"uv": [7.5, 1, 8, 7], "texture": "#2"},
"south": {"uv": [2, 2, 14, 14], "texture": "#4"},
"west": {"uv": [7.5, 1, 8, 7], "texture": "#2"},
"up": {"uv": [7.5, 1, 8, 7], "rotation": 270, "texture": "#2"},
"down": {"uv": [7.5, 1, 8, 7], "rotation": 270, "texture": "#2"}
}
},
{
@@ -25,12 +52,11 @@
"to": [2, 13, 13],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [4, 8.5, 9, 9.5], "rotation": 90, "texture": "#3"},
"east": {"uv": [0, 0, 0, 0], "texture": "#3"},
"south": {"uv": [4, 8.5, 9, 9.5], "rotation": 270, "texture": "#3"},
"west": {"uv": [11, 11, 16, 16], "texture": "#3"},
"up": {"uv": [4, 8.5, 9, 9.5], "rotation": 270, "texture": "#3"},
"down": {"uv": [4, 8.5, 9, 9.5], "rotation": 270, "texture": "#3"}
"north": {"uv": [7.5, 1.5, 8.5, 6.5], "texture": "#2"},
"south": {"uv": [8.5, 1.5, 7.5, 6.5], "texture": "#2"},
"west": {"uv": [1.5, 9.5, 6.5, 14.5], "texture": "#2"},
"up": {"uv": [8.5, 1.5, 7.5, 6.5], "texture": "#2"},
"down": {"uv": [8.5, 1.5, 7.5, 6.5], "texture": "#2"}
}
},
{
@@ -38,12 +64,11 @@
"to": [16, 13, 13],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [4, 9.5, 9, 8.5], "rotation": 90, "texture": "#3"},
"east": {"uv": [16, 11, 11, 16], "texture": "#3"},
"south": {"uv": [4, 9.5, 9, 8.5], "rotation": 270, "texture": "#3"},
"west": {"uv": [0, 0, 0, 0], "texture": "#3"},
"up": {"uv": [4, 9.5, 9, 8.5], "rotation": 270, "texture": "#3"},
"down": {"uv": [4, 9.5, 9, 8.5], "rotation": 270, "texture": "#3"}
"north": {"uv": [7.5, 1.5, 8.5, 6.5], "texture": "#2"},
"east": {"uv": [6.5, 9.5, 1.5, 14.5], "texture": "#2"},
"south": {"uv": [8.5, 1.5, 7.5, 6.5], "texture": "#2"},
"up": {"uv": [8.5, 1.5, 7.5, 6.5], "texture": "#2"},
"down": {"uv": [8.5, 1.5, 7.5, 6.5], "texture": "#2"}
}
}
]

View File

@@ -1,8 +1,9 @@
{
"credit": "Made with Blockbench",
"render_type": "minecraft:cutout",
"textures": {
"2": "tfmg:block/aluminum_fluid_valve",
"3": "tfmg:block/aluminum_pipes",
"4": "tfmg:block/aluminum_valve_open",
"particle": "tfmg:block/aluminum_block"
},
"elements": [
@@ -12,38 +13,62 @@
"to": [14, 14, 14],
"rotation": {"angle": 0, "axis": "y", "origin": [24, 11, 11]},
"faces": {
"north": {"uv": [6, 6, 12, 12], "rotation": 90, "texture": "#2"},
"east": {"uv": [6, 6, 12, 12], "rotation": 90, "texture": "#2"},
"south": {"uv": [0, 6, 6, 12], "rotation": 90, "texture": "#2"},
"west": {"uv": [6, 6, 12, 12], "rotation": 90, "texture": "#2"},
"up": {"uv": [6, 0, 12, 6], "rotation": 90, "texture": "#2"},
"down": {"uv": [6, 0, 12, 6], "rotation": 90, "texture": "#2"}
"north": {"uv": [1, 1, 7, 7], "texture": "#2"},
"east": {"uv": [1, 9, 7, 15], "rotation": 90, "texture": "#2"},
"south": {"uv": [1, 1, 7, 7], "texture": "#2"},
"west": {"uv": [1, 9, 7, 15], "rotation": 90, "texture": "#2"},
"up": {"uv": [9, 1, 15, 7], "texture": "#2"},
"down": {"uv": [9, 1, 15, 7], "texture": "#2"}
}
},
{
"name": "ValveCenter",
"from": [2, 2, 3],
"to": [14, 14, 2],
"rotation": {"angle": 0, "axis": "y", "origin": [24, 11, 12]},
"faces": {
"north": {"uv": [2, 2, 14, 14], "texture": "#4"},
"east": {"uv": [7.5, 1, 8, 7], "texture": "#2"},
"west": {"uv": [7.5, 1, 8, 7], "texture": "#2"},
"up": {"uv": [7.5, 1, 8, 7], "rotation": 90, "texture": "#2"},
"down": {"uv": [7.5, 1, 8, 7], "rotation": 90, "texture": "#2"}
}
},
{
"name": "ValveCenter",
"from": [2, 2, 14],
"to": [14, 14, 13],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 13.5]},
"faces": {
"east": {"uv": [7.5, 1, 8, 7], "texture": "#2"},
"south": {"uv": [2, 2, 14, 14], "texture": "#4"},
"west": {"uv": [7.5, 1, 8, 7], "texture": "#2"},
"up": {"uv": [7.5, 1, 8, 7], "rotation": 270, "texture": "#2"},
"down": {"uv": [7.5, 1, 8, 7], "rotation": 270, "texture": "#2"}
}
},
{
"from": [0, 3, 3],
"to": [2, 13, 13],
"rotation": {"angle": 0, "axis": "z", "origin": [8, 8, 8]},
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [4, 8.5, 9, 9.5], "rotation": 90, "texture": "#3"},
"east": {"uv": [0, 0, 0, 0], "texture": "#3"},
"south": {"uv": [4, 8.5, 9, 9.5], "rotation": 270, "texture": "#3"},
"west": {"uv": [11, 11, 16, 16], "texture": "#3"},
"up": {"uv": [4, 8.5, 9, 9.5], "rotation": 270, "texture": "#3"},
"down": {"uv": [4, 8.5, 9, 9.5], "rotation": 270, "texture": "#3"}
"north": {"uv": [7.5, 1.5, 8.5, 6.5], "texture": "#2"},
"south": {"uv": [8.5, 1.5, 7.5, 6.5], "texture": "#2"},
"west": {"uv": [1.5, 9.5, 6.5, 14.5], "texture": "#2"},
"up": {"uv": [8.5, 1.5, 7.5, 6.5], "texture": "#2"},
"down": {"uv": [8.5, 1.5, 7.5, 6.5], "texture": "#2"}
}
},
{
"from": [14, 3, 3],
"to": [16, 13, 13],
"rotation": {"angle": 0, "axis": "z", "origin": [8, 8, 8]},
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [4, 9.5, 9, 8.5], "rotation": 90, "texture": "#3"},
"east": {"uv": [16, 11, 11, 16], "texture": "#3"},
"south": {"uv": [4, 9.5, 9, 8.5], "rotation": 270, "texture": "#3"},
"west": {"uv": [0, 0, 0, 0], "texture": "#3"},
"up": {"uv": [4, 9.5, 9, 8.5], "rotation": 270, "texture": "#3"},
"down": {"uv": [4, 9.5, 9, 8.5], "rotation": 270, "texture": "#3"}
"north": {"uv": [7.5, 1.5, 8.5, 6.5], "texture": "#2"},
"east": {"uv": [6.5, 9.5, 1.5, 14.5], "texture": "#2"},
"south": {"uv": [8.5, 1.5, 7.5, 6.5], "texture": "#2"},
"up": {"uv": [8.5, 1.5, 7.5, 6.5], "texture": "#2"},
"down": {"uv": [8.5, 1.5, 7.5, 6.5], "texture": "#2"}
}
}
]

View File

@@ -2,8 +2,7 @@
"credit": "Made with Blockbench",
"textures": {
"2": "tfmg:block/aluminum_fluid_valve",
"3": "tfmg:block/aluminum_pipes",
"4": "create:block/pump",
"4": "tfmg:block/aluminum_valve_open",
"1_1": "create:block/axis_top",
"1_0": "create:block/axis",
"particle": "tfmg:block/aluminum_block"
@@ -15,12 +14,60 @@
"to": [14, 14, 14],
"rotation": {"angle": 0, "axis": "y", "origin": [24, 11, 11]},
"faces": {
"north": {"uv": [6, 0, 12, 6], "texture": "#2"},
"east": {"uv": [6, 6, 12, 12], "texture": "#2"},
"south": {"uv": [6, 0, 12, 6], "texture": "#2"},
"west": {"uv": [6, 6, 12, 12], "texture": "#2"},
"up": {"uv": [0, 0, 6, 6], "rotation": 90, "texture": "#2"},
"down": {"uv": [6, 6, 12, 12], "texture": "#2"}
"north": {"uv": [9, 1, 15, 7], "texture": "#2"},
"east": {"uv": [1, 9, 7, 15], "texture": "#2"},
"south": {"uv": [9, 1, 15, 7], "texture": "#2"},
"west": {"uv": [1, 9, 7, 15], "texture": "#2"},
"up": {"uv": [1, 1, 7, 7], "texture": "#2"},
"down": {"uv": [1, 1, 7, 7], "texture": "#2"}
}
},
{
"from": [2, 14, 2],
"to": [14, 13, 14],
"rotation": {"angle": 0, "axis": "y", "origin": [24, 23, 11]},
"faces": {
"north": {"uv": [7.5, 1, 8, 7], "rotation": 90, "texture": "#2"},
"east": {"uv": [7.5, 1, 8, 7], "rotation": 90, "texture": "#2"},
"south": {"uv": [7.5, 1, 8, 7], "rotation": 90, "texture": "#2"},
"west": {"uv": [7.5, 1, 8, 7], "rotation": 90, "texture": "#2"},
"up": {"uv": [2, 2, 14, 14], "texture": "#4"}
}
},
{
"from": [2, 3, 2],
"to": [14, 2, 14],
"rotation": {"angle": 0, "axis": "z", "origin": [8, 2.5, 8]},
"faces": {
"north": {"uv": [7.5, 1, 8, 7], "rotation": 270, "texture": "#2"},
"east": {"uv": [7.5, 1, 8, 7], "rotation": 270, "texture": "#2"},
"south": {"uv": [7.5, 1, 8, 7], "rotation": 270, "texture": "#2"},
"west": {"uv": [7.5, 1, 8, 7], "rotation": 270, "texture": "#2"},
"down": {"uv": [2, 2, 14, 14], "rotation": 180, "texture": "#4"}
}
},
{
"from": [0, 3, 3],
"to": [2, 13, 13],
"rotation": {"angle": 0, "axis": "y", "origin": [1, 8, 8]},
"faces": {
"north": {"uv": [7.5, 1.5, 8.5, 6.5], "texture": "#2"},
"south": {"uv": [8.5, 1.5, 7.5, 6.5], "texture": "#2"},
"west": {"uv": [6.5, 9.5, 1.5, 14.5], "texture": "#2"},
"up": {"uv": [7.5, 1.5, 8.5, 6.5], "rotation": 180, "texture": "#2"},
"down": {"uv": [7.5, 1.5, 8.5, 6.5], "rotation": 180, "texture": "#2"}
}
},
{
"from": [14, 3, 3],
"to": [16, 13, 13],
"rotation": {"angle": 0, "axis": "y", "origin": [16, 0, 0]},
"faces": {
"north": {"uv": [8.5, 1.5, 7.5, 6.5], "texture": "#2"},
"east": {"uv": [6.5, 9.5, 1.5, 14.5], "texture": "#2"},
"south": {"uv": [7.5, 1.5, 8.5, 6.5], "texture": "#2"},
"up": {"uv": [7.5, 1.5, 8.5, 6.5], "texture": "#2"},
"down": {"uv": [7.5, 1.5, 8.5, 6.5], "texture": "#2"}
}
},
{
@@ -37,91 +84,19 @@
}
},
{
"from": [7, 14.1, 5],
"to": [9, 15.1, 7],
"rotation": {"angle": 45, "axis": "y", "origin": [8, 8, 8]},
"from": [4.5, 13.5, 7.5],
"to": [11.5, 13.5, 8.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 13.5, 8]},
"faces": {
"north": {"uv": [14, 0, 12, 1], "rotation": 180, "texture": "#4"},
"east": {"uv": [14, 3, 12, 4], "texture": "#4"},
"south": {"uv": [14, 2, 12, 3], "rotation": 180, "texture": "#4"},
"west": {"uv": [12, 0, 13, 2], "rotation": 270, "texture": "#4"},
"up": {"uv": [14, 2, 12, 0], "rotation": 180, "texture": "#4"},
"down": {"uv": [12, 2, 14, 4], "texture": "#4"}
"up": {"uv": [2, 7.5, 5.5, 8], "texture": "#2"}
}
},
{
"from": [9, 14.1, 5],
"to": [11, 15.1, 9],
"rotation": {"angle": 45, "axis": "y", "origin": [8, 8, 8]},
"from": [4.5, 2.5, 7.5],
"to": [11.5, 2.5, 8.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 2.5, 8]},
"faces": {
"north": {"uv": [16, 0, 14, 1], "texture": "#4"},
"east": {"uv": [15, 0, 16, 4], "rotation": 90, "texture": "#4"},
"south": {"uv": [16, 0, 14, 1], "rotation": 180, "texture": "#4"},
"west": {"uv": [12, 4, 13, 0], "rotation": 90, "texture": "#4"},
"up": {"uv": [16, 4, 14, 0], "rotation": 180, "texture": "#4"},
"down": {"uv": [14, 0, 16, 4], "texture": "#4"}
}
},
{
"from": [5, 14.1, 7],
"to": [7, 15.1, 11],
"rotation": {"angle": 45, "axis": "y", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [16, 0, 14, 1], "rotation": 180, "texture": "#4"},
"east": {"uv": [12, 4, 13, 0], "rotation": 90, "texture": "#4"},
"south": {"uv": [16, 0, 14, 1], "texture": "#4"},
"west": {"uv": [15, 0, 16, 4], "rotation": 90, "texture": "#4"},
"up": {"uv": [16, 4, 14, 0], "texture": "#4"},
"down": {"uv": [14, 0, 16, 4], "rotation": 180, "texture": "#4"}
}
},
{
"from": [7, 14.1, 9],
"to": [9, 15.1, 11],
"rotation": {"angle": 45, "axis": "y", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [14, 2, 12, 3], "rotation": 180, "texture": "#4"},
"east": {"uv": [12, 0, 13, 2], "rotation": 270, "texture": "#4"},
"south": {"uv": [14, 0, 12, 1], "rotation": 180, "texture": "#4"},
"west": {"uv": [14, 3, 12, 4], "texture": "#4"},
"up": {"uv": [14, 2, 12, 0], "texture": "#4"},
"down": {"uv": [12, 2, 14, 4], "rotation": 180, "texture": "#4"}
}
},
{
"name": "Center",
"from": [7, 14, 7],
"to": [9, 16, 9],
"rotation": {"angle": 45, "axis": "y", "origin": [8, 15, 8]},
"faces": {
"north": {"uv": [12.5, 0, 12, 1], "rotation": 90, "texture": "#2"},
"east": {"uv": [13, 0.5, 12, 1], "texture": "#2"},
"south": {"uv": [12, 0.5, 13, 1], "texture": "#2"},
"west": {"uv": [12, 1, 12.5, 0], "rotation": 90, "texture": "#2"},
"up": {"uv": [12, 0, 13, 1], "texture": "#2"}
}
},
{
"from": [0, 3, 3],
"to": [2, 13, 13],
"faces": {
"north": {"uv": [4, 8.5, 9, 9.5], "rotation": 90, "texture": "#3"},
"south": {"uv": [4, 8.5, 9, 9.5], "rotation": 270, "texture": "#3"},
"west": {"uv": [11, 11, 16, 16], "texture": "#3"},
"up": {"uv": [4, 8.5, 9, 9.5], "rotation": 270, "texture": "#3"},
"down": {"uv": [4, 8.5, 9, 9.5], "rotation": 270, "texture": "#3"}
}
},
{
"from": [14, 3, 3],
"to": [16, 13, 13],
"rotation": {"angle": 0, "axis": "y", "origin": [16, 0, 0]},
"faces": {
"north": {"uv": [4, 9.5, 9, 8.5], "rotation": 90, "texture": "#3"},
"east": {"uv": [16, 11, 11, 16], "texture": "#3"},
"south": {"uv": [4, 9.5, 9, 8.5], "rotation": 270, "texture": "#3"},
"up": {"uv": [4, 9.5, 9, 8.5], "rotation": 270, "texture": "#3"},
"down": {"uv": [4, 9.5, 9, 8.5], "rotation": 270, "texture": "#3"}
"down": {"uv": [2, 7.5, 5.5, 8], "rotation": 180, "texture": "#2"}
}
}
],
@@ -153,38 +128,28 @@
"scale": [0.625, 0.625, 0.625]
},
"fixed": {
"rotation": [90, 0, 0],
"scale": [0.5, 0.5, 0.5]
}
},
"groups": [
0,
{
"name": "group",
"origin": [16, 0, 0],
"color": 0,
"children": [0, 1, 2, 3, 4]
},
{
"name": "shaft",
"origin": [8, 8, 8],
"color": 0,
"children": [1]
"children": [5]
},
{
"name": "Pointer",
"origin": [7.5, 14, 8],
"name": "hands",
"origin": [7, 14, 4],
"color": 0,
"children": [
{
"name": "arrow",
"origin": [8, 8, 8],
"color": 0,
"children": []
},
{
"name": "arrow",
"origin": [8, 8, 8],
"color": 0,
"children": [2, 3, 4, 5]
},
6
]
},
7,
8
"children": [6, 7]
}
]
}

View File

@@ -1,151 +0,0 @@
{
"credit": "Made with Blockbench",
"textures": {
"2": "tfmg:block/aluminum_fluid_valve",
"4": "create:block/pump",
"particle": "tfmg:block/aluminum_block"
},
"elements": [
{
"from": [7, 14.1, 5],
"to": [9, 15.1, 7],
"rotation": {"angle": 45, "axis": "y", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [14, 0, 12, 1], "rotation": 180, "texture": "#4"},
"east": {"uv": [14, 3, 12, 4], "texture": "#4"},
"south": {"uv": [14, 2, 12, 3], "rotation": 180, "texture": "#4"},
"west": {"uv": [12, 0, 13, 2], "rotation": 270, "texture": "#4"},
"up": {"uv": [12, 0, 14, 2], "texture": "#4"},
"down": {"uv": [14, 0, 12, 2], "rotation": 180, "texture": "#4"}
}
},
{
"from": [9, 14.1, 5],
"to": [11, 15.1, 9],
"rotation": {"angle": 45, "axis": "y", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [16, 0, 14, 1], "texture": "#4"},
"east": {"uv": [15, 0, 16, 4], "rotation": 90, "texture": "#4"},
"south": {"uv": [16, 0, 14, 1], "rotation": 180, "texture": "#4"},
"up": {"uv": [14, 0, 16, 4], "texture": "#4"},
"down": {"uv": [16, 0, 14, 4], "rotation": 180, "texture": "#4"}
}
},
{
"from": [7, 14.1, 9],
"to": [11, 15.1, 11],
"rotation": {"angle": -45, "axis": "y", "origin": [8, 8, 8]},
"faces": {
"east": {"uv": [16, 0, 14, 1], "texture": "#4"},
"south": {"uv": [15, 0, 16, 4], "rotation": 90, "texture": "#4"},
"west": {"uv": [16, 0, 14, 1], "rotation": 180, "texture": "#4"},
"up": {"uv": [14, 0, 16, 4], "rotation": 90, "texture": "#4"},
"down": {"uv": [16, 0, 14, 4], "rotation": 90, "texture": "#4"}
}
},
{
"from": [9, 14.1, 7],
"to": [11, 15.1, 9],
"rotation": {"angle": -45, "axis": "y", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [12, 0, 13, 2], "rotation": 270, "texture": "#4"},
"east": {"uv": [14, 0, 12, 1], "rotation": 180, "texture": "#4"},
"south": {"uv": [14, 3, 12, 4], "texture": "#4"},
"west": {"uv": [14, 2, 12, 3], "rotation": 180, "texture": "#4"},
"up": {"uv": [12, 0, 14, 2], "rotation": 90, "texture": "#4"},
"down": {"uv": [14, 0, 12, 2], "rotation": 90, "texture": "#4"}
}
},
{
"from": [9, 14.1, 5],
"to": [11, 15.1, 9],
"rotation": {"angle": 45, "axis": "y", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [16, 0, 14, 1], "texture": "#4"},
"east": {"uv": [15, 0, 16, 4], "rotation": 90, "texture": "#4"},
"south": {"uv": [16, 0, 14, 1], "rotation": 180, "texture": "#4"},
"up": {"uv": [14, 0, 16, 4], "texture": "#4"},
"down": {"uv": [16, 0, 14, 4], "rotation": 180, "texture": "#4"}
}
},
{
"from": [7, 14.1, 5],
"to": [9, 15.1, 7],
"rotation": {"angle": 45, "axis": "y", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [14, 0, 12, 1], "rotation": 180, "texture": "#4"},
"east": {"uv": [14, 3, 12, 4], "texture": "#4"},
"south": {"uv": [14, 2, 12, 3], "rotation": 180, "texture": "#4"},
"west": {"uv": [12, 0, 13, 2], "rotation": 270, "texture": "#4"},
"up": {"uv": [12, 0, 14, 2], "texture": "#4"},
"down": {"uv": [14, 0, 12, 2], "rotation": 180, "texture": "#4"}
}
},
{
"name": "Center",
"from": [7, 14, 7],
"to": [9, 16, 9],
"rotation": {"angle": 45, "axis": "y", "origin": [8, 15, 8]},
"faces": {
"north": {"uv": [12.5, 0, 12, 1], "rotation": 90, "texture": "#2"},
"east": {"uv": [13, 0.5, 12, 1], "texture": "#2"},
"south": {"uv": [12, 0.5, 13, 1], "texture": "#2"},
"west": {"uv": [12, 1, 12.5, 0], "rotation": 90, "texture": "#2"},
"up": {"uv": [12, 0, 13, 1], "texture": "#2"}
}
}
],
"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, 135, 0],
"scale": [0.625, 0.625, 0.625]
},
"fixed": {
"scale": [0.5, 0.5, 0.5]
}
},
"groups": [
{
"name": "Pointer",
"origin": [7.5, 14, 8],
"color": 0,
"children": [
{
"name": "arrow",
"origin": [8, 8, 8],
"color": 0,
"children": []
},
{
"name": "arrow",
"origin": [8, 8, 8],
"color": 0,
"children": [0, 1, 2, 3, 4, 5]
},
6
]
}
]
}

View File

@@ -2,101 +2,34 @@
"credit": "Made with Blockbench",
"parent": "create:block/block",
"textures": {
"2": "tfmg:block/aluminum_pipes",
"4": "tfmg:block/aluminum_pump",
"particle": "tfmg:block/aluminum_pump"
},
"elements": [
{
"name": "middle",
"from": [4, 4, 4],
"to": [12, 12, 12],
"rotation": {"angle": 0, "axis": "z", "origin": [8.33333, 8.5, 8]},
"from": [2, 13, 2],
"to": [14, 16, 14],
"rotation": {"angle": 0, "axis": "z", "origin": [8, 14.5, 8]},
"faces": {
"north": {"uv": [0, 6.5, 4, 2.5], "rotation": 90, "texture": "#2"},
"east": {"uv": [0, 6.5, 4, 2.5], "rotation": 90, "texture": "#2"},
"south": {"uv": [0, 6.5, 4, 2.5], "rotation": 90, "texture": "#2"},
"west": {"uv": [0, 6.5, 4, 2.5], "rotation": 90, "texture": "#2"},
"up": {"uv": [0, 6.5, 4, 2.5], "rotation": 90, "texture": "#2"},
"down": {"uv": [0, 6.5, 4, 2.5], "rotation": 90, "texture": "#2"}
"north": {"uv": [8, 0, 6.5, 6], "rotation": 270, "texture": "#4"},
"east": {"uv": [8, 0, 6.5, 6], "rotation": 270, "texture": "#4"},
"south": {"uv": [8, 0, 6.5, 6], "rotation": 270, "texture": "#4"},
"west": {"uv": [8, 0, 6.5, 6], "rotation": 270, "texture": "#4"},
"up": {"uv": [0, 0, 6, 6], "rotation": 180, "texture": "#4"},
"down": {"uv": [0, 0, 6, 6], "texture": "#4"}
}
},
{
"name": "back",
"from": [2, 0, 2],
"to": [14, 5, 14],
"rotation": {"angle": 0, "axis": "z", "origin": [8.33333, 8.5, 8]},
"to": [14, 3, 14],
"rotation": {"angle": 0, "axis": "z", "origin": [8, 1.5, 8]},
"faces": {
"north": {"uv": [13.5, 2, 16, 8], "rotation": 270, "texture": "#2"},
"east": {"uv": [13.5, 2, 16, 8], "rotation": 270, "texture": "#2"},
"south": {"uv": [13.5, 2, 16, 8], "rotation": 270, "texture": "#2"},
"west": {"uv": [13.5, 2, 16, 8], "rotation": 270, "texture": "#2"},
"up": {"uv": [0, 0, 12, 12], "rotation": 180, "texture": "#4"},
"down": {"uv": [0, 0, 12, 12], "texture": "#4"}
}
},
{
"name": "front",
"from": [3, 11, 3],
"to": [13, 16, 13],
"rotation": {"angle": 0, "axis": "z", "origin": [8.33333, 8.5, 8]},
"faces": {
"north": {"uv": [10.5, 2.5, 13, 7.5], "rotation": 90, "texture": "#2"},
"east": {"uv": [10.5, 2.5, 13, 7.5], "rotation": 90, "texture": "#2"},
"south": {"uv": [10.5, 2.5, 13, 7.5], "rotation": 90, "texture": "#2"},
"west": {"uv": [10.5, 2.5, 13, 7.5], "rotation": 90, "texture": "#2"},
"up": {"uv": [11, 11, 16, 16], "texture": "#2"},
"down": {"uv": [6, 11, 11, 16], "texture": "#2"}
}
},
{
"from": [5.85355, 13.25, 1.75],
"to": [9.85355, 15.25, 13.75],
"rotation": {"angle": 45, "axis": "z", "origin": [8.35355, 13.25, 7.75]},
"faces": {
"north": {"uv": [16, 0, 12, 2], "texture": "#4"},
"east": {"uv": [15, 0, 16, 2], "texture": "#4"},
"south": {"uv": [12, 0, 16, 2], "texture": "#4"},
"west": {"uv": [12, 0, 13, 2], "texture": "#4"},
"up": {"uv": [12, 0, 16, 1], "texture": "#4"},
"down": {"uv": [12, 1, 16, 2], "texture": "#4"}
}
},
{
"from": [7.85355, 11.25, 1.75],
"to": [9.85355, 13.25, 13.75],
"rotation": {"angle": 45, "axis": "z", "origin": [8.35355, 13.25, 7.75]},
"faces": {
"north": {"uv": [16, 2, 14, 4], "texture": "#4"},
"east": {"uv": [15, 2, 16, 4], "texture": "#4"},
"south": {"uv": [14, 2, 16, 4], "texture": "#4"},
"west": {"uv": [14, 2, 15, 4], "texture": "#4"},
"down": {"uv": [14, 3, 16, 4], "texture": "#4"}
}
},
{
"from": [2.35355, 10.75, 7.75],
"to": [14.35355, 12.75, 9.75],
"rotation": {"angle": -45, "axis": "x", "origin": [8.35355, 13.25, 7.75]},
"faces": {
"north": {"uv": [14, 2, 15, 4], "texture": "#4"},
"east": {"uv": [16, 2, 14, 4], "texture": "#4"},
"south": {"uv": [15, 2, 16, 4], "texture": "#4"},
"west": {"uv": [14, 2, 16, 4], "texture": "#4"},
"down": {"uv": [14, 3, 16, 4], "rotation": 270, "texture": "#4"}
}
},
{
"from": [2.35355, 12.75, 5.75],
"to": [14.35355, 14.75, 9.75],
"rotation": {"angle": -45, "axis": "x", "origin": [8.35355, 13.25, 7.75]},
"faces": {
"north": {"uv": [12, 0, 13, 2], "texture": "#4"},
"east": {"uv": [16, 0, 12, 2], "texture": "#4"},
"south": {"uv": [15, 0, 16, 2], "texture": "#4"},
"west": {"uv": [12, 0, 16, 2], "texture": "#4"},
"up": {"uv": [12, 0, 16, 1], "rotation": 90, "texture": "#4"},
"down": {"uv": [12, 1, 16, 2], "rotation": 270, "texture": "#4"}
"north": {"uv": [8, 0, 6.5, 6], "rotation": 270, "texture": "#4"},
"east": {"uv": [8, 0, 6.5, 6], "rotation": 270, "texture": "#4"},
"south": {"uv": [8, 0, 6.5, 6], "rotation": 270, "texture": "#4"},
"west": {"uv": [8, 0, 6.5, 6], "rotation": 270, "texture": "#4"},
"up": {"uv": [0, 0, 6, 6], "rotation": 180, "texture": "#4"},
"down": {"uv": [0, 0, 6, 6], "texture": "#4"}
}
}
],
@@ -130,17 +63,5 @@
"fixed": {
"scale": [0.5, 0.5, 0.5]
}
},
"groups": [
{
"name": "pump",
"origin": [8, 8, 8],
"color": 0,
"children": [0, 1, 2]
},
3,
4,
5,
6
]
}
}

View File

@@ -0,0 +1,162 @@
{
"credit": "Made with Blockbench",
"parent": "block/block",
"texture_size": [32, 32],
"textures": {
"2": "tfmg:block/aluminum_pump"
},
"elements": [
{
"from": [6.5, -1, 3],
"to": [9.5, 17, 13],
"forge_data": {"calculate_normals": true},
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [0, 6.5, 9, 8], "rotation": 90, "texture": "#2"},
"east": {"uv": [0, 9, 9, 14], "rotation": 270, "texture": "#2"},
"south": {"uv": [0, 6.5, 9, 8], "rotation": 90, "texture": "#2"},
"west": {"uv": [0, 9, 9, 14], "rotation": 90, "texture": "#2"},
"up": {"uv": [10, 6.5, 15, 8], "rotation": 90, "texture": "#2"},
"down": {"uv": [10, 6.5, 15, 8], "rotation": 90, "texture": "#2"}
}
},
{
"from": [-1, 6.5, 3],
"to": [17, 9.5, 13],
"forge_data": {"calculate_normals": true},
"rotation": {"angle": 0, "axis": "z", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [0, 6.5, 9, 8], "rotation": 180, "texture": "#2"},
"east": {"uv": [10, 6.5, 15, 8], "texture": "#2"},
"south": {"uv": [0, 6.5, 9, 8], "texture": "#2"},
"west": {"uv": [10, 6.5, 15, 8], "texture": "#2"},
"up": {"uv": [0, 9, 9, 14], "rotation": 180, "texture": "#2"},
"down": {"uv": [0, 9, 9, 14], "texture": "#2"}
}
},
{
"from": [6.5, -1, 3],
"to": [9.5, 17, 13],
"forge_data": {"calculate_normals": true},
"rotation": {"angle": 45, "axis": "z", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [0, 6.5, 9, 8], "rotation": 90, "texture": "#2"},
"east": {"uv": [0, 9, 9, 14], "rotation": 270, "texture": "#2"},
"south": {"uv": [0, 6.5, 9, 8], "rotation": 90, "texture": "#2"},
"west": {"uv": [0, 9, 9, 14], "rotation": 90, "texture": "#2"},
"up": {"uv": [10, 6.5, 15, 8], "rotation": 90, "texture": "#2"},
"down": {"uv": [10, 6.5, 15, 8], "rotation": 90, "texture": "#2"}
}
},
{
"from": [-1, 6.5, 3],
"to": [17, 9.5, 13],
"forge_data": {"calculate_normals": true},
"rotation": {"angle": 45, "axis": "z", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [0, 6.5, 9, 8], "rotation": 180, "texture": "#2"},
"east": {"uv": [10, 6.5, 15, 8], "texture": "#2"},
"south": {"uv": [0, 6.5, 9, 8], "texture": "#2"},
"west": {"uv": [10, 6.5, 15, 8], "texture": "#2"},
"up": {"uv": [0, 9, 9, 14], "rotation": 180, "texture": "#2"},
"down": {"uv": [0, 9, 9, 14], "texture": "#2"}
}
},
{
"from": [5.5, 0.9, 3.05],
"to": [10.5, 15.1, 12.95],
"forge_data": {"calculate_normals": true},
"rotation": {"angle": 22.5, "axis": "z", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [1, 7, 1.5, 7.5], "texture": "#2"},
"south": {"uv": [1, 7, 1.5, 7.5], "texture": "#2"},
"up": {"uv": [10, 9, 15, 11.5], "rotation": 90, "texture": "#2"},
"down": {"uv": [10, 9, 15, 11.5], "rotation": 90, "texture": "#2"}
}
},
{
"from": [0.9, 5.5, 3.05],
"to": [15.1, 10.5, 12.95],
"forge_data": {"calculate_normals": true},
"rotation": {"angle": -22.5, "axis": "z", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [1, 7, 1.5, 7.5], "rotation": 90, "texture": "#2"},
"east": {"uv": [10, 9, 15, 11.5], "texture": "#2"},
"south": {"uv": [1, 7, 1.5, 7.5], "rotation": 270, "texture": "#2"},
"west": {"uv": [10, 9, 15, 11.5], "texture": "#2"}
}
},
{
"from": [0.9, 5.5, 3.05],
"to": [15.1, 10.5, 12.95],
"forge_data": {"calculate_normals": true},
"rotation": {"angle": 22.5, "axis": "z", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [1, 7, 1.5, 7.5], "rotation": 90, "texture": "#2"},
"east": {"uv": [10, 9, 15, 11.5], "texture": "#2"},
"south": {"uv": [1, 7, 1.5, 7.5], "rotation": 270, "texture": "#2"},
"west": {"uv": [10, 9, 15, 11.5], "texture": "#2"}
}
},
{
"from": [5.5, 0.9, 3.05],
"to": [10.5, 15.1, 12.95],
"forge_data": {"calculate_normals": true},
"rotation": {"angle": -22.5, "axis": "z", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [1, 7, 1.5, 7.5], "texture": "#2"},
"south": {"uv": [1, 7, 1.5, 7.5], "texture": "#2"},
"up": {"uv": [10, 9, 15, 11.5], "rotation": 90, "texture": "#2"},
"down": {"uv": [10, 9, 15, 11.5], "rotation": 90, "texture": "#2"}
}
}
],
"display": {
"thirdperson_righthand": {
"rotation": [75, -149, 0],
"translation": [0, 2.5, 0],
"scale": [0.375, 0.375, 0.375]
},
"thirdperson_lefthand": {
"rotation": [75, -149, 0],
"translation": [0, 2.5, 0],
"scale": [0.375, 0.375, 0.375]
},
"firstperson_righthand": {
"rotation": [0, -55, 0],
"scale": [0.4, 0.4, 0.4]
},
"firstperson_lefthand": {
"rotation": [0, -55, 0],
"scale": [0.4, 0.4, 0.4]
},
"ground": {
"translation": [0, 1, 1.25],
"scale": [0.25, 0.25, 0.25]
},
"gui": {
"rotation": [30, 45, 0],
"translation": [2.5, -0.5, 0],
"scale": [0.625, 0.625, 0.625]
},
"fixed": {
"rotation": [0, 180, 0],
"translation": [0, 1.75, -4.5],
"scale": [0.5, 0.5, 0.5]
}
},
"groups": [
{
"name": "cogwheel",
"origin": [8, 8, 8],
"color": 0,
"children": [0, 1, 2, 3]
},
{
"name": "group",
"origin": [8, 8, 8],
"color": 0,
"children": [4, 5, 6, 7]
}
]
}

View File

@@ -1,173 +1,132 @@
{
"credit": "Made with Blockbench",
"parent": "create:block/block",
"texture_size": [32, 32],
"textures": {
"2": "tfmg:block/aluminum_pipes",
"4": "tfmg:block/aluminum_pump",
"5": "create:block/millstone",
"particle": "tfmg:block/aluminum_pump"
},
"elements": [
{
"name": "Gear5",
"from": [5.5, 7, -1],
"to": [11.5, 10, 17],
"rotation": {"angle": 0, "axis": "y", "origin": [8.5, 8.5, 8]},
"faces": {
"north": {"uv": [9, 10, 10.5, 13], "rotation": 90, "texture": "#5"},
"east": {"uv": [0, 8.5, 9, 10], "texture": "#5"},
"south": {"uv": [9, 10, 10.5, 13], "rotation": 270, "texture": "#5"},
"west": {"uv": [0, 8.5, 9, 10], "texture": "#5"},
"up": {"uv": [0, 10, 9, 13], "rotation": 270, "texture": "#5"},
"down": {"uv": [0, 10, 9, 13], "rotation": 270, "texture": "#5"}
}
},
{
"name": "Gear6",
"from": [5.5, 7, -1],
"to": [11.5, 10, 17],
"rotation": {"angle": -45, "axis": "x", "origin": [8.5, 8.5, 8]},
"faces": {
"north": {"uv": [9, 10, 10.5, 13], "rotation": 90, "texture": "#5"},
"east": {"uv": [0, 8.5, 9, 10], "texture": "#5"},
"south": {"uv": [9, 10, 10.5, 13], "rotation": 270, "texture": "#5"},
"west": {"uv": [0, 8.5, 9, 10], "texture": "#5"},
"up": {"uv": [0, 10, 9, 13], "rotation": 270, "texture": "#5"},
"down": {"uv": [0, 10, 9, 13], "rotation": 270, "texture": "#5"}
}
},
{
"name": "Gear7",
"from": [5.5, -0.5, 6.5],
"to": [11.5, 17.5, 9.5],
"rotation": {"angle": -45, "axis": "x", "origin": [8.5, 8.5, 8]},
"faces": {
"north": {"uv": [0, 10, 9, 13], "rotation": 90, "texture": "#5"},
"east": {"uv": [0, 8.5, 9, 10], "rotation": 90, "texture": "#5"},
"south": {"uv": [0, 10, 9, 13], "rotation": 270, "texture": "#5"},
"west": {"uv": [0, 8.5, 9, 10], "rotation": 270, "texture": "#5"},
"up": {"uv": [9, 10, 10.5, 13], "rotation": 270, "texture": "#5"},
"down": {"uv": [9, 10, 10.5, 13], "rotation": 270, "texture": "#5"}
}
},
{
"name": "Gear7",
"from": [5.5, -0.5, 6.5],
"to": [11.5, 17.5, 9.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8.5, 8.5, 8]},
"faces": {
"north": {"uv": [0, 10, 9, 13], "rotation": 90, "texture": "#5"},
"east": {"uv": [0, 8.5, 9, 10], "rotation": 90, "texture": "#5"},
"south": {"uv": [0, 10, 9, 13], "rotation": 270, "texture": "#5"},
"west": {"uv": [0, 8.5, 9, 10], "rotation": 270, "texture": "#5"},
"up": {"uv": [9, 10, 10.5, 13], "rotation": 270, "texture": "#5"},
"down": {"uv": [9, 10, 10.5, 13], "rotation": 270, "texture": "#5"}
}
},
{
"name": "GearCaseInner",
"from": [6, 2.5, 2],
"to": [11, 14.5, 14],
"rotation": {"angle": 0, "axis": "y", "origin": [8.5, 8.5, 8]},
"faces": {
"north": {"uv": [0, 6, 6, 8.5], "rotation": 90, "texture": "#5"},
"east": {"uv": [0, 0, 6, 6], "rotation": 270, "texture": "#5"},
"south": {"uv": [0, 6, 6, 8.5], "rotation": 270, "texture": "#5"},
"west": {"uv": [0, 0, 6, 6], "rotation": 270, "texture": "#5"},
"up": {"uv": [0, 6, 6, 8.5], "rotation": 270, "texture": "#5"},
"down": {"uv": [0, 6, 6, 8.5], "rotation": 270, "texture": "#5"}
}
},
{
"name": "middle",
"from": [4.5, 4.5, 4],
"to": [12.5, 12.5, 12],
"rotation": {"angle": 0, "axis": "y", "origin": [8.5, 8.5, 8]},
"faces": {
"north": {"uv": [11.5, 15.5, 15.5, 11.5], "texture": "#2"},
"east": {"uv": [11.5, 15.5, 15.5, 11.5], "texture": "#2"},
"south": {"uv": [11.5, 15.5, 15.5, 11.5], "texture": "#2"},
"west": {"uv": [11.5, 15.5, 15.5, 11.5], "texture": "#2"},
"up": {"uv": [11.5, 15.5, 15.5, 11.5], "texture": "#2"},
"down": {"uv": [11.5, 15.5, 15.5, 11.5], "texture": "#2"}
}
},
{
"name": "front",
"from": [0.5, 3.5, 3],
"to": [5.5, 13.5, 13],
"from": [0, 2, 2],
"to": [3, 14, 14],
"rotation": {"angle": 0, "axis": "z", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [10.5, 2.5, 13, 7.5], "rotation": 180, "texture": "#2"},
"east": {"uv": [6, 11, 11, 16], "rotation": 270, "texture": "#2"},
"south": {"uv": [10.5, 2.5, 13, 7.5], "texture": "#2"},
"west": {"uv": [11, 11, 16, 16], "rotation": 270, "texture": "#2"},
"up": {"uv": [10.5, 2.5, 13, 7.5], "texture": "#2"},
"down": {"uv": [10.5, 2.5, 13, 7.5], "texture": "#2"}
"north": {"uv": [8, 0, 6.5, 6], "texture": "#4"},
"east": {"uv": [0, 0, 6, 6], "rotation": 270, "texture": "#4"},
"south": {"uv": [8, 0, 6.5, 6], "rotation": 180, "texture": "#4"},
"west": {"uv": [0, 0, 6, 6], "rotation": 90, "texture": "#4"},
"up": {"uv": [8, 0, 6.5, 6], "rotation": 180, "texture": "#4"},
"down": {"uv": [8, 0, 6.5, 6], "rotation": 180, "texture": "#4"}
}
},
{
"name": "back",
"from": [11.5, 2.5, 2],
"to": [16.5, 14.5, 14],
"rotation": {"angle": 0, "axis": "y", "origin": [8.5, 11.5, 8]},
"from": [13, 2, 2],
"to": [16, 14, 14],
"rotation": {"angle": 0, "axis": "z", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [13.5, 2, 16, 8], "texture": "#2"},
"east": {"uv": [0, 0, 12, 12], "rotation": 270, "texture": "#4"},
"south": {"uv": [13.5, 2, 16, 8], "rotation": 180, "texture": "#2"},
"west": {"uv": [0, 0, 12, 12], "rotation": 90, "texture": "#4"},
"up": {"uv": [13.5, 2, 16, 8], "rotation": 180, "texture": "#2"},
"down": {"uv": [13.5, 2, 16, 8], "rotation": 180, "texture": "#2"}
"north": {"uv": [8, 0, 6.5, 6], "texture": "#4"},
"east": {"uv": [0, 0, 6, 6], "rotation": 270, "texture": "#4"},
"south": {"uv": [8, 0, 6.5, 6], "rotation": 180, "texture": "#4"},
"west": {"uv": [0, 0, 6, 6], "rotation": 90, "texture": "#4"},
"up": {"uv": [8, 0, 6.5, 6], "rotation": 180, "texture": "#4"},
"down": {"uv": [8, 0, 6.5, 6], "rotation": 180, "texture": "#4"}
}
},
{
"from": [1.70355, 6.15, 2],
"to": [3.70355, 10.15, 14],
"rotation": {"angle": 45, "axis": "z", "origin": [3.35355, 8.25, 7.75]},
"from": [3, -1, 6.5],
"to": [13, 17, 9.5],
"rotation": {"angle": 45, "axis": "x", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [16, 0, 12, 2], "rotation": 90, "texture": "#4"},
"east": {"uv": [12, 1, 16, 2], "rotation": 270, "texture": "#4"},
"south": {"uv": [12, 0, 16, 2], "rotation": 270, "texture": "#4"},
"west": {"uv": [12, 0, 16, 1], "rotation": 270, "texture": "#4"},
"up": {"uv": [15, 0, 16, 2], "rotation": 270, "texture": "#4"},
"down": {"uv": [12, 0, 13, 2], "rotation": 270, "texture": "#4"}
"north": {"uv": [0, 9, 9, 14], "rotation": 270, "texture": "#4"},
"east": {"uv": [0, 6.5, 9, 8], "rotation": 90, "texture": "#4"},
"south": {"uv": [0, 9, 9, 14], "rotation": 90, "texture": "#4"},
"west": {"uv": [0, 6.5, 9, 8], "rotation": 90, "texture": "#4"},
"up": {"uv": [10, 6.5, 15, 8], "texture": "#4"},
"down": {"uv": [10, 6.5, 15, 8], "rotation": 180, "texture": "#4"}
}
},
{
"from": [3.70355, 8.15, 2],
"to": [5.70355, 10.15, 14],
"rotation": {"angle": 45, "axis": "z", "origin": [3.35355, 8.25, 7.75]},
"from": [3, 6.5, -1],
"to": [13, 9.5, 17],
"rotation": {"angle": 45, "axis": "x", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [16, 2, 14, 4], "rotation": 90, "texture": "#4"},
"east": {"uv": [14, 3, 16, 4], "rotation": 270, "texture": "#4"},
"south": {"uv": [14, 2, 16, 4], "rotation": 270, "texture": "#4"},
"up": {"uv": [15, 2, 16, 4], "rotation": 270, "texture": "#4"},
"down": {"uv": [14, 2, 15, 4], "rotation": 270, "texture": "#4"}
"north": {"uv": [10, 6.5, 15, 8], "texture": "#4"},
"east": {"uv": [0, 6.5, 9, 8], "texture": "#4"},
"south": {"uv": [10, 6.5, 15, 8], "texture": "#4"},
"west": {"uv": [0, 6.5, 9, 8], "rotation": 180, "texture": "#4"},
"up": {"uv": [0, 9, 9, 14], "rotation": 90, "texture": "#4"},
"down": {"uv": [0, 9, 9, 14], "rotation": 90, "texture": "#4"}
}
},
{
"from": [3.85355, 2.5, 7.75],
"to": [5.85355, 14.5, 9.75],
"rotation": {"angle": -45, "axis": "y", "origin": [3.35355, 8.25, 7.75]},
"from": [3, -1, 6.5],
"to": [13, 17, 9.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [14, 2, 15, 4], "rotation": 90, "texture": "#4"},
"east": {"uv": [14, 3, 16, 4], "rotation": 180, "texture": "#4"},
"south": {"uv": [15, 2, 16, 4], "rotation": 270, "texture": "#4"},
"up": {"uv": [16, 2, 14, 4], "rotation": 270, "texture": "#4"},
"down": {"uv": [14, 2, 16, 4], "rotation": 270, "texture": "#4"}
"north": {"uv": [0, 14, 9, 9], "rotation": 270, "texture": "#4"},
"east": {"uv": [0, 6.5, 9, 8], "rotation": 90, "texture": "#4"},
"south": {"uv": [0, 9, 9, 14], "rotation": 90, "texture": "#4"},
"west": {"uv": [0, 6.5, 9, 8], "rotation": 90, "texture": "#4"},
"up": {"uv": [10, 6.5, 15, 8], "texture": "#4"},
"down": {"uv": [10, 8, 15, 6.5], "rotation": 180, "texture": "#4"}
}
},
{
"from": [1.85355, 2.5, 5.75],
"to": [3.85355, 14.5, 9.75],
"rotation": {"angle": -45, "axis": "y", "origin": [3.35355, 8.25, 7.75]},
"from": [3, 6.5, -1],
"to": [13, 9.5, 17],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [12, 0, 13, 2], "rotation": 90, "texture": "#4"},
"east": {"uv": [12, 1, 16, 2], "rotation": 180, "texture": "#4"},
"south": {"uv": [15, 0, 16, 2], "rotation": 270, "texture": "#4"},
"west": {"uv": [12, 0, 16, 1], "texture": "#4"},
"up": {"uv": [16, 0, 12, 2], "rotation": 270, "texture": "#4"},
"down": {"uv": [12, 0, 16, 2], "rotation": 270, "texture": "#4"}
"north": {"uv": [10, 6.5, 15, 8], "texture": "#4"},
"east": {"uv": [0, 6.5, 9, 8], "texture": "#4"},
"south": {"uv": [10, 6.5, 15, 8], "texture": "#4"},
"west": {"uv": [0, 6.5, 9, 8], "rotation": 180, "texture": "#4"},
"up": {"uv": [0, 9, 9, 14], "rotation": 90, "texture": "#4"},
"down": {"uv": [0, 9, 9, 14], "rotation": 90, "texture": "#4"}
}
},
{
"from": [3.05, 0.9, 5.5],
"to": [12.95, 15.1, 10.5],
"rotation": {"angle": 22.5, "axis": "x", "origin": [8, 8, 8]},
"faces": {
"east": {"uv": [1, 7, 1.5, 7.5], "texture": "#4"},
"west": {"uv": [1, 7, 1.5, 7.5], "texture": "#4"},
"up": {"uv": [10, 9, 15, 11.5], "texture": "#4"},
"down": {"uv": [10, 9, 15, 11.5], "rotation": 180, "texture": "#4"}
}
},
{
"from": [3.05, 5.5, 0.9],
"to": [12.95, 10.5, 15.1],
"rotation": {"angle": 22.5, "axis": "x", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [10, 9, 15, 11.5], "texture": "#4"},
"east": {"uv": [1, 7, 1.5, 7.5], "rotation": 270, "texture": "#4"},
"south": {"uv": [10, 9, 15, 11.5], "texture": "#4"},
"west": {"uv": [1, 7, 1.5, 7.5], "rotation": 90, "texture": "#4"}
}
},
{
"from": [3.05, 0.9, 5.5],
"to": [12.95, 15.1, 10.5],
"rotation": {"angle": -22.5, "axis": "x", "origin": [8, 8, 8]},
"faces": {
"east": {"uv": [1, 7, 1.5, 7.5], "rotation": 180, "texture": "#4"},
"west": {"uv": [1, 7, 1.5, 7.5], "rotation": 180, "texture": "#4"},
"up": {"uv": [10, 9, 15, 11.5], "rotation": 180, "texture": "#4"},
"down": {"uv": [10, 9, 15, 11.5], "texture": "#4"}
}
},
{
"from": [3.05, 5.5, 0.9],
"to": [12.95, 10.5, 15.1],
"rotation": {"angle": -22.5, "axis": "x", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [10, 9, 15, 11.5], "texture": "#4"},
"east": {"uv": [1, 7, 1.5, 7.5], "rotation": 270, "texture": "#4"},
"south": {"uv": [10, 9, 15, 11.5], "texture": "#4"},
"west": {"uv": [1, 7, 1.5, 7.5], "rotation": 90, "texture": "#4"}
}
}
],
@@ -201,25 +160,5 @@
"fixed": {
"scale": [0.5, 0.5, 0.5]
}
},
"groups": [
{
"name": "cogwheel",
"origin": [8, 8, 8],
"color": 0,
"children": [0, 1, 2, 3, 4]
},
{
"name": "pump",
"origin": [8, 8, 8],
"color": 0,
"children": [5, 6, 7]
},
{
"name": "Arrow",
"origin": [8, 8, 8],
"color": 0,
"children": [8, 9, 10, 11]
}
]
}
}

View File

@@ -2,7 +2,7 @@
"credit": "Made with Blockbench",
"textures": {
"0": "tfmg:block/aluminum_pipes",
"particle": "tfmg:block/aluminum_pipes"
"particle": "tfmg:block/aluminum_block"
},
"elements": [
{

View File

@@ -3,10 +3,11 @@
"texture_size": [32, 32],
"textures": {
"0": "tfmg:block/aluminum_pipes",
"particle": "tfmg:block/aluminum_pipes"
"particle": "tfmg:block/aluminum_block"
},
"elements": [
{
"name": "connection_down",
"from": [4, 0, 4],
"to": [12, 4, 12],
"rotation": {"angle": 0, "axis": "y", "origin": [16, 0, -16]},

View File

@@ -3,18 +3,19 @@
"texture_size": [32, 32],
"textures": {
"0": "tfmg:block/aluminum_pipes",
"particle": "tfmg:block/aluminum_pipes"
"particle": "tfmg:block/aluminum_block"
},
"elements": [
{
"name": "connection_east",
"from": [12, 4, 4],
"to": [16, 12, 12],
"rotation": {"angle": 0, "axis": "y", "origin": [16, 0, -16]},
"faces": {
"north": {"uv": [0, 6, 4, 8], "rotation": 90, "texture": "#0"},
"south": {"uv": [0, 0, 4, 2], "rotation": 90, "texture": "#0"},
"up": {"uv": [4, 0, 0, 2], "rotation": 90, "texture": "#0"},
"down": {"uv": [4, 6, 0, 8], "rotation": 270, "texture": "#0"}
"south": {"uv": [0, 8, 4, 6], "rotation": 90, "texture": "#0"},
"up": {"uv": [0, 8, 4, 6], "rotation": 90, "texture": "#0"},
"down": {"uv": [0, 6, 4, 8], "rotation": 270, "texture": "#0"}
}
}
]

View File

@@ -3,17 +3,18 @@
"texture_size": [32, 32],
"textures": {
"0": "tfmg:block/aluminum_pipes",
"particle": "tfmg:block/aluminum_pipes"
"particle": "tfmg:block/aluminum_block"
},
"elements": [
{
"name": "connection_north",
"from": [4, 4, 0],
"to": [12, 12, 4],
"rotation": {"angle": 0, "axis": "y", "origin": [0, 8, 0]},
"faces": {
"east": {"uv": [0, 0, 4, 2], "rotation": 90, "texture": "#0"},
"west": {"uv": [0, 6, 4, 8], "rotation": 90, "texture": "#0"},
"up": {"uv": [0, 6, 4, 8], "rotation": 180, "texture": "#0"},
"west": {"uv": [0, 2, 4, 0], "rotation": 90, "texture": "#0"},
"up": {"uv": [0, 2, 4, 0], "rotation": 180, "texture": "#0"},
"down": {"uv": [0, 0, 4, 2], "rotation": 180, "texture": "#0"}
}
}

View File

@@ -3,17 +3,18 @@
"texture_size": [32, 32],
"textures": {
"0": "tfmg:block/aluminum_pipes",
"particle": "tfmg:block/aluminum_pipes"
"particle": "tfmg:block/aluminum_block"
},
"elements": [
{
"name": "connection_south",
"from": [4, 4, 12],
"to": [12, 12, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [0, 8, 0]},
"faces": {
"east": {"uv": [0, 6, 4, 8], "rotation": 90, "texture": "#0"},
"west": {"uv": [0, 0, 4, 2], "rotation": 90, "texture": "#0"},
"up": {"uv": [0, 0, 4, 2], "rotation": 180, "texture": "#0"},
"west": {"uv": [0, 8, 4, 6], "rotation": 90, "texture": "#0"},
"up": {"uv": [0, 8, 4, 6], "rotation": 180, "texture": "#0"},
"down": {"uv": [0, 6, 4, 8], "rotation": 180, "texture": "#0"}
}
}

View File

@@ -3,10 +3,11 @@
"texture_size": [32, 32],
"textures": {
"0": "tfmg:block/aluminum_pipes",
"particle": "tfmg:block/aluminum_pipes"
"particle": "tfmg:block/aluminum_block"
},
"elements": [
{
"name": "connection_up",
"from": [4, 12, 4],
"to": [12, 16, 12],
"rotation": {"angle": 0, "axis": "y", "origin": [16, 0, -16]},

View File

@@ -3,18 +3,19 @@
"texture_size": [32, 32],
"textures": {
"0": "tfmg:block/aluminum_pipes",
"particle": "tfmg:block/aluminum_pipes"
"particle": "tfmg:block/aluminum_block"
},
"elements": [
{
"name": "connection_west",
"from": [0, 4, 4],
"to": [4, 12, 12],
"rotation": {"angle": 0, "axis": "y", "origin": [16, 0, -16]},
"faces": {
"north": {"uv": [0, 0, 4, 2], "rotation": 90, "texture": "#0"},
"south": {"uv": [0, 6, 4, 8], "rotation": 90, "texture": "#0"},
"up": {"uv": [4, 6, 0, 8], "rotation": 90, "texture": "#0"},
"down": {"uv": [4, 0, 0, 2], "rotation": 270, "texture": "#0"}
"south": {"uv": [0, 2, 4, 0], "rotation": 90, "texture": "#0"},
"up": {"uv": [0, 2, 4, 0], "rotation": 90, "texture": "#0"},
"down": {"uv": [0, 0, 4, 2], "rotation": 270, "texture": "#0"}
}
}
]

View File

@@ -2,15 +2,16 @@
"credit": "Made with Blockbench",
"textures": {
"0": "tfmg:block/aluminum_pipes_connected",
"particle": "tfmg:block/aluminum_pipes_connected"
"particle": "tfmg:block/aluminum_block"
},
"elements": [
{
"name": "core_x",
"from": [4, 4, 4],
"to": [12, 12, 12],
"faces": {
"east": {"uv": [16, 8, 12, 12], "rotation": 180, "texture": "#0"},
"west": {"uv": [16, 8, 12, 12], "rotation": 180, "texture": "#0"}
"east": {"uv": [12, 8, 16, 12], "texture": "#0"},
"west": {"uv": [16, 8, 12, 12], "texture": "#0"}
}
}
]

View File

@@ -2,15 +2,16 @@
"credit": "Made with Blockbench",
"textures": {
"0": "tfmg:block/aluminum_pipes_connected",
"particle": "tfmg:block/aluminum_pipes_connected"
"particle": "tfmg:block/aluminum_block"
},
"elements": [
{
"name": "core_y",
"from": [4, 4, 4],
"to": [12, 12, 12],
"faces": {
"up": {"uv": [16, 8, 12, 12], "rotation": 180, "texture": "#0"},
"down": {"uv": [16, 8, 12, 12], "rotation": 180, "texture": "#0"}
"up": {"uv": [12, 12, 16, 8], "rotation": 180, "texture": "#0"},
"down": {"uv": [12, 8, 16, 12], "rotation": 180, "texture": "#0"}
}
}
]

View File

@@ -2,15 +2,16 @@
"credit": "Made with Blockbench",
"textures": {
"0": "tfmg:block/aluminum_pipes_connected",
"particle": "tfmg:block/aluminum_pipes_connected"
"particle": "tfmg:block/aluminum_block"
},
"elements": [
{
"name": "core_z",
"from": [4, 4, 4],
"to": [12, 12, 12],
"faces": {
"north": {"uv": [12, 8, 16, 12], "rotation": 180, "texture": "#0"},
"south": {"uv": [12, 8, 16, 12], "rotation": 180, "texture": "#0"}
"north": {"uv": [12, 8, 16, 12], "texture": "#0"},
"south": {"uv": [16, 8, 12, 12], "texture": "#0"}
}
}
]

View File

@@ -3,7 +3,7 @@
"texture_size": [32, 32],
"textures": {
"0": "tfmg:block/aluminum_pipes",
"particle": "tfmg:block/aluminum_pipes"
"particle": "tfmg:block/aluminum_block"
},
"elements": [
{
@@ -15,20 +15,20 @@
"east": {"uv": [12, 8, 13.5, 11], "rotation": 90, "texture": "#0"},
"south": {"uv": [12, 8, 13.5, 11], "rotation": 90, "texture": "#0"},
"west": {"uv": [12, 8, 13.5, 11], "rotation": 90, "texture": "#0"},
"down": {"uv": [13, 8, 16, 11], "rotation": 90, "texture": "#0", "cullface": "down"}
"down": {"uv": [13, 8, 16, 11], "rotation": 180, "texture": "#0"}
}
},
{
"from": [2.95, -0.95, 2.95],
"from": [2.95, -1.1, 2.95],
"to": [13.05, 2, 13.05],
"rotation": {"angle": 0, "axis": "z", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [9, 9.5, 4, 8], "texture": "#0"},
"east": {"uv": [4, 8, 9, 9.5], "rotation": 180, "texture": "#0"},
"south": {"uv": [4, 8, 9, 9.5], "rotation": 180, "texture": "#0"},
"west": {"uv": [9, 9.5, 4, 8], "texture": "#0"},
"up": {"uv": [6, 11, 11, 16], "rotation": 90, "texture": "#0"},
"down": {"uv": [11, 11, 16, 16], "rotation": 90, "texture": "#0", "cullface": "down"}
"north": {"uv": [10.5, 16, 9, 11], "rotation": 90, "texture": "#0"},
"east": {"uv": [10.5, 16, 9, 11], "rotation": 90, "texture": "#0"},
"south": {"uv": [10.5, 16, 9, 11], "rotation": 90, "texture": "#0"},
"west": {"uv": [10.5, 16, 9, 11], "rotation": 90, "texture": "#0"},
"up": {"uv": [11, 11, 16, 16], "rotation": 90, "texture": "#0"},
"down": {"uv": [11, 11, 16, 16], "rotation": 90, "texture": "#0"}
}
}
]

View File

@@ -3,7 +3,7 @@
"texture_size": [32, 32],
"textures": {
"0": "tfmg:block/aluminum_pipes",
"particle": "tfmg:block/aluminum_pipes"
"particle": "tfmg:block/aluminum_block"
},
"elements": [
{
@@ -12,7 +12,7 @@
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [12, 8, 13.5, 11], "rotation": 180, "texture": "#0"},
"east": {"uv": [13, 8, 16, 11], "texture": "#0", "cullface": "east"},
"east": {"uv": [13, 8, 16, 11], "texture": "#0"},
"south": {"uv": [12, 8, 13.5, 11], "texture": "#0"},
"up": {"uv": [12, 8, 13.5, 11], "texture": "#0"},
"down": {"uv": [12, 8, 13.5, 11], "texture": "#0"}
@@ -20,15 +20,15 @@
},
{
"from": [14, 2.95, 2.95],
"to": [16.95, 13.05, 13.05],
"to": [17.1, 13.05, 13.05],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [9, 9.5, 4, 8], "rotation": 90, "texture": "#0"},
"east": {"uv": [11, 11, 16, 16], "texture": "#0", "cullface": "east"},
"south": {"uv": [4, 8, 9, 9.5], "rotation": 90, "texture": "#0"},
"west": {"uv": [6, 11, 11, 16], "texture": "#0"},
"up": {"uv": [4, 8, 9, 9.5], "rotation": 90, "texture": "#0"},
"down": {"uv": [9, 9.5, 4, 8], "rotation": 270, "texture": "#0"}
"north": {"uv": [9, 16, 10.5, 11], "texture": "#0"},
"east": {"uv": [11, 11, 16, 16], "texture": "#0"},
"south": {"uv": [10.5, 11, 9, 16], "texture": "#0"},
"west": {"uv": [11, 11, 16, 16], "texture": "#0"},
"up": {"uv": [10.5, 11, 9, 16], "texture": "#0"},
"down": {"uv": [10.5, 16, 9, 11], "texture": "#0"}
}
}
]

View File

@@ -3,20 +3,20 @@
"texture_size": [32, 32],
"textures": {
"0": "tfmg:block/aluminum_pipes",
"particle": "tfmg:block/aluminum_pipes"
"particle": "tfmg:block/aluminum_block"
},
"elements": [
{
"from": [2.95, 2.95, -0.95],
"from": [2.95, 2.95, -1.1],
"to": [13.05, 13.05, 2],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 34, 8]},
"faces": {
"north": {"uv": [11, 11, 16, 16], "texture": "#0", "cullface": "north"},
"east": {"uv": [4, 8, 9, 9.5], "rotation": 90, "texture": "#0"},
"south": {"uv": [6, 11, 11, 16], "texture": "#0"},
"west": {"uv": [9, 9.5, 4, 8], "rotation": 90, "texture": "#0"},
"up": {"uv": [4, 8, 9, 9.5], "texture": "#0"},
"down": {"uv": [9, 9.5, 4, 8], "texture": "#0"}
"north": {"uv": [11, 11, 16, 16], "texture": "#0"},
"east": {"uv": [10.5, 11, 9, 16], "texture": "#0"},
"south": {"uv": [11, 11, 16, 16], "texture": "#0"},
"west": {"uv": [9, 16, 10.5, 11], "texture": "#0"},
"up": {"uv": [9, 11, 10.5, 16], "rotation": 90, "texture": "#0"},
"down": {"uv": [10.5, 16, 9, 11], "rotation": 90, "texture": "#0"}
}
},
{
@@ -24,7 +24,7 @@
"to": [11.05, 11.05, -0.95],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 34, 8]},
"faces": {
"north": {"uv": [13, 8, 16, 11], "texture": "#0", "cullface": "north"},
"north": {"uv": [13, 8, 16, 11], "texture": "#0"},
"east": {"uv": [12, 8, 13.5, 11], "texture": "#0"},
"west": {"uv": [12, 8, 13.5, 11], "rotation": 180, "texture": "#0"},
"up": {"uv": [12, 8, 13.5, 11], "rotation": 270, "texture": "#0"},

View File

@@ -3,7 +3,7 @@
"texture_size": [32, 32],
"textures": {
"0": "tfmg:block/aluminum_pipes",
"particle": "tfmg:block/aluminum_pipes"
"particle": "tfmg:block/aluminum_block"
},
"elements": [
{
@@ -12,7 +12,7 @@
"rotation": {"angle": 0, "axis": "y", "origin": [8, 34, 8]},
"faces": {
"east": {"uv": [13.5, 8, 12, 11], "texture": "#0"},
"south": {"uv": [16, 8, 13, 11], "texture": "#0", "cullface": "south"},
"south": {"uv": [16, 8, 13, 11], "texture": "#0"},
"west": {"uv": [13.5, 8, 12, 11], "rotation": 180, "texture": "#0"},
"up": {"uv": [13.5, 8, 12, 11], "rotation": 270, "texture": "#0"},
"down": {"uv": [13.5, 8, 12, 11], "rotation": 90, "texture": "#0"}
@@ -20,15 +20,15 @@
},
{
"from": [2.95, 2.95, 14],
"to": [13.05, 13.05, 16.95],
"to": [13.05, 13.05, 17.1],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 34, 8]},
"faces": {
"north": {"uv": [11, 11, 6, 16], "texture": "#0"},
"east": {"uv": [4, 9.5, 9, 8], "rotation": 90, "texture": "#0"},
"south": {"uv": [16, 11, 11, 16], "texture": "#0", "cullface": "south"},
"west": {"uv": [9, 8, 4, 9.5], "rotation": 90, "texture": "#0"},
"up": {"uv": [4, 9.5, 9, 8], "texture": "#0"},
"down": {"uv": [9, 8, 4, 9.5], "texture": "#0"}
"north": {"uv": [16, 11, 11, 16], "texture": "#0"},
"east": {"uv": [9, 11, 10.5, 16], "texture": "#0"},
"south": {"uv": [16, 11, 11, 16], "texture": "#0"},
"west": {"uv": [10.5, 16, 9, 11], "texture": "#0"},
"up": {"uv": [10.5, 11, 9, 16], "rotation": 90, "texture": "#0"},
"down": {"uv": [9, 16, 10.5, 11], "rotation": 90, "texture": "#0"}
}
}
]

View File

@@ -3,20 +3,20 @@
"texture_size": [32, 32],
"textures": {
"0": "tfmg:block/aluminum_pipes",
"particle": "tfmg:block/aluminum_pipes"
"particle": "tfmg:block/aluminum_block"
},
"elements": [
{
"from": [2.95, 14, 2.95],
"to": [13.05, 16.95, 13.05],
"to": [13.05, 17.1, 13.05],
"rotation": {"angle": 0, "axis": "z", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [9, 8, 4, 9.5], "texture": "#0"},
"east": {"uv": [4, 9.5, 9, 8], "rotation": 180, "texture": "#0"},
"south": {"uv": [4, 9.5, 9, 8], "rotation": 180, "texture": "#0"},
"west": {"uv": [9, 8, 4, 9.5], "texture": "#0"},
"up": {"uv": [16, 11, 11, 16], "rotation": 90, "texture": "#0", "cullface": "up"},
"down": {"uv": [11, 11, 6, 16], "rotation": 90, "texture": "#0"}
"north": {"uv": [9, 16, 10.5, 11], "rotation": 90, "texture": "#0"},
"east": {"uv": [9, 16, 10.5, 11], "rotation": 90, "texture": "#0"},
"south": {"uv": [9, 16, 10.5, 11], "rotation": 90, "texture": "#0"},
"west": {"uv": [9, 16, 10.5, 11], "rotation": 90, "texture": "#0"},
"up": {"uv": [16, 11, 11, 16], "rotation": 90, "texture": "#0"},
"down": {"uv": [16, 11, 11, 16], "rotation": 90, "texture": "#0"}
}
},
{
@@ -28,7 +28,7 @@
"east": {"uv": [13.5, 8, 12, 11], "rotation": 90, "texture": "#0"},
"south": {"uv": [13.5, 8, 12, 11], "rotation": 90, "texture": "#0"},
"west": {"uv": [13.5, 8, 12, 11], "rotation": 90, "texture": "#0"},
"up": {"uv": [16, 8, 13, 11], "rotation": 90, "texture": "#0", "cullface": "up"}
"up": {"uv": [13, 11, 16, 8], "rotation": 180, "texture": "#0"}
}
}
]

View File

@@ -3,20 +3,20 @@
"texture_size": [32, 32],
"textures": {
"0": "tfmg:block/aluminum_pipes",
"particle": "tfmg:block/aluminum_pipes"
"particle": "tfmg:block/aluminum_block"
},
"elements": [
{
"from": [-0.95, 2.95, 2.95],
"from": [-1.1, 2.95, 2.95],
"to": [2, 13.05, 13.05],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [9, 8, 4, 9.5], "rotation": 90, "texture": "#0"},
"east": {"uv": [11, 11, 6, 16], "texture": "#0"},
"south": {"uv": [4, 9.5, 9, 8], "rotation": 90, "texture": "#0"},
"west": {"uv": [16, 11, 11, 16], "texture": "#0", "cullface": "west"},
"up": {"uv": [4, 9.5, 9, 8], "rotation": 90, "texture": "#0"},
"down": {"uv": [9, 8, 4, 9.5], "rotation": 270, "texture": "#0"}
"north": {"uv": [10.5, 16, 9, 11], "texture": "#0"},
"east": {"uv": [16, 11, 11, 16], "texture": "#0"},
"south": {"uv": [9, 11, 10.5, 16], "texture": "#0"},
"west": {"uv": [16, 11, 11, 16], "texture": "#0"},
"up": {"uv": [9, 11, 10.5, 16], "texture": "#0"},
"down": {"uv": [9, 16, 10.5, 11], "texture": "#0"}
}
},
{
@@ -26,7 +26,7 @@
"faces": {
"north": {"uv": [13.5, 8, 12, 11], "rotation": 180, "texture": "#0"},
"south": {"uv": [13.5, 8, 12, 11], "texture": "#0"},
"west": {"uv": [16, 8, 13, 11], "texture": "#0", "cullface": "west"},
"west": {"uv": [16, 8, 13, 11], "texture": "#0"},
"up": {"uv": [13.5, 8, 12, 11], "texture": "#0"},
"down": {"uv": [13.5, 8, 12, 11], "texture": "#0"}
}

View File

@@ -3,43 +3,18 @@
"parent": "block/block",
"textures": {
"1": "tfmg:block/aluminum_pipes",
"particle": "tfmg:block/aluminum_pipes"
"particle": "tfmg:block/aluminum_block"
},
"elements": [
{
"from": [4, 4, 4],
"to": [12, 12, 12],
"faces": {
"east": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#1"},
"west": {"uv": [0, 0, 4, 4], "rotation": 90, "texture": "#1"},
"up": {"uv": [0, 0, 4, 4], "rotation": 180, "texture": "#1"},
"down": {"uv": [0, 0, 4, 4], "rotation": 180, "texture": "#1"}
}
},
{
"from": [4, 4, 12],
"to": [12, 12, 14],
"from": [4, 4, 0],
"to": [12, 12, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [0, 0, 0, 0], "texture": "#1"},
"east": {"uv": [0, 9, 4, 10], "rotation": 90, "texture": "#1"},
"south": {"uv": [0, 0, 0, 0], "texture": "#1"},
"west": {"uv": [0, 8, 4, 9], "rotation": 90, "texture": "#1"},
"up": {"uv": [0, 8, 4, 9], "rotation": 180, "texture": "#1"},
"down": {"uv": [0, 9, 4, 10], "rotation": 180, "texture": "#1"}
}
},
{
"from": [4, 4, 2],
"to": [12, 12, 4],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]},
"faces": {
"north": {"uv": [0, 0, 0, 0], "texture": "#1"},
"east": {"uv": [0, 8, 4, 9], "rotation": 90, "texture": "#1"},
"south": {"uv": [0, 0, 0, 0], "texture": "#1"},
"west": {"uv": [0, 9, 4, 10], "rotation": 90, "texture": "#1"},
"up": {"uv": [0, 9, 4, 10], "rotation": 180, "texture": "#1"},
"down": {"uv": [0, 8, 4, 9], "rotation": 180, "texture": "#1"}
"east": {"uv": [4, 8, 8, 0], "rotation": 90, "texture": "#1"},
"west": {"uv": [4, 0, 8, 8], "rotation": 90, "texture": "#1"},
"up": {"uv": [4, 8, 8, 0], "texture": "#1"},
"down": {"uv": [4, 8, 8, 0], "rotation": 180, "texture": "#1"}
}
},
{
@@ -48,24 +23,24 @@
"rotation": {"angle": 0, "axis": "y", "origin": [8, 28, 8]},
"faces": {
"north": {"uv": [11, 11, 16, 16], "texture": "#1"},
"east": {"uv": [10.5, 11, 11.5, 16], "texture": "#1"},
"south": {"uv": [6, 11, 11, 16], "texture": "#1"},
"west": {"uv": [11.5, 16, 10.5, 11], "texture": "#1"},
"up": {"uv": [10.5, 11, 11.5, 16], "rotation": 270, "texture": "#1"},
"down": {"uv": [11.5, 16, 10.5, 11], "rotation": 270, "texture": "#1"}
"east": {"uv": [10.5, 16, 9.5, 11], "texture": "#1"},
"south": {"uv": [11, 11, 16, 16], "texture": "#1"},
"west": {"uv": [9.5, 16, 10.5, 11], "texture": "#1"},
"up": {"uv": [9.5, 11, 10.5, 16], "rotation": 90, "texture": "#1"},
"down": {"uv": [10.5, 11, 9.5, 16], "rotation": 90, "texture": "#1"}
}
},
{
"from": [3, 3, 14],
"to": [13, 13, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 28, 8]},
"rotation": {"angle": 0, "axis": "x", "origin": [8, 8, 15]},
"faces": {
"north": {"uv": [6, 11, 11, 16], "texture": "#1"},
"east": {"uv": [11.5, 16, 10.5, 11], "texture": "#1"},
"south": {"uv": [11, 11, 16, 16], "texture": "#1"},
"west": {"uv": [10.5, 11, 11.5, 16], "texture": "#1"},
"up": {"uv": [11.5, 16, 10.5, 11], "rotation": 270, "texture": "#1"},
"down": {"uv": [10.5, 11, 11.5, 16], "rotation": 270, "texture": "#1"}
"north": {"uv": [11, 11, 16, 16], "rotation": 180, "texture": "#1"},
"east": {"uv": [10.5, 16, 9.5, 11], "rotation": 180, "texture": "#1"},
"south": {"uv": [11, 11, 16, 16], "rotation": 180, "texture": "#1"},
"west": {"uv": [9.5, 16, 10.5, 11], "rotation": 180, "texture": "#1"},
"up": {"uv": [10.5, 11, 9.5, 16], "rotation": 90, "texture": "#1"},
"down": {"uv": [9.5, 11, 10.5, 16], "rotation": 90, "texture": "#1"}
}
}
],

Some files were not shown because too many files have changed in this diff Show More