formworks
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
// 1.19.2 2023-08-30T23:23:40.7821017 Registrate Provider for tfmg [Recipes, Advancements, Loot tables, Tags (blocks), Tags (items), Tags (fluids), Tags (entity_types), Blockstates, Item models, Lang (en_us/en_ud)]
|
||||
// 1.19.2 2023-08-31T14:31:49.9051322 Registrate Provider for tfmg [Recipes, Advancements, Loot tables, Tags (blocks), Tags (items), Tags (fluids), Tags (entity_types), Blockstates, Item models, Lang (en_us/en_ud)]
|
||||
9ca537517fb8baeff3d4e4137c93aebd6b874c81 assets/tfmg/blockstates/cast_iron_block.json
|
||||
c67b91a7fd9f16cd2d7eaa92dd9b945042d58130 assets/tfmg/blockstates/concrete.json
|
||||
dca4728ef33ca9d54fb55d707761c2eeb77c32b1 assets/tfmg/blockstates/cooling_fluid.json
|
||||
fa1fa0509cd94e57da7624b5d094c228d6b92593 assets/tfmg/blockstates/creosote.json
|
||||
a9b81338133077138f447a0d159f094edb61242a assets/tfmg/blockstates/crude_oil_fluid.json
|
||||
03983ce3de10310cd75b98f17c9161653b7034cd assets/tfmg/blockstates/diesel.json
|
||||
f16d1cf03e5053455ea485f7aa53a88206f61749 assets/tfmg/blockstates/formwork_block.json
|
||||
b0a3f4da5d9efdd01800c8b9738aee194565c6e7 assets/tfmg/blockstates/gasoline.json
|
||||
c7aa764cc11ee837deeed68c9c2d8567ea078f5c assets/tfmg/blockstates/heavy_machinery_casing.json
|
||||
dea24edfcb504c6c74560174a94bd7d3e5d58e76 assets/tfmg/blockstates/heavy_oil.json
|
||||
@@ -17,8 +18,8 @@ ebd6804b999acea36abbf07c2381ee6dee0d7a16 assets/tfmg/blockstates/napalm.json
|
||||
89f2902010903aad686571ef37c781b111147456 assets/tfmg/blockstates/naphtha.json
|
||||
e6983072149d1a9a2f4d39e4e1feac599ff7413e assets/tfmg/blockstates/steel_block.json
|
||||
df44115876045e6f863de2f8be6a9166b336a2f1 assets/tfmg/blockstates/steel_casing.json
|
||||
b68d0d30eb993662524158c536547497dc507204 assets/tfmg/lang/en_ud.json
|
||||
841085ce8022c36f4e4a65b8f0133e6f815d9668 assets/tfmg/lang/en_us.json
|
||||
b9953b7a05c4747eee192dc2b66943fe7b45db84 assets/tfmg/lang/en_ud.json
|
||||
13043ade5d18c12e300962f4cc9d06ecc02e7089 assets/tfmg/lang/en_us.json
|
||||
37789d06ec6cfc0312be7b1b66ac1ec6403d4516 assets/tfmg/models/block/cast_iron_block.json
|
||||
75c31d328fc5d6d46c8b43e8bde7504f4e51dadc assets/tfmg/models/block/concrete.json
|
||||
80fb4a90f861992322bfd63f1232593e8cce708e assets/tfmg/models/block/cooling_fluid.json
|
||||
@@ -44,6 +45,7 @@ df4e7fa8f3f60908f58794528a8db60dce7d0135 assets/tfmg/models/item/copper_grenade.
|
||||
0abf2b2d61995c4fd3e3c88656e740ffe0a2f083 assets/tfmg/models/item/creosote_bucket.json
|
||||
e857cfbd6dfd0fe4b38e48f432f7a92e82dc5e22 assets/tfmg/models/item/crude_oil_fluid_bucket.json
|
||||
3497bcbaee50b2f766de659043bf3c36823b570d assets/tfmg/models/item/diesel_bucket.json
|
||||
a11a0b5a9887ba342d80b574a7f2c3dc5cdd7372 assets/tfmg/models/item/formwork_block.json
|
||||
ed2830b2988403aebaca633b2e315878b41f7503 assets/tfmg/models/item/gasoline_bucket.json
|
||||
3fdff9e88db39939ee31968358eb51c060006766 assets/tfmg/models/item/heavy_machinery_casing.json
|
||||
f3bea42a905b7df9395bda18f751e2ee0c023e65 assets/tfmg/models/item/heavy_oil_bucket.json
|
||||
@@ -75,11 +77,12 @@ c98956ac34e02a8c1c801122486771ef89fb640b data/forge/tags/items/storage_blocks.js
|
||||
7c5615c56bb169570a061f052ebb1f5115760c16 data/forge/tags/items/storage_blocks/cast_iron.json
|
||||
37b1c9c3ae722d8110db48015993ede3e194c0a0 data/forge/tags/items/storage_blocks/steel.json
|
||||
c98956ac34e02a8c1c801122486771ef89fb640b data/minecraft/tags/blocks/beacon_base_blocks.json
|
||||
2b45163d462fba0e86bb1ac8fc299509fbe1e58d data/minecraft/tags/blocks/mineable/axe.json
|
||||
ecfc3593fe0f3f0b5eff61fb1a2a445b16cda216 data/minecraft/tags/blocks/mineable/axe.json
|
||||
b64e309f3dfd304a74fc9c4e1a97b2ea3c2c02e8 data/minecraft/tags/blocks/mineable/pickaxe.json
|
||||
7f922e1459e98ee497c359655ee2b408bf84e4f4 data/minecraft/tags/blocks/needs_iron_tool.json
|
||||
60857d034446187e758de87644a80a7bc4d6b150 data/tfmg/loot_tables/blocks/cast_iron_block.json
|
||||
d32a75f20ca3f2da6ba69b0a91e295c63f65de92 data/tfmg/loot_tables/blocks/concrete.json
|
||||
51818c7cf522c10c409c8737fdc30a58d7560f71 data/tfmg/loot_tables/blocks/formwork_block.json
|
||||
661cc61f9c13ddf8c6bf06470defa93170e8ee7f data/tfmg/loot_tables/blocks/heavy_machinery_casing.json
|
||||
7da9b20012e584104331da961756d6c1d02682b5 data/tfmg/loot_tables/blocks/napalm_bomb.json
|
||||
01298989d0fe79936cdfa1e6cc07fd05f143ae09 data/tfmg/loot_tables/blocks/steel_block.json
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "tfmg:block/formwork_block/block_base"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@
|
||||
"block.tfmg.creosote": "ǝʇosoǝɹƆ",
|
||||
"block.tfmg.crude_oil_fluid": "pınןℲ ןıO ǝpnɹƆ",
|
||||
"block.tfmg.diesel": "ןǝsǝıᗡ",
|
||||
"block.tfmg.formwork_block": "ʞɔoןᗺ ʞɹoʍɯɹoℲ",
|
||||
"block.tfmg.gasoline": "ǝuıןosɐ⅁",
|
||||
"block.tfmg.heavy_machinery_casing": "buısɐƆ ʎɹǝuıɥɔɐW ʎʌɐǝH",
|
||||
"block.tfmg.heavy_oil": "ןıO ʎʌɐǝH",
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
"block.tfmg.creosote": "Creosote",
|
||||
"block.tfmg.crude_oil_fluid": "Crude Oil Fluid",
|
||||
"block.tfmg.diesel": "Diesel",
|
||||
"block.tfmg.formwork_block": "Formwork Block",
|
||||
"block.tfmg.gasoline": "Gasoline",
|
||||
"block.tfmg.heavy_machinery_casing": "Heavy Machinery Casing",
|
||||
"block.tfmg.heavy_oil": "Heavy Oil",
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "tfmg:block/formwork_block/block_base"
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"values": [
|
||||
"tfmg:steel_casing",
|
||||
"tfmg:heavy_machinery_casing"
|
||||
"tfmg:heavy_machinery_casing",
|
||||
"tfmg:formwork_block"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "tfmg:formwork_block"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -36,6 +36,7 @@ public class CreateTFMG
|
||||
|
||||
TFMGBlocks.register();
|
||||
TFMGItems.register();
|
||||
TFMGBlockEntities.register();
|
||||
TFMGEntityTypes.register();
|
||||
TFMGCreativeModeTabs.init();
|
||||
TFMGFluids.register();
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.drmangotea.tfmg;
|
||||
|
||||
|
||||
import com.drmangotea.tfmg.registry.TFMGPartialModels;
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
|
||||
@@ -10,7 +11,7 @@ public class CreateTFMGClient {
|
||||
|
||||
public CreateTFMGClient() {
|
||||
IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();
|
||||
//CIPartialModels.init();
|
||||
TFMGPartialModels.init();
|
||||
modEventBus.register(this);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.drmangotea.tfmg.base;
|
||||
|
||||
import com.drmangotea.tfmg.content.concrete.formwork.FormWorkBlock;
|
||||
import com.drmangotea.tfmg.content.concrete.formwork.FormWorkBlockEntity;
|
||||
import com.simibubi.create.AllTags;
|
||||
import com.simibubi.create.content.contraptions.behaviour.DoorMovingInteraction;
|
||||
import com.simibubi.create.content.decoration.slidingDoor.SlidingDoorBlock;
|
||||
import com.simibubi.create.content.decoration.slidingDoor.SlidingDoorMovementBehaviour;
|
||||
import com.simibubi.create.foundation.data.AssetLookup;
|
||||
import com.tterrag.registrate.builders.BlockBuilder;
|
||||
import com.tterrag.registrate.util.nullness.NonNullUnaryOperator;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.data.loot.BlockLoot;
|
||||
import net.minecraft.tags.BlockTags;
|
||||
import net.minecraft.tags.ItemTags;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
import net.minecraft.world.level.material.MaterialColor;
|
||||
import net.minecraftforge.client.model.generators.ModelFile;
|
||||
|
||||
import static com.simibubi.create.AllInteractionBehaviours.interactionBehaviour;
|
||||
import static com.simibubi.create.AllMovementBehaviours.movementBehaviour;
|
||||
import static com.simibubi.create.foundation.data.TagGen.axeOnly;
|
||||
|
||||
|
||||
public class TFMGBuilderTransformers {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.drmangotea.tfmg.content.concrete.formwork;
|
||||
|
||||
import com.drmangotea.tfmg.registry.TFMGBlockEntities;
|
||||
import com.simibubi.create.content.equipment.wrench.IWrenchable;
|
||||
import com.simibubi.create.foundation.block.IBE;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
|
||||
public class FormWorkBlock extends Block implements IWrenchable, IBE<FormWorkBlockEntity> {
|
||||
public FormWorkBlock(Properties p_49795_) {
|
||||
super(p_49795_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<FormWorkBlockEntity> getBlockEntityClass() {
|
||||
return FormWorkBlockEntity.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockEntityType<? extends FormWorkBlockEntity> getBlockEntityType() {
|
||||
return TFMGBlockEntities.FORMWORK.get();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,215 @@
|
||||
package com.drmangotea.tfmg.content.concrete.formwork;
|
||||
|
||||
import com.drmangotea.tfmg.CreateTFMG;
|
||||
import com.drmangotea.tfmg.content.machines.TFMGMachineBlockEntity;
|
||||
import com.drmangotea.tfmg.registry.TFMGFluids;
|
||||
import com.simibubi.create.api.connectivity.ConnectivityHandler;
|
||||
import com.simibubi.create.content.fluids.tank.FluidTankBlockEntity;
|
||||
import com.simibubi.create.foundation.fluid.SmartFluidTank;
|
||||
import com.simibubi.create.foundation.utility.animation.LerpedFloat;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
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.minecraftforge.common.util.LazyOptional;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidType;
|
||||
import net.minecraftforge.fluids.capability.IFluidHandler;
|
||||
import net.minecraftforge.fluids.capability.templates.FluidTank;
|
||||
|
||||
public class FormWorkBlockEntity extends TFMGMachineBlockEntity {
|
||||
|
||||
public boolean east = true;
|
||||
public boolean west = true;
|
||||
public boolean north = true;
|
||||
public boolean south = true;
|
||||
public boolean bottom = true;
|
||||
|
||||
protected FluidTank tankInventory;
|
||||
|
||||
|
||||
public LerpedFloat fluidLevel = LerpedFloat.linear();
|
||||
public FormWorkBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
|
||||
super(type, pos, state);
|
||||
tankInventory = createInventory();
|
||||
fluidCapability = LazyOptional.of(() -> tankInventory);
|
||||
tank1.forbidInsertion();
|
||||
tank2.forbidExtraction();
|
||||
}
|
||||
protected SmartFluidTank createInventory() {
|
||||
return new SmartFluidTank(1000, this::onFluidStackChanged){
|
||||
@Override
|
||||
public boolean isFluidValid(FluidStack stack) {
|
||||
return stack.getFluid().isSame(TFMGFluids.LIQUID_CONCRETE.getSource());
|
||||
}
|
||||
@Override
|
||||
public FluidStack drain(FluidStack resource, FluidAction action) {
|
||||
return FluidStack.EMPTY;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
super.tick();
|
||||
fluidLevel.chase(tankInventory.getFluidAmount(), 0.3f, LerpedFloat.Chaser.EXP);
|
||||
fluidLevel.tickChaser();
|
||||
|
||||
BlockEntity blockEntityBelow = level.getBlockEntity(this.getBlockPos().below());
|
||||
BlockEntity blockEntityNorth = level.getBlockEntity(this.getBlockPos().north());
|
||||
BlockEntity blockEntityWest = level.getBlockEntity(this.getBlockPos().west());
|
||||
BlockEntity blockEntityEast = level.getBlockEntity(this.getBlockPos().east());
|
||||
BlockEntity blockEntitySouth = level.getBlockEntity(this.getBlockPos().south());
|
||||
|
||||
|
||||
bottom = !(blockEntityBelow instanceof FormWorkBlockEntity);
|
||||
east = !(blockEntityEast instanceof FormWorkBlockEntity);
|
||||
west = !(blockEntityWest instanceof FormWorkBlockEntity);
|
||||
north = !(blockEntityNorth instanceof FormWorkBlockEntity);
|
||||
south = !(blockEntitySouth instanceof FormWorkBlockEntity);
|
||||
for (int x = 0; x < 30; x++) {
|
||||
for (int i = 0; i < 5; i++) {
|
||||
BlockEntity CheckedBE = null;
|
||||
|
||||
if (i == 0) {
|
||||
CheckedBE = level.getBlockEntity(this.getBlockPos().below());
|
||||
}
|
||||
if (i == 1) {
|
||||
CheckedBE = level.getBlockEntity(this.getBlockPos().east());
|
||||
}
|
||||
if (i == 2) {
|
||||
CheckedBE = level.getBlockEntity(this.getBlockPos().west());
|
||||
}
|
||||
if (i == 3) {
|
||||
CheckedBE = level.getBlockEntity(this.getBlockPos().north());
|
||||
}
|
||||
if (i == 4) {
|
||||
CheckedBE = level.getBlockEntity(this.getBlockPos().south());
|
||||
}
|
||||
|
||||
if (CheckedBE instanceof FormWorkBlockEntity) {
|
||||
if(((FormWorkBlockEntity) CheckedBE).tankInventory.getFluidAmount()>this.tankInventory.getFluidAmount()&&i!=0)
|
||||
continue;
|
||||
|
||||
FluidTank checkedTank = ((FormWorkBlockEntity) CheckedBE).tankInventory;
|
||||
if (checkedTank.getFluidAmount() < 1000) {
|
||||
if(checkedTank.getFluidAmount()>=995&&tankInventory.getFluidAmount()>0){
|
||||
checkedTank.setFluid(new FluidStack(TFMGFluids.LIQUID_CONCRETE.getSource(), checkedTank.getFluidAmount()+1));
|
||||
//tankInventory.drain(1, IFluidHandler.FluidAction.EXECUTE);
|
||||
// continue;
|
||||
}
|
||||
|
||||
int reducedAmount = tankInventory.getFluidAmount() / 8;
|
||||
|
||||
if (tankInventory.getFluidAmount() != 0)
|
||||
reducedAmount = 1;
|
||||
int newFluidAmount = checkedTank.getFluidAmount() + reducedAmount;
|
||||
|
||||
int toRemove = reducedAmount;
|
||||
//if full
|
||||
if (newFluidAmount > 1000) {
|
||||
continue;
|
||||
// int amountModifier = newFluidAmount - 1000;
|
||||
// newFluidAmount -= amountModifier;
|
||||
// toRemove = reducedAmount - amountModifier;
|
||||
}
|
||||
//
|
||||
checkedTank.setFluid(new FluidStack(TFMGFluids.LIQUID_CONCRETE.getSource(), newFluidAmount));
|
||||
tankInventory.drain(1, IFluidHandler.FluidAction.EXECUTE);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
BlockPos below = this.getBlockPos().below();
|
||||
|
||||
BlockPos west = this.getBlockPos().west();
|
||||
BlockPos east = this.getBlockPos().east();
|
||||
BlockPos north = this.getBlockPos().north();
|
||||
BlockPos south = this.getBlockPos().south();
|
||||
|
||||
if(level.getBlockEntity(below) instanceof FormWorkBlockEntity){
|
||||
bottom = false;
|
||||
}else bottom = true;
|
||||
if(level.getBlockEntity(west) instanceof FormWorkBlockEntity){
|
||||
bottom = false;
|
||||
}else bottom = true;
|
||||
if(level.getBlockEntity(east) instanceof FormWorkBlockEntity){
|
||||
bottom = false;
|
||||
}else bottom = true;
|
||||
if(level.getBlockEntity(north) instanceof FormWorkBlockEntity){
|
||||
bottom = false;
|
||||
}else bottom = true;
|
||||
if(level.getBlockEntity(south) instanceof FormWorkBlockEntity){
|
||||
bottom = false;
|
||||
}else bottom = true;
|
||||
|
||||
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
protected void onFluidStackChanged(FluidStack newFluidStack) {
|
||||
if (!hasLevel())
|
||||
return;
|
||||
|
||||
|
||||
|
||||
if (!level.isClientSide) {
|
||||
setChanged();
|
||||
sendData();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
public float getFillState() {
|
||||
return (float) tankInventory.getFluidAmount() / tankInventory.getCapacity();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void read(CompoundTag compound, boolean clientPacket) {
|
||||
super.read(compound, clientPacket);
|
||||
|
||||
bottom = compound.getBoolean("Bottom");
|
||||
|
||||
east = compound.getBoolean("East");
|
||||
west = compound.getBoolean("West");
|
||||
north = compound.getBoolean("North");
|
||||
south = compound.getBoolean("South");
|
||||
tankInventory.readFromNBT(compound.getCompound("TankContent"));
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(CompoundTag compound, boolean clientPacket) {
|
||||
super.write(compound, clientPacket);
|
||||
|
||||
|
||||
compound.putBoolean("Bottom", bottom);
|
||||
|
||||
compound.putBoolean("East", east);
|
||||
compound.putBoolean("West", west);
|
||||
compound.putBoolean("North", north);
|
||||
compound.putBoolean("South", south);
|
||||
compound.put("TankContent", tankInventory.writeToNBT(new CompoundTag()));
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public LerpedFloat getFluidLevel() {
|
||||
return fluidLevel;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.drmangotea.tfmg.content.concrete.formwork;
|
||||
|
||||
import com.simibubi.create.Create;
|
||||
import com.simibubi.create.content.logistics.chute.ChuteBlock;
|
||||
import com.simibubi.create.content.redstone.thresholdSwitch.ThresholdSwitchBlock;
|
||||
import com.simibubi.create.foundation.data.AssetLookup;
|
||||
import com.simibubi.create.foundation.data.SpecialBlockStateGen;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
import com.tterrag.registrate.providers.DataGenContext;
|
||||
import com.tterrag.registrate.providers.RegistrateBlockstateProvider;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraftforge.client.model.generators.ModelFile;
|
||||
|
||||
public class FormWorkGenerator extends SpecialBlockStateGen {
|
||||
|
||||
@Override
|
||||
protected int getXRotation(BlockState state) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getYRotation(BlockState state) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T extends Block> ModelFile getModel(DataGenContext<Block, T> ctx, RegistrateBlockstateProvider prov,
|
||||
BlockState state) {
|
||||
|
||||
|
||||
|
||||
return AssetLookup.partialBaseModel(ctx, prov, "base");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
package com.drmangotea.tfmg.content.concrete.formwork;
|
||||
|
||||
|
||||
import com.drmangotea.tfmg.CreateTFMG;
|
||||
import com.drmangotea.tfmg.registry.TFMGPartialModels;
|
||||
import com.jozufozu.flywheel.util.transform.TransformStack;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.mojang.blaze3d.vertex.VertexConsumer;
|
||||
|
||||
|
||||
import com.simibubi.create.AllPartialModels;
|
||||
import com.simibubi.create.content.fluids.tank.FluidTankBlockEntity;
|
||||
import com.simibubi.create.foundation.blockEntity.renderer.SafeBlockEntityRenderer;
|
||||
import com.simibubi.create.foundation.fluid.FluidRenderer;
|
||||
import com.simibubi.create.foundation.render.CachedBufferer;
|
||||
|
||||
import com.simibubi.create.foundation.utility.Iterate;
|
||||
import com.simibubi.create.foundation.utility.animation.LerpedFloat;
|
||||
|
||||
import net.minecraft.client.renderer.MultiBufferSource;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.capability.templates.FluidTank;
|
||||
|
||||
public class FormWorkRenderer extends SafeBlockEntityRenderer<FormWorkBlockEntity> {
|
||||
|
||||
public FormWorkRenderer(BlockEntityRendererProvider.Context context) {}
|
||||
|
||||
@Override
|
||||
protected void renderSafe(FormWorkBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer,
|
||||
int light, int overlay) {
|
||||
|
||||
renderConcreteInside(be,partialTicks,ms,buffer,light,overlay);
|
||||
|
||||
BlockState blockState = be.getBlockState();
|
||||
VertexConsumer vb = buffer.getBuffer(RenderType.solid());
|
||||
ms.pushPose();
|
||||
TransformStack msr = TransformStack.cast(ms);
|
||||
msr.translate(1 / 2f, 0.5, 1 / 2f);
|
||||
|
||||
if(be.north) {
|
||||
CachedBufferer.partial(TFMGPartialModels.FORMWORK_SIDE, blockState)
|
||||
.unCentre()
|
||||
.light(light)
|
||||
.renderInto(ms, vb);
|
||||
}
|
||||
if(be.east) {
|
||||
CachedBufferer.partial(TFMGPartialModels.FORMWORK_SIDE, blockState)
|
||||
.rotateY(270)
|
||||
.unCentre()
|
||||
.light(light)
|
||||
.renderInto(ms, vb);
|
||||
}
|
||||
if(be.south) {
|
||||
CachedBufferer.partial(TFMGPartialModels.FORMWORK_SIDE, blockState)
|
||||
.rotateY(180)
|
||||
.unCentre()
|
||||
.light(light)
|
||||
.renderInto(ms, vb);
|
||||
}
|
||||
|
||||
if(be.west) {
|
||||
CachedBufferer.partial(TFMGPartialModels.FORMWORK_SIDE, blockState)
|
||||
.rotateY(90)
|
||||
.unCentre()
|
||||
.light(light)
|
||||
.renderInto(ms, vb);
|
||||
}
|
||||
///
|
||||
if(be.bottom) {
|
||||
CachedBufferer.partial(TFMGPartialModels.FORMWORK_BOTTOM, blockState)
|
||||
.unCentre()
|
||||
.light(light)
|
||||
.renderInto(ms, vb);
|
||||
|
||||
}
|
||||
|
||||
|
||||
ms.popPose();
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void renderConcreteInside(FormWorkBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer,
|
||||
int light, int overlay) {
|
||||
LerpedFloat fluidLevel = be.getFluidLevel();
|
||||
|
||||
if (fluidLevel == null) {
|
||||
return;
|
||||
}
|
||||
float level = fluidLevel.getValue(partialTicks);
|
||||
|
||||
float capHeight = 1 / 4f;
|
||||
float tankHullWidth = 1 / 16f + 1 / 128f;
|
||||
float minPuddleHeight = 1 / 16f;
|
||||
|
||||
|
||||
// float level = fluidLevel.getValue(partialTicks);
|
||||
// if (level < 1 / (512f * 1))
|
||||
// return;
|
||||
// float clampedLevel = Mth.clamp(level * 1, 0, 1);
|
||||
|
||||
FluidTank tank = be.tankInventory;
|
||||
FluidStack fluidStack = tank.getFluid();
|
||||
|
||||
if (fluidStack.isEmpty())
|
||||
return;
|
||||
|
||||
|
||||
|
||||
if(be.getLevel().getBlockEntity(be.getBlockPos().below())instanceof FormWorkBlockEntity){
|
||||
if(((FormWorkBlockEntity) be.getLevel().getBlockEntity(be.getBlockPos().below())).tankInventory.getFluidAmount()<1000){
|
||||
be.fluidLevel.setValue(0);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
ms.pushPose();
|
||||
// ms.translate(0, clampedLevel - 1, 0);
|
||||
FluidRenderer.renderFluidBox(fluidStack, 0, 0, 0, 1, be.getFluidLevel().getValue(partialTicks)/1000, 1, buffer, ms, light, false);
|
||||
ms.popPose();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean shouldRenderOffScreen(FormWorkBlockEntity te) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
package com.drmangotea.tfmg.content.machines;
|
||||
|
||||
import com.simibubi.create.content.equipment.goggles.IHaveGoggleInformation;
|
||||
import com.simibubi.create.foundation.blockEntity.SmartBlockEntity;
|
||||
import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour;
|
||||
import com.simibubi.create.foundation.blockEntity.behaviour.fluid.SmartFluidTankBehaviour;
|
||||
import com.simibubi.create.foundation.fluid.CombinedTankWrapper;
|
||||
import com.simibubi.create.foundation.utility.Couple;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
import com.simibubi.create.foundation.utility.LangBuilder;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.common.util.LazyOptional;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
||||
import net.minecraftforge.fluids.capability.IFluidHandler;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
public class TFMGMachineBlockEntity extends SmartBlockEntity implements IHaveGoggleInformation {
|
||||
public SmartFluidTankBehaviour tank1;
|
||||
public SmartFluidTankBehaviour tank2;
|
||||
|
||||
private boolean contentsChanged;
|
||||
|
||||
protected LazyOptional<IFluidHandler> fluidCapability;
|
||||
|
||||
public TFMGMachineBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
|
||||
super(type, pos, state);
|
||||
tank1.forbidExtraction();
|
||||
tank2.forbidInsertion();
|
||||
|
||||
contentsChanged = true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void addBehaviours(List<BlockEntityBehaviour> behaviours) {
|
||||
tank1 = new SmartFluidTankBehaviour(SmartFluidTankBehaviour.INPUT, this, 1, 1000, true)
|
||||
.whenFluidUpdates(() -> contentsChanged = true);
|
||||
|
||||
tank2 = new SmartFluidTankBehaviour(SmartFluidTankBehaviour.OUTPUT, this, 1, 1000, true)
|
||||
.whenFluidUpdates(() -> contentsChanged = true)
|
||||
.forbidInsertion();
|
||||
behaviours.add(tank1);
|
||||
behaviours.add(tank1);
|
||||
|
||||
fluidCapability = LazyOptional.of(() -> {
|
||||
LazyOptional<? extends IFluidHandler> inputCap = tank1.getCapability();
|
||||
LazyOptional<? extends IFluidHandler> outputCap = tank2.getCapability();
|
||||
return new CombinedTankWrapper(outputCap.orElse(null), inputCap.orElse(null));
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invalidate() {
|
||||
super.invalidate();
|
||||
|
||||
fluidCapability.invalidate();
|
||||
}
|
||||
@Nonnull
|
||||
@Override
|
||||
public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> cap, Direction side) {
|
||||
|
||||
if (cap == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY)
|
||||
return fluidCapability.cast();
|
||||
return super.getCapability(cap, side);
|
||||
}
|
||||
@Override
|
||||
public void notifyUpdate() {
|
||||
super.notifyUpdate();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean addToGoggleTooltip(List<Component> tooltip, boolean isPlayerSneaking) {
|
||||
|
||||
|
||||
|
||||
//--Fluid Info--//
|
||||
LazyOptional<IFluidHandler> handler = this.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY);
|
||||
Optional<IFluidHandler> resolve = handler.resolve();
|
||||
if (!resolve.isPresent())
|
||||
return false;
|
||||
|
||||
IFluidHandler tank = resolve.get();
|
||||
if (tank.getTanks() == 0)
|
||||
return false;
|
||||
|
||||
LangBuilder mb = Lang.translate("generic.unit.millibuckets");
|
||||
|
||||
|
||||
boolean isEmpty = true;
|
||||
for (int i = 0; i < tank.getTanks(); i++) {
|
||||
FluidStack fluidStack = tank.getFluidInTank(i);
|
||||
if (fluidStack.isEmpty())
|
||||
continue;
|
||||
|
||||
Lang.fluidName(fluidStack)
|
||||
.style(ChatFormatting.GRAY)
|
||||
.forGoggles(tooltip, 1);
|
||||
|
||||
Lang.builder()
|
||||
.add(Lang.number(fluidStack.getAmount())
|
||||
.add(mb)
|
||||
.style(ChatFormatting.DARK_GREEN))
|
||||
.text(ChatFormatting.GRAY, " / ")
|
||||
.add(Lang.number(tank.getTankCapacity(i))
|
||||
.add(mb)
|
||||
.style(ChatFormatting.DARK_GRAY))
|
||||
.forGoggles(tooltip, 1);
|
||||
|
||||
isEmpty = false;
|
||||
}
|
||||
|
||||
if (tank.getTanks() > 1) {
|
||||
if (isEmpty)
|
||||
tooltip.remove(tooltip.size() - 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!isEmpty)
|
||||
return true;
|
||||
|
||||
Lang.translate("gui.goggles.fluid_container.capacity")
|
||||
.add(Lang.number(tank.getTankCapacity(0))
|
||||
.add(mb)
|
||||
.style(ChatFormatting.DARK_GREEN))
|
||||
.style(ChatFormatting.DARK_GRAY)
|
||||
.forGoggles(tooltip, 1);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,35 @@
|
||||
package com.drmangotea.tfmg.registry;
|
||||
|
||||
import com.drmangotea.tfmg.CreateTFMG;
|
||||
import com.drmangotea.tfmg.content.concrete.formwork.FormWorkBlockEntity;
|
||||
import com.drmangotea.tfmg.content.concrete.formwork.FormWorkRenderer;
|
||||
import com.simibubi.create.content.fluids.pipes.FluidPipeBlockEntity;
|
||||
import com.simibubi.create.content.fluids.pipes.StraightPipeBlockEntity;
|
||||
import com.simibubi.create.content.fluids.pipes.TransparentStraightPipeRenderer;
|
||||
import com.simibubi.create.content.fluids.pump.PumpBlockEntity;
|
||||
import com.simibubi.create.content.fluids.pump.PumpCogInstance;
|
||||
import com.simibubi.create.content.fluids.pump.PumpRenderer;
|
||||
import com.simibubi.create.content.kinetics.base.HalfShaftInstance;
|
||||
import com.simibubi.create.content.kinetics.base.HorizontalHalfShaftInstance;
|
||||
import com.simibubi.create.content.kinetics.simpleRelays.BracketedKineticBlockEntity;
|
||||
import com.simibubi.create.content.kinetics.simpleRelays.SimpleKineticBlockEntity;
|
||||
import com.simibubi.create.foundation.data.CreateRegistrate;
|
||||
import com.tterrag.registrate.util.entry.BlockEntityEntry;
|
||||
|
||||
import static com.drmangotea.tfmg.CreateTFMG.REGISTRATE;
|
||||
|
||||
|
||||
public class TFMGBlockEntities {
|
||||
|
||||
|
||||
|
||||
public static final BlockEntityEntry<FormWorkBlockEntity> FORMWORK = REGISTRATE
|
||||
.blockEntity("formwork", FormWorkBlockEntity::new)
|
||||
.renderer(() -> FormWorkRenderer::new)
|
||||
.validBlocks(TFMGBlocks.FORMWORK_BLOCK)
|
||||
.register();
|
||||
|
||||
|
||||
|
||||
public static void register() {}
|
||||
}
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
package com.drmangotea.tfmg.registry;
|
||||
|
||||
import com.tterrag.registrate.providers.DataGenContext;
|
||||
import com.tterrag.registrate.providers.RegistrateBlockstateProvider;
|
||||
import com.tterrag.registrate.util.nullness.NonNullBiConsumer;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
|
||||
public class TFMGBlockStateGen {
|
||||
|
||||
|
||||
public static <T extends Block> NonNullBiConsumer<DataGenContext<Block, T>, RegistrateBlockstateProvider> nothingLol(
|
||||
String path) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,20 +1,21 @@
|
||||
package com.drmangotea.tfmg.registry;
|
||||
|
||||
import com.drmangotea.tfmg.base.TFMGBuilderTransformers;
|
||||
import com.drmangotea.tfmg.base.TFMGSpriteShifts;
|
||||
import com.drmangotea.tfmg.content.concrete.formwork.FormWorkBlock;
|
||||
import com.drmangotea.tfmg.content.concrete.formwork.FormWorkGenerator;
|
||||
import com.drmangotea.tfmg.content.gadgets.explosives.napalm.NapalmBombBlock;
|
||||
import com.drmangotea.tfmg.content.gadgets.explosives.thermite_grenades.fire.BlueFireBlock;
|
||||
import com.drmangotea.tfmg.content.gadgets.explosives.thermite_grenades.fire.GreenFireBlock;
|
||||
import com.simibubi.create.AllCreativeModeTabs;
|
||||
import com.simibubi.create.AllSpriteShifts;
|
||||
import com.simibubi.create.Create;
|
||||
import com.simibubi.create.content.decoration.encasing.CasingBlock;
|
||||
import com.simibubi.create.content.decoration.encasing.EncasedCTBehaviour;
|
||||
import com.simibubi.create.content.logistics.chute.ChuteGenerator;
|
||||
import com.simibubi.create.foundation.data.BuilderTransformers;
|
||||
import com.tterrag.registrate.util.entry.BlockEntry;
|
||||
import net.minecraft.tags.BlockTags;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.SoundType;
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
import net.minecraft.world.level.material.MaterialColor;
|
||||
import net.minecraftforge.common.Tags;
|
||||
|
||||
@@ -23,8 +24,7 @@ import static com.drmangotea.tfmg.CreateTFMG.REGISTRATE;
|
||||
import static com.simibubi.create.foundation.data.BlockStateGen.simpleCubeAll;
|
||||
import static com.simibubi.create.foundation.data.CreateRegistrate.casingConnectivity;
|
||||
import static com.simibubi.create.foundation.data.CreateRegistrate.connectedTextures;
|
||||
import static com.simibubi.create.foundation.data.TagGen.pickaxeOnly;
|
||||
import static com.simibubi.create.foundation.data.TagGen.tagBlockAndItem;
|
||||
import static com.simibubi.create.foundation.data.TagGen.*;
|
||||
|
||||
|
||||
public class TFMGBlocks {
|
||||
@@ -60,7 +60,17 @@ public class TFMGBlocks {
|
||||
|
||||
|
||||
//-----------------------MACHINES---------------------------//
|
||||
|
||||
public static final BlockEntry<FormWorkBlock> FORMWORK_BLOCK =
|
||||
REGISTRATE.block("formwork_block", FormWorkBlock::new)
|
||||
.initialProperties(Material.WOOD)
|
||||
.properties(p -> p.color(MaterialColor.WOOD))
|
||||
.properties(p -> p.requiresCorrectToolForDrops())
|
||||
.properties(BlockBehaviour.Properties::noOcclusion)
|
||||
.blockstate(new FormWorkGenerator()::generate)
|
||||
.transform(axeOnly())
|
||||
.item()
|
||||
.build()
|
||||
.register();
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.drmangotea.tfmg.registry;
|
||||
|
||||
|
||||
import com.drmangotea.tfmg.CreateTFMG;
|
||||
import com.jozufozu.flywheel.core.PartialModel;
|
||||
import com.simibubi.create.content.fluids.FluidTransportBehaviour;
|
||||
import com.simibubi.create.foundation.utility.Couple;
|
||||
import com.simibubi.create.foundation.utility.Iterate;
|
||||
import com.simibubi.create.foundation.utility.Lang;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
||||
import java.util.EnumMap;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
public class TFMGPartialModels {
|
||||
|
||||
public static final PartialModel
|
||||
FORMWORK_BOTTOM = block("formwork_block/block_bottom"),
|
||||
FORMWORK_SIDE = block("formwork_block/block_side");
|
||||
|
||||
public static final Map<ResourceLocation, Couple<PartialModel>> FOLDING_DOORS = new HashMap<>();
|
||||
|
||||
public static final Map<FluidTransportBehaviour.AttachmentTypes.ComponentPartials, Map<Direction, PartialModel>> STEEL_PIPE_ATTACHMENTS =
|
||||
new EnumMap<>(FluidTransportBehaviour.AttachmentTypes.ComponentPartials.class);
|
||||
|
||||
|
||||
static {
|
||||
for (FluidTransportBehaviour.AttachmentTypes.ComponentPartials type : FluidTransportBehaviour.AttachmentTypes.ComponentPartials.values()) {
|
||||
Map<Direction, PartialModel> map = new HashMap<>();
|
||||
for (Direction d : Iterate.directions) {
|
||||
String asId = Lang.asId(type.name());
|
||||
map.put(d, block("steel_fluid_pipe/" + asId + "/" + Lang.asId(d.getSerializedName())));
|
||||
}
|
||||
STEEL_PIPE_ATTACHMENTS.put(type, map);
|
||||
}
|
||||
|
||||
putFoldingDoor("steel_door");
|
||||
|
||||
|
||||
}
|
||||
private static void putFoldingDoor(String path) {
|
||||
FOLDING_DOORS.put(CreateTFMG.asResource(path),
|
||||
Couple.create(block(path + "/fold_left"), block(path + "/fold_right")));
|
||||
}
|
||||
private static PartialModel block(String path) {
|
||||
return new PartialModel(CreateTFMG.asResource("block/" + path));
|
||||
}
|
||||
|
||||
public static void init() {}
|
||||
|
||||
}
|
||||
@@ -1,263 +0,0 @@
|
||||
package com.drmangotea.tfmg.registry;
|
||||
|
||||
|
||||
import static com.simibubi.create.foundation.data.TagGen.pickaxeOnly;
|
||||
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import com.drmangotea.tfmg.CreateTFMG;
|
||||
import com.simibubi.create.foundation.data.BlockStateGen;
|
||||
import com.simibubi.create.foundation.data.CreateBlockEntityBuilder;
|
||||
import com.simibubi.create.foundation.data.CreateEntityBuilder;
|
||||
import com.simibubi.create.foundation.data.VirtualFluidBuilder;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
|
||||
import com.simibubi.create.CreateClient;
|
||||
import com.simibubi.create.content.decoration.encasing.CasingConnectivity;
|
||||
import com.simibubi.create.content.fluids.VirtualFluid;
|
||||
import com.simibubi.create.foundation.block.connected.CTModel;
|
||||
import com.simibubi.create.foundation.block.connected.ConnectedTextureBehaviour;
|
||||
import com.simibubi.create.foundation.item.TooltipModifier;
|
||||
import com.simibubi.create.foundation.utility.RegisteredObjects;
|
||||
import com.tterrag.registrate.AbstractRegistrate;
|
||||
import com.tterrag.registrate.builders.BlockBuilder;
|
||||
import com.tterrag.registrate.builders.BlockEntityBuilder.BlockEntityFactory;
|
||||
import com.tterrag.registrate.builders.Builder;
|
||||
import com.tterrag.registrate.builders.FluidBuilder;
|
||||
import com.tterrag.registrate.util.entry.RegistryEntry;
|
||||
import com.tterrag.registrate.util.nullness.NonNullConsumer;
|
||||
import com.tterrag.registrate.util.nullness.NonNullFunction;
|
||||
import com.tterrag.registrate.util.nullness.NonNullSupplier;
|
||||
|
||||
import net.minecraft.client.resources.model.BakedModel;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.tags.BlockTags;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.MobCategory;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour.Properties;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.client.extensions.common.IClientFluidTypeExtensions;
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import net.minecraftforge.fluids.FluidType;
|
||||
import net.minecraftforge.fluids.ForgeFlowingFluid;
|
||||
import net.minecraftforge.fml.DistExecutor;
|
||||
import net.minecraftforge.registries.RegistryObject;
|
||||
|
||||
public class TFMGRegistrate extends AbstractRegistrate<TFMGRegistrate> {
|
||||
@Nullable
|
||||
protected Function<Item, TooltipModifier> currentTooltipModifierFactory;
|
||||
|
||||
protected TFMGRegistrate(String modid) {
|
||||
super(modid);
|
||||
}
|
||||
|
||||
public static TFMGRegistrate create(String modid) {
|
||||
return new TFMGRegistrate(modid);
|
||||
}
|
||||
|
||||
public TFMGRegistrate setTooltipModifierFactory(@Nullable Function<Item, TooltipModifier> factory) {
|
||||
currentTooltipModifierFactory = factory;
|
||||
return self();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Function<Item, TooltipModifier> getTooltipModifierFactory() {
|
||||
return currentTooltipModifierFactory;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TFMGRegistrate registerEventListeners(IEventBus bus) {
|
||||
return super.registerEventListeners(bus);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected <R, T extends R> RegistryEntry<T> accept(String name, ResourceKey<? extends Registry<R>> type,
|
||||
Builder<R, T, ?, ?> builder, NonNullSupplier<? extends T> creator,
|
||||
NonNullFunction<RegistryObject<T>, ? extends RegistryEntry<T>> entryFactory) {
|
||||
RegistryEntry<T> entry = super.accept(name, type, builder, creator, entryFactory);
|
||||
if (type.equals(Registry.ITEM_REGISTRY)) {
|
||||
if (currentTooltipModifierFactory != null) {
|
||||
TooltipModifier.REGISTRY.registerDeferred(entry.getId(), currentTooltipModifierFactory);
|
||||
}
|
||||
}
|
||||
return entry;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T extends BlockEntity> CreateBlockEntityBuilder<T, TFMGRegistrate> blockEntity(String name,
|
||||
BlockEntityFactory<T> factory) {
|
||||
return blockEntity(self(), name, factory);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T extends BlockEntity, P> CreateBlockEntityBuilder<T, P> blockEntity(P parent, String name,
|
||||
BlockEntityFactory<T> factory) {
|
||||
return (CreateBlockEntityBuilder<T, P>) entry(name,
|
||||
(callback) -> CreateBlockEntityBuilder.create(this, parent, name, callback, factory));
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T extends Entity> CreateEntityBuilder<T, TFMGRegistrate> entity(String name,
|
||||
EntityType.EntityFactory<T> factory, MobCategory classification) {
|
||||
return this.entity(self(), name, factory, classification);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T extends Entity, P> CreateEntityBuilder<T, P> entity(P parent, String name,
|
||||
EntityType.EntityFactory<T> factory, MobCategory classification) {
|
||||
return (CreateEntityBuilder<T, P>) this.entry(name, (callback) -> {
|
||||
return CreateEntityBuilder.create(this, parent, name, callback, factory, classification);
|
||||
});
|
||||
}
|
||||
|
||||
/* Palettes */
|
||||
|
||||
public <T extends Block> BlockBuilder<T, TFMGRegistrate> paletteStoneBlock(String name,
|
||||
NonNullFunction<Properties, T> factory, NonNullSupplier<Block> propertiesFrom, boolean worldGenStone,
|
||||
boolean hasNaturalVariants) {
|
||||
BlockBuilder<T, TFMGRegistrate> builder = super.block(name, factory).initialProperties(propertiesFrom)
|
||||
.transform(pickaxeOnly())
|
||||
.blockstate(hasNaturalVariants ? BlockStateGen.naturalStoneTypeBlock(name) : (c, p) -> {
|
||||
final String location = "block/palettes/stone_types/" + c.getName();
|
||||
p.simpleBlock(c.get(), p.models()
|
||||
.cubeAll(c.getName(), p.modLoc(location)));
|
||||
})
|
||||
.tag(BlockTags.DRIPSTONE_REPLACEABLE)
|
||||
.tag(BlockTags.AZALEA_ROOT_REPLACEABLE)
|
||||
.tag(BlockTags.MOSS_REPLACEABLE)
|
||||
.tag(BlockTags.LUSH_GROUND_REPLACEABLE)
|
||||
.item()
|
||||
.model((c, p) -> p.cubeAll(c.getName(),
|
||||
p.modLoc(hasNaturalVariants ? "block/palettes/stone_types/natural/" + name + "_1"
|
||||
: "block/palettes/stone_types/" + c.getName())))
|
||||
.build();
|
||||
return builder;
|
||||
}
|
||||
|
||||
public BlockBuilder<Block, TFMGRegistrate> paletteStoneBlock(String name, NonNullSupplier<Block> propertiesFrom,
|
||||
boolean worldGenStone, boolean hasNaturalVariants) {
|
||||
return paletteStoneBlock(name, Block::new, propertiesFrom, worldGenStone, hasNaturalVariants);
|
||||
}
|
||||
|
||||
/* Fluids */
|
||||
|
||||
public <T extends ForgeFlowingFluid> FluidBuilder<T, TFMGRegistrate> virtualFluid(String name,
|
||||
FluidBuilder.FluidTypeFactory typeFactory, NonNullFunction<ForgeFlowingFluid.Properties, T> factory) {
|
||||
return entry(name,
|
||||
c -> new VirtualFluidBuilder<>(self(), self(), name, c, CreateTFMG.asResource("fluid/" + name + "_still"),
|
||||
CreateTFMG.asResource("fluid/" + name + "_flow"), typeFactory, factory));
|
||||
}
|
||||
|
||||
public <T extends ForgeFlowingFluid> FluidBuilder<T, TFMGRegistrate> virtualFluid(String name,
|
||||
ResourceLocation still, ResourceLocation flow, FluidBuilder.FluidTypeFactory typeFactory,
|
||||
NonNullFunction<ForgeFlowingFluid.Properties, T> factory) {
|
||||
return entry(name, c -> new VirtualFluidBuilder<>(self(), self(), name, c, still, flow, typeFactory, factory));
|
||||
}
|
||||
|
||||
public FluidBuilder<VirtualFluid, TFMGRegistrate> virtualFluid(String name) {
|
||||
return entry(name,
|
||||
c -> new VirtualFluidBuilder<VirtualFluid, TFMGRegistrate>(self(), self(), name, c,
|
||||
CreateTFMG.asResource("fluid/" + name + "_still"), CreateTFMG.asResource("fluid/" + name + "_flow"),
|
||||
TFMGRegistrate::defaultFluidType, VirtualFluid::new));
|
||||
}
|
||||
|
||||
public FluidBuilder<VirtualFluid, TFMGRegistrate> virtualFluid(String name, ResourceLocation still,
|
||||
ResourceLocation flow) {
|
||||
return entry(name, c -> new VirtualFluidBuilder<>(self(), self(), name, c, still, flow,
|
||||
TFMGRegistrate::defaultFluidType, VirtualFluid::new));
|
||||
}
|
||||
|
||||
public FluidBuilder<ForgeFlowingFluid.Flowing, TFMGRegistrate> standardFluid(String name) {
|
||||
return fluid(name, CreateTFMG.asResource("fluid/" + name + "_still"), CreateTFMG.asResource("fluid/" + name + "_flow"));
|
||||
}
|
||||
|
||||
public FluidBuilder<ForgeFlowingFluid.Flowing, TFMGRegistrate> standardFluid(String name,
|
||||
FluidBuilder.FluidTypeFactory typeFactory) {
|
||||
return fluid(name, CreateTFMG.asResource("fluid/" + name + "_still"), CreateTFMG.asResource("fluid/" + name + "_flow"),
|
||||
typeFactory);
|
||||
}
|
||||
|
||||
public static FluidType defaultFluidType(FluidType.Properties properties, ResourceLocation stillTexture,
|
||||
ResourceLocation flowingTexture) {
|
||||
return new FluidType(properties) {
|
||||
@Override
|
||||
public void initializeClient(Consumer<IClientFluidTypeExtensions> consumer) {
|
||||
consumer.accept(new IClientFluidTypeExtensions() {
|
||||
@Override
|
||||
public ResourceLocation getStillTexture() {
|
||||
return stillTexture;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getFlowingTexture() {
|
||||
return flowingTexture;
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/* Util */
|
||||
|
||||
public static <T extends Block> NonNullConsumer<? super T> casingConnectivity(
|
||||
BiConsumer<T, CasingConnectivity> consumer) {
|
||||
return entry -> onClient(() -> () -> registerCasingConnectivity(entry, consumer));
|
||||
}
|
||||
|
||||
public static <T extends Block> NonNullConsumer<? super T> blockModel(
|
||||
Supplier<NonNullFunction<BakedModel, ? extends BakedModel>> func) {
|
||||
return entry -> onClient(() -> () -> registerBlockModel(entry, func));
|
||||
}
|
||||
|
||||
public static <T extends Item> NonNullConsumer<? super T> itemModel(
|
||||
Supplier<NonNullFunction<BakedModel, ? extends BakedModel>> func) {
|
||||
return entry -> onClient(() -> () -> registerItemModel(entry, func));
|
||||
}
|
||||
|
||||
public static <T extends Block> NonNullConsumer<? super T> connectedTextures(
|
||||
Supplier<ConnectedTextureBehaviour> behavior) {
|
||||
return entry -> onClient(() -> () -> registerCTBehviour(entry, behavior));
|
||||
}
|
||||
|
||||
protected static void onClient(Supplier<Runnable> toRun) {
|
||||
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, toRun);
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
private static <T extends Block> void registerCasingConnectivity(T entry,
|
||||
BiConsumer<T, CasingConnectivity> consumer) {
|
||||
consumer.accept(entry, CreateClient.CASING_CONNECTIVITY);
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
private static void registerBlockModel(Block entry,
|
||||
Supplier<NonNullFunction<BakedModel, ? extends BakedModel>> func) {
|
||||
CreateClient.MODEL_SWAPPER.getCustomBlockModels()
|
||||
.register(RegisteredObjects.getKeyOrThrow(entry), func.get());
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
private static void registerItemModel(Item entry,
|
||||
Supplier<NonNullFunction<BakedModel, ? extends BakedModel>> func) {
|
||||
CreateClient.MODEL_SWAPPER.getCustomItemModels()
|
||||
.register(RegisteredObjects.getKeyOrThrow(entry), func.get());
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
private static void registerCTBehviour(Block entry, Supplier<ConnectedTextureBehaviour> behaviorSupplier) {
|
||||
ConnectedTextureBehaviour behavior = behaviorSupplier.get();
|
||||
CreateClient.MODEL_SWAPPER.getCustomBlockModels()
|
||||
.register(RegisteredObjects.getKeyOrThrow(entry), model -> new CTModel(model, behavior));
|
||||
}
|
||||
}
|
||||
@@ -3,10 +3,10 @@
|
||||
{
|
||||
"apply": [
|
||||
{
|
||||
"model": "tfmg:block/blue_fire_floor0"
|
||||
"model": "tfmg:block/fire/blue_fire_floor0"
|
||||
},
|
||||
{
|
||||
"model": "tfmg:block/blue_fire_floor1"
|
||||
"model": "tfmg:block/fire/blue_fire_floor1"
|
||||
}
|
||||
],
|
||||
"when": {
|
||||
@@ -20,16 +20,16 @@
|
||||
{
|
||||
"apply": [
|
||||
{
|
||||
"model": "tfmg:block/blue_fire_side0"
|
||||
"model": "tfmg:block/fire/blue_fire_side0"
|
||||
},
|
||||
{
|
||||
"model": "tfmg:block/blue_fire_side1"
|
||||
"model": "tfmg:block/fire/blue_fire_side1"
|
||||
},
|
||||
{
|
||||
"model": "tfmg:block/blue_fire_side_alt0"
|
||||
"model": "tfmg:block/fire/blue_fire_side_alt0"
|
||||
},
|
||||
{
|
||||
"model": "tfmg:block/blue_fire_side_alt1"
|
||||
"model": "tfmg:block/fire/blue_fire_side_alt1"
|
||||
}
|
||||
],
|
||||
"when": {
|
||||
@@ -50,19 +50,19 @@
|
||||
{
|
||||
"apply": [
|
||||
{
|
||||
"model": "tfmg:block/blue_fire_side0",
|
||||
"model": "tfmg:block/fire/blue_fire_side0",
|
||||
"y": 90
|
||||
},
|
||||
{
|
||||
"model": "tfmg:block/blue_fire_side1",
|
||||
"model": "tfmg:block/fire/blue_fire_side1",
|
||||
"y": 90
|
||||
},
|
||||
{
|
||||
"model": "tfmg:block/blue_fire_side_alt0",
|
||||
"model": "tfmg:block/fire/blue_fire_side_alt0",
|
||||
"y": 90
|
||||
},
|
||||
{
|
||||
"model": "tfmg:block/blue_fire_side_alt1",
|
||||
"model": "tfmg:block/fire/blue_fire_side_alt1",
|
||||
"y": 90
|
||||
}
|
||||
],
|
||||
@@ -84,19 +84,19 @@
|
||||
{
|
||||
"apply": [
|
||||
{
|
||||
"model": "tfmg:block/blue_fire_side0",
|
||||
"model": "tfmg:block/fire/blue_fire_side0",
|
||||
"y": 180
|
||||
},
|
||||
{
|
||||
"model": "tfmg:block/blue_fire_side1",
|
||||
"model": "tfmg:block/fire/blue_fire_side1",
|
||||
"y": 180
|
||||
},
|
||||
{
|
||||
"model": "tfmg:block/blue_fire_side_alt0",
|
||||
"model": "tfmg:block/fire/blue_fire_side_alt0",
|
||||
"y": 180
|
||||
},
|
||||
{
|
||||
"model": "tfmg:block/blue_fire_side_alt1",
|
||||
"model": "tfmg:block/fire/blue_fire_side_alt1",
|
||||
"y": 180
|
||||
}
|
||||
],
|
||||
@@ -118,19 +118,19 @@
|
||||
{
|
||||
"apply": [
|
||||
{
|
||||
"model": "tfmg:block/blue_fire_side0",
|
||||
"model": "tfmg:block/fire/blue_fire_side0",
|
||||
"y": 270
|
||||
},
|
||||
{
|
||||
"model": "tfmg:block/blue_fire_side1",
|
||||
"model": "tfmg:block/fire/blue_fire_side1",
|
||||
"y": 270
|
||||
},
|
||||
{
|
||||
"model": "tfmg:block/blue_fire_side_alt0",
|
||||
"model": "tfmg:block/fire/blue_fire_side_alt0",
|
||||
"y": 270
|
||||
},
|
||||
{
|
||||
"model": "tfmg:block/blue_fire_side_alt1",
|
||||
"model": "tfmg:block/fire/blue_fire_side_alt1",
|
||||
"y": 270
|
||||
}
|
||||
],
|
||||
@@ -152,16 +152,16 @@
|
||||
{
|
||||
"apply": [
|
||||
{
|
||||
"model": "tfmg:block/blue_fire_up0"
|
||||
"model": "tfmg:block/fire/blue_fire_up0"
|
||||
},
|
||||
{
|
||||
"model": "tfmg:block/blue_fire_up1"
|
||||
"model": "tfmg:block/fire/blue_fire_up1"
|
||||
},
|
||||
{
|
||||
"model": "tfmg:block/blue_fire_up_alt0"
|
||||
"model": "tfmg:block/fire/blue_fire_up_alt0"
|
||||
},
|
||||
{
|
||||
"model": "tfmg:block/blue_fire_up_alt1"
|
||||
"model": "tfmg:block/fire/blue_fire_up_alt1"
|
||||
}
|
||||
],
|
||||
"when": {
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
{
|
||||
"apply": [
|
||||
{
|
||||
"model": "tfmg:block/green_fire_floor0"
|
||||
"model": "tfmg:block/fire/green_fire_floor0"
|
||||
},
|
||||
{
|
||||
"model": "tfmg:block/green_fire_floor1"
|
||||
"model": "tfmg:block/fire/green_fire_floor1"
|
||||
}
|
||||
],
|
||||
"when": {
|
||||
@@ -20,16 +20,16 @@
|
||||
{
|
||||
"apply": [
|
||||
{
|
||||
"model": "tfmg:block/green_fire_side0"
|
||||
"model": "tfmg:block/fire/green_fire_side0"
|
||||
},
|
||||
{
|
||||
"model": "tfmg:block/green_fire_side1"
|
||||
"model": "tfmg:block/fire/green_fire_side1"
|
||||
},
|
||||
{
|
||||
"model": "tfmg:block/green_fire_side_alt0"
|
||||
"model": "tfmg:block/fire/green_fire_side_alt0"
|
||||
},
|
||||
{
|
||||
"model": "tfmg:block/green_fire_side_alt1"
|
||||
"model": "tfmg:block/fire/green_fire_side_alt1"
|
||||
}
|
||||
],
|
||||
"when": {
|
||||
@@ -50,19 +50,19 @@
|
||||
{
|
||||
"apply": [
|
||||
{
|
||||
"model": "tfmg:block/green_fire_side0",
|
||||
"model": "tfmg:block/fire/green_fire_side0",
|
||||
"y": 90
|
||||
},
|
||||
{
|
||||
"model": "tfmg:block/green_fire_side1",
|
||||
"model": "tfmg:block/fire/green_fire_side1",
|
||||
"y": 90
|
||||
},
|
||||
{
|
||||
"model": "tfmg:block/green_fire_side_alt0",
|
||||
"model": "tfmg:block/fire/green_fire_side_alt0",
|
||||
"y": 90
|
||||
},
|
||||
{
|
||||
"model": "tfmg:block/green_fire_side_alt1",
|
||||
"model": "tfmg:block/fire/green_fire_side_alt1",
|
||||
"y": 90
|
||||
}
|
||||
],
|
||||
@@ -84,19 +84,19 @@
|
||||
{
|
||||
"apply": [
|
||||
{
|
||||
"model": "tfmg:block/green_fire_side0",
|
||||
"model": "tfmg:block/fire/green_fire_side0",
|
||||
"y": 180
|
||||
},
|
||||
{
|
||||
"model": "tfmg:block/green_fire_side1",
|
||||
"model": "tfmg:block/fire/green_fire_side1",
|
||||
"y": 180
|
||||
},
|
||||
{
|
||||
"model": "tfmg:block/green_fire_side_alt0",
|
||||
"model": "tfmg:block/fire/green_fire_side_alt0",
|
||||
"y": 180
|
||||
},
|
||||
{
|
||||
"model": "tfmg:block/green_fire_side_alt1",
|
||||
"model": "tfmg:block/fire/green_fire_side_alt1",
|
||||
"y": 180
|
||||
}
|
||||
],
|
||||
@@ -118,19 +118,19 @@
|
||||
{
|
||||
"apply": [
|
||||
{
|
||||
"model": "tfmg:block/green_fire_side0",
|
||||
"model": "tfmg:block/fire/green_fire_side0",
|
||||
"y": 270
|
||||
},
|
||||
{
|
||||
"model": "tfmg:block/green_fire_side1",
|
||||
"model": "tfmg:block/fire/green_fire_side1",
|
||||
"y": 270
|
||||
},
|
||||
{
|
||||
"model": "tfmg:block/green_fire_side_alt0",
|
||||
"model": "tfmg:block/fire/green_fire_side_alt0",
|
||||
"y": 270
|
||||
},
|
||||
{
|
||||
"model": "tfmg:block/green_fire_side_alt1",
|
||||
"model": "tfmg:block/fire/green_fire_side_alt1",
|
||||
"y": 270
|
||||
}
|
||||
],
|
||||
@@ -152,16 +152,16 @@
|
||||
{
|
||||
"apply": [
|
||||
{
|
||||
"model": "tfmg:block/green_fire_up0"
|
||||
"model": "tfmg:block/fire/green_fire_up0"
|
||||
},
|
||||
{
|
||||
"model": "tfmg:block/green_fire_up1"
|
||||
"model": "tfmg:block/fire/green_fire_up1"
|
||||
},
|
||||
{
|
||||
"model": "tfmg:block/green_fire_up_alt0"
|
||||
"model": "tfmg:block/fire/green_fire_up_alt0"
|
||||
},
|
||||
{
|
||||
"model": "tfmg:block/green_fire_up_alt1"
|
||||
"model": "tfmg:block/fire/green_fire_up_alt1"
|
||||
}
|
||||
],
|
||||
"when": {
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"itemGroup.tfmg.base": "Create: The Factory Must Grow",
|
||||
"itemGroup.tfmg.concrete": "Create: TFMG's Concrete"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"credit": "Made with Blockbench",
|
||||
"textures": {
|
||||
"0": "tfmg:block/formwork_bottom",
|
||||
"particle": "tfmg:block/formwork_bottom"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [0, 0, 0],
|
||||
"to": [16, 1, 16],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 16, 1], "texture": "#0"},
|
||||
"east": {"uv": [0, 0, 16, 1], "texture": "#0"},
|
||||
"south": {"uv": [0, 0, 16, 1], "texture": "#0"},
|
||||
"west": {"uv": [0, 0, 16, 1], "texture": "#0"},
|
||||
"up": {"uv": [0, 0, 16, 16], "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 16, 16], "texture": "#0"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"credit": "Made with Blockbench",
|
||||
"textures": {
|
||||
"0": "tfmg:block/formwork_side",
|
||||
"particle": "tfmg:block/formwork_side"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [0, 0, -0.1],
|
||||
"to": [16, 16.001, 0.9],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 16, 16], "texture": "#0"},
|
||||
"east": {"uv": [0, 0, 1, 16], "texture": "#0"},
|
||||
"south": {"uv": [0, 0, 16, 16], "texture": "#0"},
|
||||
"west": {"uv": [0, 0, 1, 16], "texture": "#0"},
|
||||
"up": {"uv": [0, 0, 16, 1], "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 16, 1], "texture": "#0"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"credit": "Made with Blockbench",
|
||||
"textures": {
|
||||
"0": "tfmg:block/formwork_bottom",
|
||||
"particle": "tfmg:block/formwork_bottom"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [1, 0, 1],
|
||||
"to": [15, 1, 15],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 14, 1], "texture": "#0"},
|
||||
"east": {"uv": [0, 0, 14, 1], "texture": "#0"},
|
||||
"south": {"uv": [0, 0, 14, 1], "texture": "#0"},
|
||||
"west": {"uv": [0, 0, 14, 1], "texture": "#0"},
|
||||
"up": {"uv": [1, 1, 15, 15], "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 14, 14], "texture": "#0"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
{
|
||||
"credit": "Made with Blockbench",
|
||||
"parent": "minecraft:block/block",
|
||||
"textures": {
|
||||
"0": "tfmg:block/formwork_bottom",
|
||||
"1": "tfmg:block/formwork_side",
|
||||
"particle": "tfmg:block/formwork_bottom"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [1, 1, 0],
|
||||
"to": [16, 16, 1],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 15, 15], "texture": "#1"},
|
||||
"east": {"uv": [0, 0, 1, 15], "texture": "#1"},
|
||||
"south": {"uv": [0, 0, 15, 15], "texture": "#1"},
|
||||
"west": {"uv": [0, 0, 1, 15], "texture": "#1"},
|
||||
"up": {"uv": [0, 0, 15, 1], "texture": "#1"},
|
||||
"down": {"uv": [0, 0, 15, 1], "texture": "#1"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 1, 0],
|
||||
"to": [1, 16, 15],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 1, 15], "texture": "#1"},
|
||||
"east": {"uv": [0, 0, 15, 15], "texture": "#1"},
|
||||
"south": {"uv": [0, 0, 1, 15], "texture": "#1"},
|
||||
"west": {"uv": [0, 0, 15, 15], "texture": "#1"},
|
||||
"up": {"uv": [0, 0, 15, 1], "rotation": 270, "texture": "#1"},
|
||||
"down": {"uv": [0, 0, 15, 1], "rotation": 90, "texture": "#1"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 1, 15],
|
||||
"to": [15, 16, 16],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 15, 15], "texture": "#1"},
|
||||
"east": {"uv": [0, 0, 1, 15], "texture": "#1"},
|
||||
"south": {"uv": [0, 0, 15, 15], "texture": "#1"},
|
||||
"west": {"uv": [0, 0, 1, 15], "texture": "#1"},
|
||||
"up": {"uv": [0, 0, 15, 1], "rotation": 180, "texture": "#1"},
|
||||
"down": {"uv": [0, 0, 15, 1], "rotation": 180, "texture": "#1"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [15, 1, 1],
|
||||
"to": [16, 16, 16],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 1, 15], "texture": "#1"},
|
||||
"east": {"uv": [0, 0, 15, 15], "texture": "#1"},
|
||||
"south": {"uv": [0, 0, 1, 15], "texture": "#1"},
|
||||
"west": {"uv": [0, 0, 15, 15], "texture": "#1"},
|
||||
"up": {"uv": [0, 0, 15, 1], "rotation": 90, "texture": "#1"},
|
||||
"down": {"uv": [0, 0, 15, 1], "rotation": 270, "texture": "#1"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 0, 0],
|
||||
"to": [16, 1, 16],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 16, 1], "texture": "#0"},
|
||||
"east": {"uv": [0, 0, 16, 1], "texture": "#0"},
|
||||
"south": {"uv": [0, 0, 16, 1], "texture": "#0"},
|
||||
"west": {"uv": [0, 0, 16, 1], "texture": "#0"},
|
||||
"up": {"uv": [0, 0, 16, 16], "texture": "#0"},
|
||||
"down": {"uv": [0, 0, 16, 16], "texture": "#0"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 150 B |
BIN
src/main/resources/assets/tfmg/textures/block/formwork_side.png
Normal file
BIN
src/main/resources/assets/tfmg/textures/block/formwork_side.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 144 B |
Reference in New Issue
Block a user