Milking machine added. Window placement improved. Pipe valve textures adapted. 1.14: Pipe valve early load replaced with lazy init (issue #69). Mineral Smelter gravity fluid transfer added.
This commit is contained in:
parent
01ca043d41
commit
6dacc0922d
31 changed files with 709 additions and 249 deletions
|
@ -12,12 +12,11 @@
|
|||
*/
|
||||
package wile.engineersdecor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import wile.engineersdecor.blocks.*;
|
||||
import wile.engineersdecor.detail.ModAuxiliaries;
|
||||
import wile.engineersdecor.detail.ModConfig;
|
||||
import wile.engineersdecor.detail.ModTesrs;
|
||||
import wile.engineersdecor.items.ItemDecor;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -32,11 +31,11 @@ import net.minecraftforge.fml.client.registry.ClientRegistry;
|
|||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import wile.engineersdecor.blocks.*;
|
||||
import wile.engineersdecor.detail.ModAuxiliaries;
|
||||
import wile.engineersdecor.detail.ModConfig;
|
||||
import wile.engineersdecor.detail.ModTesrs;
|
||||
import wile.engineersdecor.items.ItemDecor;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class ModContent
|
||||
|
@ -545,6 +544,7 @@ public class ModContent
|
|||
STRAIGHT_CHECK_VALVE, STRAIGHT_REDSTONE_VALVE, STRAIGHT_REDSTONE_ANALOG_VALVE, STRAIGHT_PIPE_VALVE_TEI,
|
||||
SMALL_FLUID_FUNNEL,SMALL_FLUID_FUNNEL_TEI,
|
||||
PASSIVE_FLUID_ACCUMULATOR, PASSIVE_FLUID_ACCUMULATOR_TEI,
|
||||
SMALL_MILKING_MACHINE,SMALL_MILKING_MACHINE_TEI,
|
||||
CLINKER_BRICK_BLOCK,
|
||||
CLINKER_BRICK_SLAB,
|
||||
CLINKER_BRICK_STAIRS,
|
||||
|
@ -603,7 +603,6 @@ public class ModContent
|
|||
PANZERGLASS_SLAB, // @todo: check if another class is needed due to is_side_visible
|
||||
TREATED_WOOD_FLOOR, // @todo: check if textures need improvement
|
||||
TEST_BLOCK,TEST_BLOCK_TEI,
|
||||
SMALL_MILKING_MACHINE,SMALL_MILKING_MACHINE_TEI
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -11,11 +11,14 @@ package wile.engineersdecor.blocks;
|
|||
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.BlockRenderLayer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import javax.annotation.Nonnull;
|
||||
|
@ -23,7 +26,6 @@ import javax.annotation.Nullable;
|
|||
|
||||
public class BlockDecorWindow extends BlockDecorDirected
|
||||
{
|
||||
|
||||
public BlockDecorWindow(@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); }
|
||||
|
||||
|
@ -58,4 +60,22 @@ public class BlockDecorWindow extends BlockDecorDirected
|
|||
public boolean doesSideBlockRendering(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing face)
|
||||
{ return false; }
|
||||
|
||||
@Override
|
||||
public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer, EnumHand hand)
|
||||
{
|
||||
facing = placer.getHorizontalFacing();
|
||||
if(Math.abs(placer.getLookVec().y) > 0.9) {
|
||||
facing = EnumFacing.getDirectionFromEntityLiving(pos, placer);
|
||||
} else {
|
||||
for(EnumFacing f: EnumFacing.values()) {
|
||||
IBlockState st = world.getBlockState(pos.offset(f));
|
||||
if(st.getBlock() == this) {
|
||||
facing = st.getValue(FACING);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return getDefaultState().withProperty(FACING, facing);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue