Fixed stairs rendering when smooth lighting is disabled. Cumulated deprecation overrides into BlockDecor where possible ('overriding is fine methods'). Unified block placement flags. Started experimental passive fluid accumulator.
This commit is contained in:
parent
7daaca0073
commit
54bc130790
30 changed files with 364 additions and 105 deletions
|
@ -4,4 +4,4 @@ org.gradle.jvmargs=-Xmx8G
|
|||
version_minecraft=1.12.2
|
||||
version_forge=14.23.5.2768
|
||||
version_jei=4.10.0.198
|
||||
version_engineersdecor=1.0.4-b7
|
||||
version_engineersdecor=1.0.4-b8
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/",
|
||||
"1.12.2": {
|
||||
"1.0.4-b8": "[F] Fixed stairs rendering without smooth light (thanks rastot9).\n[A] Added passive fluid accumulator.",
|
||||
"1.0.4-b7": "[F] Fixed recipe loading issue if IE is not installed.\n[M] Valves support IE pressurized fluid transfer.",
|
||||
"1.0.4-b6": "[A] Added redstone controlled fluid valve.\n[A] Added redstone controlled analog fluid valve.\n[M] Check valve recipe adapted (thanks majijn).",
|
||||
"1.0.4-b5": "[A] Horizontal steel double-T support beam with pole connections.\n[A] Added fluid pipe check valve (straight, conducts only one way).\n[M] Internal registration block/te handling changed.",
|
||||
|
@ -31,6 +32,6 @@
|
|||
},
|
||||
"promos": {
|
||||
"1.12.2-recommended": "1.0.3",
|
||||
"1.12.2-latest": "1.0.4-b7"
|
||||
"1.12.2-latest": "1.0.4-b8"
|
||||
}
|
||||
}
|
|
@ -10,6 +10,9 @@ Mod sources for Minecraft version 1.12.2.
|
|||
----
|
||||
## Revision history
|
||||
|
||||
- v1.0.4-b8 [F] Fixed stairs rendering without smooth light (thanks rastot9).
|
||||
[A] Added passive fluid accumulator.
|
||||
|
||||
- v1.0.4-b7 [F] Fixed recipe loading issue if IE is not installed.
|
||||
[M] Valves support IE pressurized fluid transfer.
|
||||
|
||||
|
|
|
@ -9,13 +9,14 @@
|
|||
* - MC block defaults.
|
||||
* - Tooltip functionality
|
||||
* - Model initialisation
|
||||
* - Accumulating "deprecated" warnings from Block where "overriding/implementing is fine".
|
||||
*/
|
||||
package wile.engineersdecor.blocks;
|
||||
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.util.*;
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
import wile.engineersdecor.detail.ModAuxiliaries;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.state.BlockFaceShape;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.EnumPushReaction;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -25,8 +26,8 @@ import net.minecraft.world.IBlockAccess;
|
|||
import net.minecraft.world.World;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
|
@ -48,7 +49,8 @@ public class BlockDecor extends Block
|
|||
public static final long CFG_FACING_PLACEMENT = 0x0000000000000008L; // placed on the facing the player has clicked.
|
||||
public static final long CFG_OPPOSITE_PLACEMENT = 0x0000000000000010L; // placed placed in the opposite direction of the face the player clicked.
|
||||
public static final long CFG_FLIP_PLACEMENT_IF_SAME = 0x0000000000000020L; // placement direction flipped if an instance of the same class was clicked
|
||||
public static final long CFG_TRANSLUCENT = 0x0000000000000040L; // indicates a block/pane is glass like (transparent, etc)
|
||||
public static final long CFG_FLIP_PLACEMENT_SHIFTCLICK = 0x0000000000000040L; // placement direction flipped if player is sneaking
|
||||
public static final long CFG_TRANSLUCENT = 0x0000000000000080L; // indicates a block/pane is glass like (transparent, etc)
|
||||
public static final long CFG_LIGHT_VALUE_MASK = 0x0000000000000f00L; // fixed value for getLightValue()
|
||||
public static final long CFG_LIGHT_VALUE_SHIFT = 8L;
|
||||
public static final long CFG_ELECTRICAL = 0x0000000000010000L; // Denotes if a component is mainly flux driven.
|
||||
|
@ -91,6 +93,11 @@ public class BlockDecor extends Block
|
|||
public boolean shouldSideBeRendered(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side)
|
||||
{ return true; }
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public BlockFaceShape getBlockFaceShape(IBlockAccess world, IBlockState state, BlockPos pos, EnumFacing face)
|
||||
{ return BlockFaceShape.SOLID; }
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean isFullCube(IBlockState state)
|
||||
|
@ -158,37 +165,18 @@ public class BlockDecor extends Block
|
|||
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
|
||||
{ return aabb; }
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings("deprecation")
|
||||
public AxisAlignedBB getSelectedBoundingBox(IBlockState state, World worldIn, BlockPos pos)
|
||||
{ return state.getBoundingBox(worldIn, pos).offset(pos); }
|
||||
|
||||
@Override
|
||||
public boolean hasTileEntity(IBlockState state)
|
||||
{ return false; }
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
|
||||
{}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ)
|
||||
{ return false; }
|
||||
|
||||
@Override
|
||||
public void onBlockClicked(World world, BlockPos pos, EntityPlayer player)
|
||||
{}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public void neighborChanged(IBlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos)
|
||||
{}
|
||||
|
||||
@Override
|
||||
public int getLightValue(IBlockState state, IBlockAccess world, BlockPos pos)
|
||||
{ return (int)((config & CFG_LIGHT_VALUE_MASK) >> CFG_LIGHT_VALUE_SHIFT); }
|
||||
|
||||
@Override
|
||||
public boolean canPlaceBlockOnSide(World world, BlockPos pos, EnumFacing side)
|
||||
{ return super.canPlaceBlockOnSide(world, pos, side); }
|
||||
|
||||
@Override
|
||||
public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer, EnumHand hand)
|
||||
{ return super.getStateForPlacement(world, pos, facing, hitX, hitY, hitZ, meta, placer, hand); }
|
||||
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
package wile.engineersdecor.blocks;
|
||||
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
|
@ -21,7 +22,6 @@ import net.minecraft.util.math.AxisAlignedBB;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
package wile.engineersdecor.blocks;
|
||||
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
import wile.engineersdecor.detail.Networking;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -44,7 +45,6 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
|||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.registries.IForgeRegistry;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import wile.engineersdecor.detail.Networking;
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
*/
|
||||
package wile.engineersdecor.blocks;
|
||||
|
||||
import net.minecraft.block.SoundType;
|
||||
import wile.engineersdecor.detail.ModAuxiliaries;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.BlockDirectional;
|
||||
|
@ -16,9 +15,11 @@ import net.minecraft.block.material.Material;
|
|||
import net.minecraft.block.properties.PropertyDirection;
|
||||
import net.minecraft.block.state.BlockFaceShape;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.Mirror;
|
||||
import net.minecraft.util.Rotation;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
@ -67,12 +68,14 @@ public class BlockDecorDirected extends BlockDecor
|
|||
{ return false; }
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public int getLightValue(IBlockState state, IBlockAccess world, BlockPos pos)
|
||||
{ return (int)((config & CFG_LIGHT_VALUE_MASK) >> CFG_LIGHT_VALUE_SHIFT); }
|
||||
|
||||
@Override
|
||||
public BlockFaceShape getBlockFaceShape(IBlockAccess world, IBlockState state, BlockPos pos, EnumFacing face)
|
||||
{ return BlockFaceShape.UNDEFINED; }
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
|
||||
{ return AABBs.get(((EnumFacing)state.getValue(FACING)).getIndex() & 0x7); }
|
||||
|
||||
|
@ -102,7 +105,6 @@ public class BlockDecorDirected extends BlockDecor
|
|||
{ return state.withRotation(mirrorIn.toRotation((EnumFacing)state.getValue(FACING))); }
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean canPlaceBlockOnSide(World world, BlockPos pos, EnumFacing side)
|
||||
{
|
||||
if(!super.canPlaceBlockOnSide(world, pos, side)) return false;
|
||||
|
@ -110,8 +112,7 @@ public class BlockDecorDirected extends BlockDecor
|
|||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
|
||||
public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer, EnumHand hand)
|
||||
{
|
||||
if((config & (CFG_HORIZIONTAL|CFG_LOOK_PLACEMENT)) == (CFG_HORIZIONTAL|CFG_LOOK_PLACEMENT)) {
|
||||
// horizontal placement in direction the player is looking
|
||||
|
@ -126,6 +127,7 @@ public class BlockDecorDirected extends BlockDecor
|
|||
// default: placement on the face the player clicking
|
||||
}
|
||||
if((config & CFG_OPPOSITE_PLACEMENT)!=0) facing = facing.getOpposite();
|
||||
if(((config & CFG_FLIP_PLACEMENT_SHIFTCLICK) != 0) && (placer.isSneaking())) facing = facing.getOpposite();
|
||||
return getDefaultState().withProperty(FACING, facing);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,10 +23,7 @@ import javax.annotation.Nullable;
|
|||
public class BlockDecorFull extends BlockDecor
|
||||
{
|
||||
public BlockDecorFull(@Nonnull String registryName, long config, @Nullable Material material, float hardness, float resistance, @Nullable SoundType sound)
|
||||
{
|
||||
super(registryName, config, material, hardness, resistance, sound);
|
||||
setLightOpacity(255);
|
||||
}
|
||||
{ super(registryName, config, material, hardness, resistance, sound); }
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube(IBlockState state)
|
||||
|
|
|
@ -8,12 +8,9 @@
|
|||
*/
|
||||
package wile.engineersdecor.blocks;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import net.minecraft.entity.item.EntityXPOrb;
|
||||
import net.minecraft.init.SoundEvents;
|
||||
import net.minecraftforge.energy.CapabilityEnergy;
|
||||
import net.minecraftforge.energy.IEnergyStorage;
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
import wile.engineersdecor.detail.ExtItems;
|
||||
|
||||
import net.minecraft.stats.StatList;
|
||||
import net.minecraft.block.properties.PropertyBool;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
|
@ -23,6 +20,7 @@ import net.minecraft.block.material.Material;
|
|||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.Explosion;
|
||||
import net.minecraft.entity.item.EntityXPOrb;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -30,6 +28,7 @@ import net.minecraft.entity.player.InventoryPlayer;
|
|||
import net.minecraft.tileentity.TileEntityFurnace;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.init.SoundEvents;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.*;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
|
@ -43,12 +42,15 @@ import net.minecraft.util.text.TextComponentTranslation;
|
|||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.energy.CapabilityEnergy;
|
||||
import net.minecraftforge.energy.IEnergyStorage;
|
||||
import net.minecraftforge.items.CapabilityItemHandler;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import net.minecraftforge.items.wrapper.SidedInvWrapper;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import wile.engineersdecor.detail.ExtItems;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Map;
|
||||
|
|
|
@ -39,7 +39,6 @@ public class BlockDecorGlassBlock extends BlockDecor
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean shouldSideBeRendered(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side)
|
||||
{
|
||||
final IBlockState neighbourState = world.getBlockState(pos.offset(side));
|
||||
|
@ -57,12 +56,10 @@ public class BlockDecorGlassBlock extends BlockDecor
|
|||
{ return false; }
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean isFullCube(IBlockState state)
|
||||
{ return true; }
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean isNormalCube(IBlockState state)
|
||||
{ return false; }
|
||||
|
||||
|
@ -79,12 +76,10 @@ public class BlockDecorGlassBlock extends BlockDecor
|
|||
{ return false; }
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public BlockFaceShape getBlockFaceShape(IBlockAccess world, IBlockState state, BlockPos pos, EnumFacing face)
|
||||
{ return BlockFaceShape.SOLID; }
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
|
||||
{ return FULL_BLOCK_AABB; }
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ package wile.engineersdecor.blocks;
|
|||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.properties.PropertyBool;
|
||||
import net.minecraft.block.properties.PropertyInteger;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import wile.engineersdecor.detail.ModAuxiliaries;
|
||||
|
@ -72,17 +73,14 @@ public class BlockDecorHorizontalSupport extends BlockDecor
|
|||
{ return false; }
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public BlockFaceShape getBlockFaceShape(IBlockAccess world, IBlockState state, BlockPos pos, EnumFacing face)
|
||||
{ return BlockFaceShape.UNDEFINED; }
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings("deprecation")
|
||||
public AxisAlignedBB getSelectedBoundingBox(IBlockState state, World world, BlockPos pos)
|
||||
{ return AABBs.get(state.getValue(EASTWEST) ? 0x3 : 0x2).offset(pos); }
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
|
||||
{ return AABBs.get(state.getValue(EASTWEST) ? 0x1 : 0x0); }
|
||||
|
||||
|
@ -136,13 +134,11 @@ public class BlockDecorHorizontalSupport extends BlockDecor
|
|||
{ return state; }
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean canPlaceBlockOnSide(World world, BlockPos pos, EnumFacing side)
|
||||
{ return super.canPlaceBlockOnSide(world, pos, side); }
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
|
||||
public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer, EnumHand hand)
|
||||
{ return getActualState(getDefaultState().withProperty(EASTWEST, (placer.getHorizontalFacing().getAxis()==EnumFacing.Axis.X)), world, pos); }
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,176 @@
|
|||
/*
|
||||
* @file BlockDecorPassiveFluidAccumulator.java
|
||||
* @author Stefan Wilhelm (wile)
|
||||
* @copyright (C) 2019 Stefan Wilhelm
|
||||
* @license MIT (see https://opensource.org/licenses/MIT)
|
||||
*
|
||||
* Basically a piece of pipe that does not connect to
|
||||
* pipes on the side, and conducts fluids only in one way.
|
||||
*/
|
||||
package wile.engineersdecor.blocks;
|
||||
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
import wile.engineersdecor.detail.ModAuxiliaries;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.common.capabilities.ICapabilityProvider;
|
||||
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
||||
import net.minecraftforge.fluids.capability.IFluidHandler;
|
||||
import net.minecraftforge.fluids.capability.IFluidTankProperties;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
|
||||
public class BlockDecorPassiveFluidAccumulator extends BlockDecorDirected implements ModAuxiliaries.IExperimentalFeature
|
||||
{
|
||||
public BlockDecorPassiveFluidAccumulator(@Nonnull String registryName, long config, @Nullable Material material, float hardness, float resistance, @Nullable SoundType sound, @Nonnull AxisAlignedBB unrotatedAABB)
|
||||
{ super(registryName, config, material, hardness, resistance, sound, unrotatedAABB); }
|
||||
|
||||
@Override
|
||||
public boolean hasTileEntity(IBlockState state)
|
||||
{ return true; }
|
||||
|
||||
@Nullable
|
||||
public TileEntity createTileEntity(World world, IBlockState state)
|
||||
{ return new BlockDecorPassiveFluidAccumulator.BTileEntity(); }
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
// Tile entity
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
public static class BTileEntity extends TileEntity implements IFluidHandler, IFluidTankProperties, ICapabilityProvider
|
||||
, ModAuxiliaries.IExperimentalFeature
|
||||
{
|
||||
protected static int tank_fill_rate_mb = 1000;
|
||||
protected static int tank_capacity_mb = 2000;
|
||||
private final IFluidTankProperties[] fluid_props_ = {this};
|
||||
private final InputFillHandler fill_handler_ = new InputFillHandler(this);
|
||||
private EnumFacing block_facing_ = EnumFacing.NORTH;
|
||||
private FluidStack tank_ = null;
|
||||
private FluidStack last_filled_ = null;
|
||||
private FluidStack last_drain_request_fluid_ = null;
|
||||
private int last_drain_request_amount_ = 0;
|
||||
|
||||
public BTileEntity()
|
||||
{}
|
||||
|
||||
// TileEntity ------------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public boolean shouldRefresh(World world, BlockPos pos, IBlockState os, IBlockState ns)
|
||||
{ return (os.getBlock() != ns.getBlock()) || (!(ns.getBlock() instanceof BlockDecorPipeValve)); }
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt)
|
||||
{
|
||||
super.readFromNBT(nbt);
|
||||
tank_ = (!nbt.hasKey("tank")) ? (null) : (FluidStack.loadFluidStackFromNBT(nbt.getCompoundTag("tank")));
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound writeToNBT(NBTTagCompound nbt)
|
||||
{
|
||||
super.writeToNBT(nbt);
|
||||
if(tank_ != null) nbt.setTag("tank", tank_.writeToNBT(new NBTTagCompound()));
|
||||
return nbt;
|
||||
}
|
||||
|
||||
// ICapabilityProvider --------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public boolean hasCapability(@Nonnull Capability<?> capability, @Nullable EnumFacing facing)
|
||||
{ return ((capability==CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY)) || super.hasCapability(capability, facing); }
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T getCapability(@Nonnull Capability<T> capability, @Nullable EnumFacing facing)
|
||||
{ return (capability!=CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) ? (super.getCapability(capability, facing)) : (facing==block_facing_) ? (((T)this)) : ((T)fill_handler_); }
|
||||
|
||||
// IFluidHandler/IFluidTankProperties of the output port -----------------------------------
|
||||
|
||||
@Override public IFluidTankProperties[] getTankProperties()
|
||||
{ return fluid_props_; }
|
||||
|
||||
@Override public int fill(FluidStack resource, boolean doFill)
|
||||
{ return 0; }
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public FluidStack drain(FluidStack resource, boolean doDrain)
|
||||
{
|
||||
last_drain_request_fluid_ = resource.copy();
|
||||
return ((tank_==null) || (!tank_.isFluidEqual(resource))) ? (null) : drain(resource.amount, doDrain);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public FluidStack drain(int maxDrain, boolean doDrain)
|
||||
{
|
||||
last_drain_request_amount_ = maxDrain;
|
||||
if(tank_==null) return null;
|
||||
if(maxDrain >= tank_.amount) {
|
||||
if(!doDrain) return tank_.copy();
|
||||
FluidStack res = tank_;
|
||||
tank_ = null;
|
||||
return res;
|
||||
} else {
|
||||
FluidStack res = tank_.copy();
|
||||
res.amount = maxDrain;
|
||||
if(doDrain) tank_.amount -= maxDrain;
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
// IFluidTankProperties --
|
||||
@Override @Nullable public FluidStack getContents() { return (tank_==null) ? (null) : (tank_.copy()); }
|
||||
@Override public int getCapacity() { return tank_capacity_mb; }
|
||||
@Override public boolean canFill() { return false; }
|
||||
@Override public boolean canDrain() { return true; }
|
||||
@Override public boolean canFillFluidType(FluidStack fluidStack) { return false; }
|
||||
@Override public boolean canDrainFluidType(FluidStack fluidStack) { return true; }
|
||||
|
||||
// Output flow handler --
|
||||
private static class InputFillHandler implements IFluidHandler, IFluidTankProperties
|
||||
{
|
||||
private final BTileEntity parent_;
|
||||
private final IFluidTankProperties[] props_ = {this};
|
||||
InputFillHandler(BTileEntity parent) { parent_ = parent; }
|
||||
@Override @Nullable public FluidStack drain(FluidStack resource, boolean doDrain) { return null; }
|
||||
@Override @Nullable public FluidStack drain(int maxDrain, boolean doDrain) { return null; }
|
||||
@Override @Nullable public FluidStack getContents() { return (parent_.tank_==null) ? (null) : (parent_.tank_.copy()); }
|
||||
@Override public IFluidTankProperties[] getTankProperties() { return props_; }
|
||||
@Override public int getCapacity() { return tank_capacity_mb; }
|
||||
@Override public boolean canFill() { return true; }
|
||||
@Override public boolean canDrain() { return false; }
|
||||
@Override public boolean canFillFluidType(FluidStack fluidStack) { return true; }
|
||||
@Override public boolean canDrainFluidType(FluidStack fluidStack) { return false; }
|
||||
|
||||
@Override public int fill(FluidStack resource, boolean doFill)
|
||||
{
|
||||
FluidStack res = resource.copy();
|
||||
if(parent_.tank_ == null) {
|
||||
res.amount = MathHelper.clamp(res.amount, 0, tank_fill_rate_mb);
|
||||
if(doFill) parent_.tank_ = res;
|
||||
return res.amount;
|
||||
} else {
|
||||
res.amount = MathHelper.clamp(res.amount, 0, Math.min(tank_fill_rate_mb, tank_capacity_mb-parent_.tank_.amount));
|
||||
if((res.amount <= 0) || (!parent_.tank_.isFluidEqual(resource))) return 0;
|
||||
if(doFill) parent_.tank_.amount += res.amount;
|
||||
return res.amount;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -9,6 +9,7 @@
|
|||
*/
|
||||
package wile.engineersdecor.blocks;
|
||||
|
||||
import net.minecraft.util.EnumHand;
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
import net.minecraft.block.properties.PropertyInteger;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
|
@ -56,13 +57,8 @@ public class BlockDecorPipeValve extends BlockDecorDirected
|
|||
{ return new BlockStateContainer(this, FACING, RS_CONNECTION_DIR); }
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
|
||||
{
|
||||
IBlockState state = super.getStateForPlacement(world, pos, facing, hitX, hitY, hitZ, meta, placer);
|
||||
if(!placer.isSneaking()) state = state.withProperty(FACING, state.getValue(FACING).getOpposite()).withProperty(RS_CONNECTION_DIR, 0);
|
||||
return state;
|
||||
}
|
||||
public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer, EnumHand hand)
|
||||
{ return super.getStateForPlacement(world, pos, facing, hitX, hitY, hitZ, meta, placer, hand).withProperty(RS_CONNECTION_DIR, 0); }
|
||||
|
||||
// world to model index transformations. [Facing block][Facing neighbour] -> int 0=nothing, 1=top, 2=right, 3=down, 4=left.
|
||||
private static final int rsconnectors[][] = {
|
||||
|
@ -93,7 +89,6 @@ public class BlockDecorPipeValve extends BlockDecorDirected
|
|||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public void neighborChanged(IBlockState state, World world, BlockPos pos, Block block, BlockPos fromPos)
|
||||
{
|
||||
EnumFacing fc = state.getValue(FACING);
|
||||
|
|
|
@ -10,8 +10,10 @@ package wile.engineersdecor.blocks;
|
|||
|
||||
import net.minecraft.block.material.EnumPushReaction;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.block.BlockStairs;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -25,7 +27,7 @@ import javax.annotation.Nullable;
|
|||
import java.util.List;
|
||||
|
||||
|
||||
public class BlockDecorStairs extends net.minecraft.block.BlockStairs
|
||||
public class BlockDecorStairs extends BlockStairs
|
||||
{
|
||||
public BlockDecorStairs(@Nonnull String registryName, IBlockState modelState)
|
||||
{
|
||||
|
@ -33,8 +35,7 @@ public class BlockDecorStairs extends net.minecraft.block.BlockStairs
|
|||
setCreativeTab(ModEngineersDecor.CREATIVE_TAB_ENGINEERSDECOR);
|
||||
setRegistryName(ModEngineersDecor.MODID, registryName);
|
||||
setTranslationKey(ModEngineersDecor.MODID + "." + registryName);
|
||||
setLightLevel(0);
|
||||
setLightOpacity(64);
|
||||
setLightOpacity(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -57,10 +58,6 @@ public class BlockDecorStairs extends net.minecraft.block.BlockStairs
|
|||
public boolean isNormalCube(IBlockState state)
|
||||
{ return false; }
|
||||
|
||||
@Override
|
||||
public int getLightValue(IBlockState state, IBlockAccess world, BlockPos pos)
|
||||
{ return 0; }
|
||||
|
||||
@Override
|
||||
public boolean canSpawnInBlock()
|
||||
{ return false; }
|
||||
|
@ -74,8 +71,4 @@ public class BlockDecorStairs extends net.minecraft.block.BlockStairs
|
|||
public EnumPushReaction getPushReaction(IBlockState state)
|
||||
{ return EnumPushReaction.NORMAL; }
|
||||
|
||||
@Override
|
||||
public boolean hasTileEntity(IBlockState state)
|
||||
{ return false; }
|
||||
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ import net.minecraft.block.SoundType;
|
|||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
|
@ -26,10 +27,9 @@ public class BlockDecorStraightPole extends BlockDecorDirected
|
|||
{ super(registryName, config, material, hardness, resistance, sound, unrotatedAABB); }
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
|
||||
public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer, EnumHand hand)
|
||||
{
|
||||
IBlockState state = super.getStateForPlacement(world, pos, facing, hitX, hitY, hitZ, meta, placer);
|
||||
IBlockState state = super.getStateForPlacement(world, pos, facing, hitX, hitY, hitZ, meta, placer, hand);
|
||||
if((config & CFG_FLIP_PLACEMENT_IF_SAME) != 0) {
|
||||
if(world.getBlockState(pos.offset(facing.getOpposite())).getBlock() instanceof BlockDecorStraightPole) {
|
||||
state = state.withProperty(FACING, state.getValue(FACING).getOpposite());
|
||||
|
|
|
@ -78,7 +78,6 @@ public class BlockDecorWall extends BlockDecor
|
|||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
|
||||
{ return AABB_BY_INDEX[getAABBIndex(getActualState(state, source, pos))]; }
|
||||
|
||||
|
@ -89,7 +88,6 @@ public class BlockDecorWall extends BlockDecor
|
|||
|
||||
@Nullable
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public AxisAlignedBB getCollisionBoundingBox(IBlockState state, IBlockAccess world, BlockPos pos)
|
||||
{ return CLIP_AABB_BY_INDEX[getAABBIndex(getActualState(state, world, pos))]; }
|
||||
|
||||
|
@ -101,22 +99,18 @@ public class BlockDecorWall extends BlockDecor
|
|||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean isFullCube(IBlockState state)
|
||||
{ return false; }
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean isPassable(IBlockAccess world, BlockPos pos)
|
||||
{ return false; }
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean isOpaqueCube(IBlockState state)
|
||||
{ return false; }
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean isNormalCube(IBlockState state)
|
||||
{ return false; }
|
||||
|
||||
|
@ -143,23 +137,19 @@ public class BlockDecorWall extends BlockDecor
|
|||
{ return Block.isExceptBlockForAttachWithPiston(b) || (b==Blocks.BARRIER) || (b==Blocks.MELON_BLOCK) || (b==Blocks.PUMPKIN) || (b==Blocks.LIT_PUMPKIN); }
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
|
||||
{ return (side!=EnumFacing.DOWN) || (super.shouldSideBeRendered(blockState, blockAccess, pos, side)); }
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public IBlockState getStateFromMeta(int meta)
|
||||
{ return getDefaultState(); }
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public int getMetaFromState(IBlockState state)
|
||||
{ return 0; }
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public IBlockState getActualState(IBlockState state, IBlockAccess world, BlockPos pos)
|
||||
{
|
||||
boolean n = canWallConnectTo(world, pos, EnumFacing.NORTH);
|
||||
|
@ -176,7 +166,6 @@ public class BlockDecorWall extends BlockDecor
|
|||
{ return new BlockStateContainer(this, new IProperty[] {UP, NORTH, EAST, WEST, SOUTH, TEXTURE_VARIANT}); }
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public BlockFaceShape getBlockFaceShape(IBlockAccess world, IBlockState state, BlockPos pos, EnumFacing face)
|
||||
{ return (face==EnumFacing.UP) ? (BlockFaceShape.SOLID) : ((face!=EnumFacing.DOWN) ? (BlockFaceShape.MIDDLE_POLE_THICK) : (BlockFaceShape.CENTER_BIG)); }
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ public class ModBlocks
|
|||
|
||||
public static final BlockDecorCraftingTable TREATED_WOOD_CRAFTING_TABLE = new BlockDecorCraftingTable(
|
||||
"treated_wood_crafting_table",
|
||||
BlockDecor.CFG_CUTOUT|BlockDecor.CFG_HORIZIONTAL|BlockDecor.CFG_LOOK_PLACEMENT,
|
||||
BlockDecor.CFG_CUTOUT|BlockDecor.CFG_HORIZIONTAL|BlockDecor.CFG_LOOK_PLACEMENT|BlockDecor.CFG_OPPOSITE_PLACEMENT,
|
||||
Material.WOOD, 1.0f, 15f, SoundType.WOOD,
|
||||
ModAuxiliaries.getPixeledAABB(1,0,1, 15,15.9,15)
|
||||
);
|
||||
|
@ -162,7 +162,7 @@ public class ModBlocks
|
|||
|
||||
public static final BlockDecorFurnace SMALL_LAB_FURNACE = new BlockDecorFurnace(
|
||||
"small_lab_furnace",
|
||||
BlockDecor.CFG_CUTOUT|BlockDecor.CFG_HORIZIONTAL|BlockDecor.CFG_LOOK_PLACEMENT,
|
||||
BlockDecor.CFG_CUTOUT|BlockDecor.CFG_HORIZIONTAL|BlockDecor.CFG_LOOK_PLACEMENT|BlockDecor.CFG_OPPOSITE_PLACEMENT,
|
||||
Material.IRON, 1.0f, 15f, SoundType.METAL,
|
||||
ModAuxiliaries.getPixeledAABB(1,0,1, 15,15,16.0)
|
||||
);
|
||||
|
@ -183,25 +183,36 @@ public class ModBlocks
|
|||
|
||||
public static final BlockDecorPipeValve STRAIGHT_CHECK_VALVE = new BlockDecorPipeValve(
|
||||
"straight_pipe_valve",
|
||||
BlockDecor.CFG_CUTOUT|BlockDecor.CFG_FACING_PLACEMENT,
|
||||
BlockDecor.CFG_FACING_PLACEMENT|BlockDecor.CFG_OPPOSITE_PLACEMENT|BlockDecor.CFG_FLIP_PLACEMENT_SHIFTCLICK|
|
||||
BlockDecor.CFG_CUTOUT,
|
||||
Material.IRON, 0.5f, 15f, SoundType.METAL,
|
||||
ModAuxiliaries.getPixeledAABB(4,4,0, 12,12,16)
|
||||
);
|
||||
|
||||
public static final BlockDecorPipeValve STRAIGHT_REDSTONE_VALVE = new BlockDecorPipeValve(
|
||||
"straight_pipe_valve_redstone",
|
||||
BlockDecor.CFG_FACING_PLACEMENT|BlockDecor.CFG_REDSTONE_CONTROLLED,
|
||||
BlockDecor.CFG_FACING_PLACEMENT|BlockDecor.CFG_OPPOSITE_PLACEMENT|BlockDecor.CFG_FLIP_PLACEMENT_SHIFTCLICK|
|
||||
BlockDecor.CFG_CUTOUT|BlockDecor.CFG_REDSTONE_CONTROLLED,
|
||||
Material.IRON, 0.5f, 15f, SoundType.METAL,
|
||||
ModAuxiliaries.getPixeledAABB(4,4,0, 12,12,16)
|
||||
);
|
||||
|
||||
public static final BlockDecorPipeValve STRAIGHT_REDSTONE_ANALOG_VALVE = new BlockDecorPipeValve(
|
||||
"straight_pipe_valve_redstone_analog",
|
||||
BlockDecor.CFG_FACING_PLACEMENT|BlockDecor.CFG_REDSTONE_CONTROLLED|BlockDecor.CFG_ANALOG,
|
||||
BlockDecor.CFG_FACING_PLACEMENT|BlockDecor.CFG_OPPOSITE_PLACEMENT|BlockDecor.CFG_FLIP_PLACEMENT_SHIFTCLICK|
|
||||
BlockDecor.CFG_CUTOUT|BlockDecor.CFG_REDSTONE_CONTROLLED|BlockDecor.CFG_ANALOG,
|
||||
Material.IRON, 0.5f, 15f, SoundType.METAL,
|
||||
ModAuxiliaries.getPixeledAABB(4,4,0, 12,12,16)
|
||||
);
|
||||
|
||||
public static final BlockDecorPassiveFluidAccumulator PASSIVE_FLUID_ACCUMULATOR = new BlockDecorPassiveFluidAccumulator(
|
||||
"passive_fluid_accumulator",
|
||||
BlockDecor.CFG_FACING_PLACEMENT|BlockDecor.CFG_OPPOSITE_PLACEMENT|BlockDecor.CFG_FLIP_PLACEMENT_SHIFTCLICK|
|
||||
BlockDecor.CFG_CUTOUT,
|
||||
Material.IRON, 0.5f, 15f, SoundType.METAL,
|
||||
ModAuxiliaries.getPixeledAABB(0,0,0, 16,16,16)
|
||||
);
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
//-- Tile entities
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -222,6 +233,9 @@ public class ModBlocks
|
|||
private static final TileEntityRegistrationData STRAIGHT_PIPE_VALVE_TEI = new TileEntityRegistrationData(
|
||||
BlockDecorPipeValve.BTileEntity.class, "te_pipe_valve"
|
||||
);
|
||||
private static final TileEntityRegistrationData PASSIVE_FLUID_ACCUMULATOR_TEI = new TileEntityRegistrationData(
|
||||
BlockDecorPassiveFluidAccumulator.BTileEntity.class, "te_passive_fluid_accumulator"
|
||||
);
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
//-- Registration list
|
||||
|
@ -264,7 +278,9 @@ public class ModBlocks
|
|||
STRAIGHT_CHECK_VALVE, STRAIGHT_REDSTONE_VALVE, STRAIGHT_REDSTONE_ANALOG_VALVE, STRAIGHT_PIPE_VALVE_TEI
|
||||
};
|
||||
|
||||
private static final Object dev_content[] = {};
|
||||
private static final Object dev_content[] = {
|
||||
PASSIVE_FLUID_ACCUMULATOR, PASSIVE_FLUID_ACCUMULATOR_TEI
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
//-- Init
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"forge_marker": 1,
|
||||
"defaults": {
|
||||
"model": "engineersdecor:decor_full_block_model",
|
||||
"model": "engineersdecor:std/decor_full_block_model",
|
||||
"textures": { "all": "engineersdecor:blocks/clinker_brick/clinker_brick_texture0" }
|
||||
},
|
||||
"variants": {
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"forge_marker": 1,
|
||||
"defaults": {
|
||||
"model": "engineersdecor:pipe/passive_fluid_accumulator_model"
|
||||
},
|
||||
"variants": {
|
||||
"normal": [{}],
|
||||
"inventory": [{}],
|
||||
"facing": { "north":{"y":0}, "south":{"y":180}, "west":{"y":270}, "east":{"y":90}, "up": {"x":-90}, "down": {"x":90} }
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"forge_marker": 1,
|
||||
"defaults": {
|
||||
"model": "engineersdecor:decor_full_block_model",
|
||||
"model": "engineersdecor:std/decor_full_block_model",
|
||||
"textures": { "all": "engineersdecor:blocks/concrete/rebar_concrete_texture0" }
|
||||
},
|
||||
"variants": {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"forge_marker": 1,
|
||||
"defaults": {
|
||||
"model": "engineersdecor:decor_full_block_model",
|
||||
"model": "engineersdecor:std/decor_full_block_model",
|
||||
"textures": { "all": "engineersdecor:blocks/concrete/rebar_concrete_tile_texture0" }
|
||||
},
|
||||
"variants": {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"forge_marker": 1,
|
||||
"defaults": {
|
||||
"model": "engineersdecor:decor_full_block_model",
|
||||
"model": "engineersdecor:std/decor_full_block_model",
|
||||
"textures": { "all": "engineersdecor:blocks/slag_brick/slag_brick_texture0" }
|
||||
},
|
||||
"variants": {
|
||||
|
|
|
@ -106,6 +106,9 @@ tile.engineersdecor.straight_pipe_valve_redstone_analog.help=§6Straight fluid p
|
|||
Does not connect to the sides. Sneak to place in reverse direction. \
|
||||
Blocks if not redstone powered, reduces the flow rate linear from power 1 to 14, \
|
||||
opens to maximum possible valve flow rate for power 15.
|
||||
tile.engineersdecor.passive_fluid_accumulator.name=Passive fluid accumulator
|
||||
tile.engineersdecor.passive_fluid_accumulator.help=§6Vacuum suction based fluid collector.§r Has one output, all other sides are input. \
|
||||
Drains fluids from adjacent tanks when being drained from the output port by a pump.
|
||||
#-----------------------------------------------------------------------------------------------------------
|
||||
tile.engineersdecor.sign_decor.name=Sign plate (Engineer's decor)
|
||||
tile.engineersdecor.sign_decor.help=§6This should not be craftable or visible in JEI. Used for creative tab and screenshots.
|
||||
|
|
|
@ -99,6 +99,9 @@ tile.engineersdecor.straight_pipe_valve_redstone_analog.name=Redstone analog flu
|
|||
Does not connect to the sides. Sneak to place in reverse direction. \
|
||||
Blocks if not redstone powered, reduces the flow rate linear from power 1 to 14, \
|
||||
opens to maximum possible valve flow rate for power 15.
|
||||
tile.engineersdecor.passive_fluid_accumulator.name=Passive fluid accumulator
|
||||
#tile.engineersdecor.passive_fluid_accumulator.help=§6Vacuum suction based fluid collector.§r Has one output, all other sides are input. \
|
||||
Drains fluids from adjacent tanks when being drained from the output port by a pump.
|
||||
#-----------------------------------------------------------------------------------------------------------
|
||||
tile.engineersdecor.sign_decor.name=Sign plate (Engineer's decor logo)
|
||||
#tile.engineersdecor.sign_decor.help=§6This should not be craftable or visible in JEI. Used for creative tab and screenshots.
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
{ "parent": "block/cube_all", "textures": { "all": "engineersdecor:blocks/clinker_brick/clinker_brick_texture0" } }
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"textures": {
|
||||
"end": "engineersdecor:blocks/pipe/straight_pipe_valve_end_texture",
|
||||
"particle": "engineersdecor:blocks/pipe/straight_pipe_valve_end_texture",
|
||||
"side": "engineersdecor:blocks/pipe/straight_pipe_valve_side_texture"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [2, 2, 0],
|
||||
"to": [14, 14, 1],
|
||||
"faces": {
|
||||
"north": {"uv": [2, 2, 14, 14], "texture": "#end"},
|
||||
"east": {"uv": [2, 0, 14, 1], "rotation": 90, "texture": "#side"},
|
||||
"south": {"uv": [2, 2, 14, 14], "texture": "#end"},
|
||||
"west": {"uv": [2, 0, 14, 1], "rotation": 270, "texture": "#side"},
|
||||
"up": {"uv": [2, 0, 14, 1], "texture": "#side"},
|
||||
"down": {"uv": [2, 15, 14, 16], "texture": "#side"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 0, 1],
|
||||
"to": [16, 16, 16],
|
||||
"faces": {
|
||||
"north": {"uv": [4, 4, 12, 12], "texture": "#end"},
|
||||
"east": {"uv": [3, 5, 13, 11], "rotation": 90, "texture": "#side"},
|
||||
"south": {"uv": [4, 4, 12, 12], "texture": "#end"},
|
||||
"west": {"uv": [3, 5, 13, 11], "rotation": 270, "texture": "#side"},
|
||||
"up": {"uv": [3, 5, 13, 11], "texture": "#side"},
|
||||
"down": {"uv": [3, 5, 13, 11], "rotation": 180, "texture": "#side"}
|
||||
}
|
||||
}
|
||||
],
|
||||
"display": {
|
||||
"thirdperson_righthand": {
|
||||
"rotation": [120, 15, 0],
|
||||
"translation": [-1, -1, -2],
|
||||
"scale": [0.4, 0.4, 0.4]
|
||||
},
|
||||
"firstperson_righthand": {
|
||||
"rotation": [120, 30, 0],
|
||||
"translation": [2, 3, 0],
|
||||
"scale": [0.4, 0.4, 0.4]
|
||||
},
|
||||
"ground": {
|
||||
"scale": [0.2, 0.2, 0.2]
|
||||
},
|
||||
"gui": {
|
||||
"rotation": [30, 225, 0],
|
||||
"scale": [0.625, 0.625, 0.625]
|
||||
},
|
||||
"fixed": {
|
||||
"scale": [0.5, 0.5, 0.5]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"parent": "block/cube_all",
|
||||
"textures": { "all": "engineersdecor:blocks/clinker_brick/clinker_brick_texture0" }
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"conditions": [
|
||||
{
|
||||
"type": "engineersdecor:grc",
|
||||
"result": "engineersdecor:passive_fluid_accumulator",
|
||||
"required": ["immersiveengineering:material"]
|
||||
}
|
||||
],
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"SPS",
|
||||
"PMP",
|
||||
"SPS"
|
||||
],
|
||||
"key": {
|
||||
"P": {
|
||||
"item": "#itemFluidPipe"
|
||||
},
|
||||
"M": {
|
||||
"item": "#anyMechanicalComponent"
|
||||
},
|
||||
"S": {
|
||||
"item": "#slabSheetmetalIron"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "engineersdecor:passive_fluid_accumulator",
|
||||
"count": 1
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue