Steel mesh fence added, Broad Windowsill added, Tree Cutter can chop DyncmicTrees (issue #52).

This commit is contained in:
stfwi 2019-10-05 14:13:08 +02:00
parent 1eeaa1229e
commit 1b0a84ae7f
119 changed files with 3399 additions and 133 deletions

View file

@ -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.13-b1
version_engineersdecor=1.0.13-b2

View file

@ -1,7 +1,8 @@
{
"homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/",
"1.12.2": {
"1.0.13-b1": "[A] Small Solar Panel added.\n[A] Small Tree Cutter added.",
"1.0.13-b2": "[A] Added Steel Mesh Fence.\n[A] Added Broad Window Sill.\n[A] Small Tree Cutter can chop Dynamic Trees, chops at tree trunk radius 7 or higher.",
"1.0.13-b1": "[A] Added Small Solar Panel.\n[A] Added Small Tree Cutter.",
"1.0.12": "[R] Release based on v1.0.12-b2. Release-to-release changes: * Crafting table: Recipe collision resolver added. Items are rendered on the table surface. * Small Mineral Smelter released. * Factory Dropper: Continuous dropping mode added. * Block opacity fixes, window model fixes. * Lang file updates.",
"1.0.12-b2": "[A] Crafting Table: Added recipe collision resolver, also applies to crafting history refabrication.\n[A] Crafting Table: Added rendering of placed items on the top surface of the table.\n[M] Lang files updated.",
"1.0.12-b1": "[A] Mineal Smelter non-experimental now.\n[M] Window submodels stripped (reopened issue #19, thx overchoice).\n[M] Opaque full block light opacity fixed (issue #50, thx Illomiurge).\n[M] Factory Dropper: Added pulse/continuous mode in GUI (issue #51, thx Aristine for the CR).",
@ -59,6 +60,6 @@
},
"promos": {
"1.12.2-recommended": "1.0.12",
"1.12.2-latest": "1.0.13-b1"
"1.12.2-latest": "1.0.13-b2"
}
}

View file

@ -10,8 +10,13 @@ Mod sources for Minecraft version 1.12.2.
----
## Version history
- v1.0.13-b1 [A] Small Solar Panel added.
[A] Small Tree Cutter added.
- v1.0.13-b2 [A] Added Steel Mesh Fence.
[A] Added Broad Window Sill.
[A] Small Tree Cutter can chop Dynamic Trees,
chops at tree trunk radius 7 or higher.
- v1.0.13-b1 [A] Added Small Solar Panel.
[A] Added Small Tree Cutter.
-------------------------------------------------------------------
- v1.0.12 [R] Release based on v1.0.12-b2. Release-to-release changes:

View file

@ -26,7 +26,6 @@ import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.fml.client.registry.ClientRegistry;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@ -229,6 +228,13 @@ public class ModContent
//--------------------------------------------------------------------------------------------------------------------
public static final BlockDecorFence STEEL_MESH_FENCE = new BlockDecorFence(
"steel_mesh_fence",
BlockDecor.CFG_DEFAULT, Material.IRON, 2f, 15f, SoundType.METAL
);
//--------------------------------------------------------------------------------------------------------------------
public static final BlockDecor TREATED_WOOD_TABLE = new BlockDecor(
"treated_wood_table",
BlockDecor.CFG_CUTOUT|BlockDecor.CFG_HORIZIONTAL|BlockDecor.CFG_LOOK_PLACEMENT,
@ -250,13 +256,20 @@ public class ModContent
ModAuxiliaries.getPixeledAABB(2,0,2, 14,15.9,14)
);
public static final BlockDecorDirected TREATED_WOOD_WINDOWSILL = new BlockDecorDirected(
public static final BlockDecorWindowSill TREATED_WOOD_WINDOWSILL = new BlockDecorWindowSill(
"treated_wood_windowsill",
BlockDecor.CFG_CUTOUT|BlockDecor.CFG_HORIZIONTAL|BlockDecor.CFG_FACING_PLACEMENT,
Material.WOOD, 1.0f, 10f, SoundType.WOOD,
ModAuxiliaries.getPixeledAABB(0.5,15,10.5, 15.5,16,16)
);
public static final BlockDecorWindowSill TREATED_WOOD_BROAD_WINDOWSILL = new BlockDecorWindowSill(
"treated_wood_broad_windowsill",
BlockDecor.CFG_CUTOUT|BlockDecor.CFG_HORIZIONTAL|BlockDecor.CFG_FACING_PLACEMENT,
Material.WOOD, 1.0f, 10f, SoundType.WOOD,
ModAuxiliaries.getPixeledAABB(0,14.5,4, 16,16,16)
);
public static final BlockDecorDirected INSET_LIGHT_IRON = new BlockDecorDirected(
"iron_inset_light",
BlockDecor.CFG_CUTOUT|BlockDecor.CFG_OPPOSITE_PLACEMENT|(14<<BlockDecor.CFG_LIGHT_VALUE_SHIFT),
@ -491,6 +504,7 @@ public class ModContent
TREATED_WOOD_WINDOW,
STEEL_FRAMED_WINDOW,
TREATED_WOOD_WINDOWSILL,
TREATED_WOOD_BROAD_WINDOWSILL,
INSET_LIGHT_IRON,
TREATED_WOOD_POLE_SUPPORT,
TREATED_WOOD_POLE_HEAD,
@ -500,6 +514,7 @@ public class ModContent
THICK_STEEL_POLE_HEAD,
STEEL_DOUBLE_T_SUPPORT,
STEEL_FLOOR_GRATING,
STEEL_MESH_FENCE,
SIGN_HOTWIRE, SIGN_DANGER, SIGN_DEFENSE, SIGN_FACTORY_AREA, SIGN_EXIT, SIGN_MODLOGO,
TREATED_WOOD_SIDE_TABLE,
HALFSLAB_REBARCONCRETE, HALFSLAB_CONCRETE, HALFSLAB_TREATEDWOOD,
@ -563,7 +578,7 @@ public class ModContent
public static final void registerBlocks(RegistryEvent.Register<Block> event)
{
// Config based registry selection
final boolean ie_installed = Loader.isModLoaded("immersiveengineering");
final boolean ie_installed = ModAuxiliaries.isModLoaded("immersiveengineering");
int num_block_registrations_skipped = 0;
int num_block_registrations_skipped_noie = 0;
final boolean woor = ModConfig.isWithoutOptOutRegistration();

View file

@ -116,6 +116,7 @@ public class ModEngineersDecor
if(RecipeCondModSpecific.num_skipped > 0) logger.info("Excluded " + RecipeCondModSpecific.num_skipped + " recipes due to config opt-out.");
if(ModConfig.zmisc.with_experimental) logger.info("Included experimental features due to mod config.");
ExtItems.onPostInit();
TreeCutting.reload();
}
@Mod.EventBusSubscriber

View file

@ -0,0 +1,75 @@
/*
* @file BlockDecorFence.java
* @author Stefan Wilhelm (wile)
* @copyright (C) 2019 Stefan Wilhelm
* @license MIT (see https://opensource.org/licenses/MIT)
*
* Fence blocks.
*/
package wile.engineersdecor.blocks;
import net.minecraft.block.*;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.state.BlockFaceShape;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.Entity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.List;
public class BlockDecorFence extends BlockDecorWall
{
protected static final AxisAlignedBB[] AABB_BY_INDEX = mkAABBs (1.5d, 0.5d, 16d);
protected static final AxisAlignedBB[] CLIP_AABB_BY_INDEX = mkAABBs (1.5d, 0.5d, 24d);
protected static final AxisAlignedBB[][] AABB_LIST_BY_INDEX = mkCAABBs(1.5d, 0.5d, 16d);
protected static final AxisAlignedBB[][] CLIP_AABB_LIST_BY_INDEX = mkCAABBs(1.5d, 0.5d, 24d);
public BlockDecorFence(@Nonnull String registryName, long config, @Nullable Material material, float hardness, float resistance, @Nullable SoundType sound)
{
super(registryName, config, material, hardness, resistance, sound);
setDefaultState(blockState.getBaseState().withProperty(UP, false).withProperty(NORTH, false).withProperty(EAST, false).withProperty(SOUTH, false).withProperty(WEST, false));
}
@Override
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
{ return AABB_BY_INDEX[getAABBIndex(getActualState(state, source, pos))]; }
@Override
@SuppressWarnings("deprecation")
public void addCollisionBoxToList(IBlockState state, World world, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, @Nullable Entity entityIn, boolean isActualState)
{
final AxisAlignedBB[] bbs = CLIP_AABB_LIST_BY_INDEX[getAABBIndex(isActualState ? state : getActualState(state, world, pos))];
for(int i=0; i<bbs.length;++i) addCollisionBoxToList(pos, entityBox, collidingBoxes, bbs[i]);
}
@Override
public AxisAlignedBB getCollisionBoundingBox(IBlockState state, IBlockAccess world, BlockPos pos)
{ return CLIP_AABB_BY_INDEX[getAABBIndex(getActualState(state, world, pos))]; }
@Override
public BlockFaceShape getBlockFaceShape(IBlockAccess world, IBlockState state, BlockPos pos, EnumFacing face)
{ return (face==EnumFacing.UP) ? (BlockFaceShape.SOLID) : ((face!=EnumFacing.DOWN) ? (BlockFaceShape.MIDDLE_POLE_THIN) : (BlockFaceShape.CENTER_SMALL)); }
@Override
protected BlockStateContainer createBlockState()
{ return new BlockStateContainer(this, new IProperty[] {UP, NORTH, EAST, WEST, SOUTH}); }
@Override
public IBlockState getActualState(IBlockState state, IBlockAccess world, BlockPos pos)
{
boolean n = canWallConnectTo(world, pos, EnumFacing.NORTH);
boolean e = canWallConnectTo(world, pos, EnumFacing.EAST);
boolean s = canWallConnectTo(world, pos, EnumFacing.SOUTH);
boolean w = canWallConnectTo(world, pos, EnumFacing.WEST);
boolean nopole = (n && s && !e && !w) || (!n && !s && e && w);
return state.withProperty(UP,!nopole).withProperty(NORTH, n).withProperty(EAST, e).withProperty(SOUTH, s).withProperty(WEST, w);
}
}

View file

@ -8,6 +8,7 @@
*/
package wile.engineersdecor.blocks;
import wile.engineersdecor.detail.ModAuxiliaries;
import net.minecraft.block.*;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
@ -18,6 +19,7 @@ import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.Entity;
import net.minecraft.init.Blocks;
import net.minecraft.pathfinding.PathNodeType;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
@ -25,6 +27,7 @@ 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;
import javax.annotation.Nullable;
import java.util.List;
@ -44,32 +47,72 @@ public class BlockDecorWall extends BlockDecor
public static final PropertyBool WEST = BlockWall.WEST;
public static final PropertyInteger TEXTURE_VARIANT = PropertyInteger.create("tvariant", 0, 7);
private static final double d_0 = 0.0d;
private static final double d_1 = 1.0d;
private static final double d_a = 0.25d;
private static final double d_b = 1.0d-d_a;
private static final double d_k = 0.26d; // 0.3125D;
private static final double d_l = 1.0d-d_k;
protected static final AxisAlignedBB[] AABB_BY_INDEX = new AxisAlignedBB[] {
new AxisAlignedBB(d_a, d_0, d_a, d_b, d_1, d_b),
new AxisAlignedBB(d_a, d_0, d_a, d_b, d_1, d_1),
new AxisAlignedBB(d_0, d_0, d_a, d_b, d_1, d_b),
new AxisAlignedBB(d_0, d_0, d_a, d_b, d_1, d_1),
new AxisAlignedBB(d_a, d_0, d_0, d_b, d_1, d_b),
new AxisAlignedBB(d_k, d_0, d_0, d_l, d_1, d_1),
new AxisAlignedBB(d_0, d_0, d_0, d_b, d_1, d_b),
new AxisAlignedBB(d_0, d_0, d_0, d_b, d_1, d_1),
new AxisAlignedBB(d_a, d_0, d_a, d_1, d_1, d_b),
new AxisAlignedBB(d_a, d_0, d_a, d_1, d_1, d_1),
new AxisAlignedBB(d_0, d_0, d_k, d_1, d_1, d_l),
new AxisAlignedBB(d_0, d_0, d_a, d_1, d_1, d_1),
new AxisAlignedBB(d_a, d_0, d_0, d_1, d_1, d_b),
new AxisAlignedBB(d_a, d_0, d_0, d_1, d_1, d_1),
new AxisAlignedBB(d_0, d_0, d_0, d_1, d_1, d_b),
new AxisAlignedBB(d_0, d_0, d_0, d_1, d_1, d_1)
};
private static final double clip_height = 1.8d;
protected static final AxisAlignedBB[] CLIP_AABB_BY_INDEX = new AxisAlignedBB[] { AABB_BY_INDEX[0].setMaxY(clip_height), AABB_BY_INDEX[1].setMaxY(clip_height), AABB_BY_INDEX[2].setMaxY(clip_height), AABB_BY_INDEX[3].setMaxY(clip_height), AABB_BY_INDEX[4].setMaxY(clip_height), AABB_BY_INDEX[5].setMaxY(clip_height), AABB_BY_INDEX[6].setMaxY(clip_height), AABB_BY_INDEX[7].setMaxY(clip_height), AABB_BY_INDEX[8].setMaxY(clip_height), AABB_BY_INDEX[9].setMaxY(clip_height), AABB_BY_INDEX[10].setMaxY(clip_height), AABB_BY_INDEX[11].setMaxY(clip_height), AABB_BY_INDEX[12].setMaxY(clip_height), AABB_BY_INDEX[13].setMaxY(clip_height), AABB_BY_INDEX[14].setMaxY(clip_height), AABB_BY_INDEX[15].setMaxY(clip_height) };
protected static final AxisAlignedBB[] mkAABBs(double pole_thickness_px, double wall_thickness_px, double height_px)
{
final double d_0 = 0.0d;
final double d_1 = 16.0d;
final double d_a = (8d-pole_thickness_px);
final double d_b = 16.0d-d_a;
final double d_k = (8d-wall_thickness_px);
final double d_l = 16.0d-d_k;
return new AxisAlignedBB[] { // ENWS P
ModAuxiliaries.getPixeledAABB(d_a, d_0, d_a, d_b, height_px, d_b), // 0000 1
ModAuxiliaries.getPixeledAABB(d_a, d_0, d_a, d_b, height_px, d_1), // 0001 1
ModAuxiliaries.getPixeledAABB(d_0, d_0, d_a, d_b, height_px, d_b), // 0010 1
ModAuxiliaries.getPixeledAABB(d_0, d_0, d_a, d_b, height_px, d_1), // 0011 1
ModAuxiliaries.getPixeledAABB(d_a, d_0, d_0, d_b, height_px, d_b), // 0100 1
ModAuxiliaries.getPixeledAABB(d_k, d_0, d_0, d_l, height_px, d_1), // 0101 0
ModAuxiliaries.getPixeledAABB(d_0, d_0, d_0, d_b, height_px, d_b), // 0110 1
ModAuxiliaries.getPixeledAABB(d_0, d_0, d_0, d_b, height_px, d_1), // 0111 1
ModAuxiliaries.getPixeledAABB(d_a, d_0, d_a, d_1, height_px, d_b), // 1000 1
ModAuxiliaries.getPixeledAABB(d_a, d_0, d_a, d_1, height_px, d_1), // 1001 1
ModAuxiliaries.getPixeledAABB(d_0, d_0, d_k, d_1, height_px, d_l), // 1010 0
ModAuxiliaries.getPixeledAABB(d_0, d_0, d_a, d_1, height_px, d_1), // 1011 1
ModAuxiliaries.getPixeledAABB(d_a, d_0, d_0, d_1, height_px, d_b), // 1100 1
ModAuxiliaries.getPixeledAABB(d_a, d_0, d_0, d_1, height_px, d_1), // 1101 1
ModAuxiliaries.getPixeledAABB(d_0, d_0, d_0, d_1, height_px, d_b), // 1110 1
ModAuxiliaries.getPixeledAABB(d_0, d_0, d_0, d_1, height_px, d_1) // 1111 1
};
}
protected static final AxisAlignedBB[][] mkCAABBs(double pole_thickness_px, double wall_thickness_px, double height_px)
{
final double d_0 = 0.0d;
final double d_1 = 16.0d;
final double d_a = (8d-pole_thickness_px);
final double d_b = 16.0d-d_a;
final double d_k = (8d-wall_thickness_px);
final double d_l = 16.0d-d_k;
final AxisAlignedBB bb_p = ModAuxiliaries.getPixeledAABB(d_a, d_0, d_a, d_b, height_px, d_b); // 0000
final AxisAlignedBB bb_s = ModAuxiliaries.getPixeledAABB(d_k, d_0, d_k, d_l, height_px, d_1); // 0001
final AxisAlignedBB bb_w = ModAuxiliaries.getPixeledAABB(d_0, d_0, d_k, d_l, height_px, d_l); // 0010
final AxisAlignedBB bb_n = ModAuxiliaries.getPixeledAABB(d_k, d_0, d_0, d_l, height_px, d_l); // 0100
final AxisAlignedBB bb_e = ModAuxiliaries.getPixeledAABB(d_k, d_0, d_k, d_1, height_px, d_l); // 1000
return new AxisAlignedBB[][] { // ENWS P
new AxisAlignedBB[]{ bb_p }, // 0000 1
new AxisAlignedBB[]{ bb_s }, // 0001 1
new AxisAlignedBB[]{ bb_w }, // 0010 1
new AxisAlignedBB[]{ bb_s,bb_w }, // 0011 1
new AxisAlignedBB[]{ bb_n }, // 0100 1
new AxisAlignedBB[]{ bb_n,bb_s }, // 0101 0
new AxisAlignedBB[]{ bb_n,bb_w }, // 0110 1
new AxisAlignedBB[]{ bb_n,bb_w,bb_s }, // 0111 1
new AxisAlignedBB[]{ bb_e }, // 1000 1
new AxisAlignedBB[]{ bb_e,bb_s }, // 1001 1
new AxisAlignedBB[]{ bb_e,bb_w }, // 1010 0
new AxisAlignedBB[]{ bb_e,bb_w,bb_s }, // 1011 1
new AxisAlignedBB[]{ bb_e,bb_n }, // 1100 1
new AxisAlignedBB[]{ bb_e,bb_n,bb_s }, // 1101 1
new AxisAlignedBB[]{ bb_e,bb_n,bb_w }, // 1110 1
new AxisAlignedBB[]{ bb_e,bb_n,bb_w,bb_s } // 1111 1
};
}
protected static final AxisAlignedBB[] AABB_BY_INDEX = mkAABBs(4d, 3.84, 16d);
protected static final AxisAlignedBB[] CLIP_AABB_BY_INDEX = mkAABBs(4d, 3.84, 24d);
protected static final AxisAlignedBB[][] AABB_LIST_BY_INDEX = mkCAABBs(4d, 3.84, 16d);
protected static final AxisAlignedBB[][] CLIP_AABB_LIST_BY_INDEX = mkCAABBs(4d, 3.84, 24d);
protected static final AxisAlignedBB SELECTION_AABB = ModAuxiliaries.getPixeledAABB(0, 0, 0, 0.01, 0.01, 0.01);
public BlockDecorWall(@Nonnull String registryName, long config, @Nullable Material material, float hardness, float resistance, @Nullable SoundType sound)
{
@ -84,18 +127,27 @@ public class BlockDecorWall extends BlockDecor
@Override
@SuppressWarnings("deprecation")
public void addCollisionBoxToList(IBlockState state, World world, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, @Nullable Entity entityIn, boolean isActualState)
{ addCollisionBoxToList(pos, entityBox, collidingBoxes, CLIP_AABB_BY_INDEX[getAABBIndex(isActualState ? state : getActualState(state, world, pos))]); }
{
final AxisAlignedBB[] bbs = CLIP_AABB_LIST_BY_INDEX[getAABBIndex(isActualState ? state : getActualState(state, world, pos))];
for(int i=0; i<bbs.length;++i) addCollisionBoxToList(pos, entityBox, collidingBoxes, bbs[i]);
}
@Nullable
@Override
public AxisAlignedBB getCollisionBoundingBox(IBlockState state, IBlockAccess world, BlockPos pos)
{ return CLIP_AABB_BY_INDEX[getAABBIndex(getActualState(state, world, pos))]; }
private static int getAABBIndex(IBlockState state)
{ return ((!(state.getValue(NORTH))) ? 0 : (1<<EnumFacing.NORTH.getHorizontalIndex()))
| ((!(state.getValue( EAST))) ? 0 : (1<<EnumFacing.EAST.getHorizontalIndex()))
| ((!(state.getValue(SOUTH))) ? 0 : (1<<EnumFacing.SOUTH.getHorizontalIndex()))
| ((!(state.getValue( WEST))) ? 0 : (1<<EnumFacing.WEST.getHorizontalIndex()));
@Override
@SideOnly(Side.CLIENT)
@SuppressWarnings("deprecation")
public AxisAlignedBB getSelectedBoundingBox(IBlockState state, World world, BlockPos pos)
{ return SELECTION_AABB; }
protected static int getAABBIndex(IBlockState state)
{ return ((!(state.getValue(SOUTH))) ? 0 : (1<<EnumFacing.SOUTH.getHorizontalIndex())) // 0
| ((!(state.getValue( WEST))) ? 0 : (1<<EnumFacing.WEST.getHorizontalIndex())) // 1
| ((!(state.getValue(NORTH))) ? 0 : (1<<EnumFacing.NORTH.getHorizontalIndex())) // 2
| ((!(state.getValue( EAST))) ? 0 : (1<<EnumFacing.EAST.getHorizontalIndex())); // 3
}
@Override
@ -122,11 +174,11 @@ public class BlockDecorWall extends BlockDecor
public boolean canSpawnInBlock()
{ return false; }
private boolean canConnectTo(IBlockAccess world, BlockPos pos, BlockPos other, EnumFacing facing)
protected boolean canConnectTo(IBlockAccess world, BlockPos pos, BlockPos other, EnumFacing facing)
{
final IBlockState state = world.getBlockState(other);
final Block block = state.getBlock();
if((block instanceof BlockDecorWall) || (block instanceof BlockFenceGate)) return true;
if((block instanceof BlockDecorWall) || (block instanceof BlockFenceGate) || (block instanceof BlockDecorFence)) return true;
if(world.getBlockState(pos.offset(facing)).getBlock()!=this) return false;
if(block instanceof BlockFence) return true;
final BlockFaceShape shp = state.getBlockFaceShape(world, other, facing);
@ -173,11 +225,15 @@ public class BlockDecorWall extends BlockDecor
public boolean canBeConnectedTo(IBlockAccess world, BlockPos pos, EnumFacing facing)
{ return canConnectTo(world, pos, pos.offset(facing), facing.getOpposite()); }
private boolean canWallConnectTo(IBlockAccess world, BlockPos pos, EnumFacing facing)
protected boolean canWallConnectTo(IBlockAccess world, BlockPos pos, EnumFacing facing)
{ return canConnectTo(world, pos, pos.offset(facing), facing.getOpposite()); }
@Override
public boolean canPlaceTorchOnTop(IBlockState state, IBlockAccess world, BlockPos pos)
{ return true; }
@Override
public net.minecraft.pathfinding.PathNodeType getAiPathNodeType(IBlockState state, IBlockAccess world, BlockPos pos)
{ return PathNodeType.FENCE; }
}

View file

@ -0,0 +1,43 @@
/*
* @file BlockDecorWindowSill.java
* @author Stefan Wilhelm (wile)
* @copyright (C) 2019 Stefan Wilhelm
* @license MIT (see https://opensource.org/licenses/MIT)
*
* Block for windowsills to allow placing things on top
* (top side solid).
*/
package wile.engineersdecor.blocks;
import net.minecraft.block.material.Material;
import net.minecraft.block.SoundType;
import net.minecraft.block.state.BlockFaceShape;
import net.minecraft.block.state.IBlockState;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
public class BlockDecorWindowSill extends BlockDecorDirected
{
public BlockDecorWindowSill(@Nonnull String registryName, long config, @Nullable Material material, float hardness, float resistance, @Nullable SoundType sound, @Nonnull AxisAlignedBB unrotatedAABB)
{ super(registryName, config|CFG_HORIZIONTAL, material, hardness, resistance, sound, unrotatedAABB); }
@Override
public BlockFaceShape getBlockFaceShape(IBlockAccess world, IBlockState state, BlockPos pos, EnumFacing face)
{ return (face==EnumFacing.UP) ? BlockFaceShape.SOLID : BlockFaceShape.UNDEFINED; }
@Override
@SuppressWarnings("deprecation")
public boolean isSideSolid(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side)
{ return side==EnumFacing.UP; }
@Override
@SuppressWarnings("deprecation")
public boolean isTopSolid(IBlockState state)
{ return true; }
}

View file

@ -9,6 +9,7 @@
package wile.engineersdecor.detail;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.fml.common.Loader;
import wile.engineersdecor.ModEngineersDecor;
import net.minecraft.world.World;
import net.minecraft.item.ItemStack;
@ -154,6 +155,9 @@ public class ModAuxiliaries
if(!s.isEmpty()) player.sendMessage(new TextComponentTranslation(s));
}
public static boolean isModLoaded(String id)
{ return Loader.isModLoaded(id); }
@SuppressWarnings("unused")
public interface IExperimentalFeature{}
}

View file

@ -8,25 +8,100 @@
*/
package wile.engineersdecor.detail;
import com.google.common.collect.ImmutableList;
import wile.engineersdecor.ModEngineersDecor;
import net.minecraft.init.Blocks;
import net.minecraft.block.Block;
import net.minecraft.block.BlockVine;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.state.IBlockState;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Vec3i;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.registry.ForgeRegistries;
import com.google.common.collect.ImmutableList;
import java.util.*;
public class TreeCutting
{
private static org.apache.logging.log4j.Logger LOGGER = ModEngineersDecor.logger;
private static class Compat
{
enum ChoppingMethod { None, RootBlockBreaking }
private static final HashMap<IBlockState, ChoppingMethod> choppable_states = new HashMap<IBlockState, ChoppingMethod>();
public static long num_breaking_exceptions = 0;
static void reload()
{
try {
choppable_states.clear();
if(ModAuxiliaries.isModLoaded("dynamictrees")) {
ForgeRegistries.BLOCKS.getKeys().forEach((regname)->{
if("dynamictrees".equals(regname.getNamespace())) {
if(!regname.getPath().contains("branch")) return;
try {
Block block = ForgeRegistries.BLOCKS.getValue(regname);
IBlockState state = block.getDefaultState();
for(IProperty<?> vaprop: state.getProperties().keySet()) {
if(!("radius".equals(vaprop.getName())) || (vaprop.getValueClass() != Integer.class)) continue;
@SuppressWarnings("unchecked")
IProperty<Integer> prop = (IProperty<Integer>)vaprop;
Integer max = ((Collection<Integer>)prop.getAllowedValues()).stream().max(Integer::compare).orElse(0);
if(max<7) continue;
for(int r=7; r<=max; ++r) choppable_states.put(state.withProperty(prop, r), ChoppingMethod.RootBlockBreaking);
}
} catch(Throwable e) {
LOGGER.warn("Failed to register chopping for " + regname.toString());
return;
}
}
});
}
LOGGER.info("Dynamic Trees chopping compat: " + choppable_states.size() + " choppable states found.");
} catch(Throwable e) {
choppable_states.clear();
LOGGER.warn("Failed to determine choppings for dynamic trees compat, skipping that:" + e);
}
}
private static boolean canChop(IBlockState state)
{ return choppable_states.containsKey(state); }
private static int chop(World world, IBlockState state, BlockPos pos, int max_blocks_to_break, boolean without_target_block)
{
final int default_expense = 5;
switch(choppable_states.getOrDefault(state, ChoppingMethod.None)) {
case None:
return 0;
case RootBlockBreaking: {
if(num_breaking_exceptions < 16) {
try {
world.setBlockState(pos, Blocks.AIR.getDefaultState(), 1);
state.getBlock().breakBlock(world, pos, state);
} catch(Throwable e) {
if(++num_breaking_exceptions == 1) LOGGER.warn("Tree Chopper: There was an exception while trying to break a tree trunk ("+state.getBlock().getRegistryName()+"): " + e);
if(num_breaking_exceptions == 16) LOGGER.warn("Tree Chopper: There were 16 exceptions in total trying to chop modded trees. Feature has been disabled.");
}
}
return 5;
}
default:
return 0;
}
}
}
private static final List<Vec3i> hoffsets = ImmutableList.of(
new Vec3i( 1,0, 0), new Vec3i( 1,0, 1), new Vec3i( 0,0, 1),
new Vec3i(-1,0, 1), new Vec3i(-1,0, 0), new Vec3i(-1,0,-1),
new Vec3i( 0,0,-1), new Vec3i( 1,0,-1)
);
public static void reload()
{ Compat.reload(); }
private static List<BlockPos> findBlocksAround(final World world, final BlockPos centerPos, final IBlockState leaf_type_state, final Set<BlockPos> checked, int recursion_left)
{
ArrayList<BlockPos> to_decay = new ArrayList<BlockPos>();
@ -47,13 +122,14 @@ public class TreeCutting
}
public static boolean canChop(IBlockState state)
{ return BlockCategories.isLog(state); }
{ return BlockCategories.isLog(state) || Compat.canChop(state); }
/**
* Chops a tree, returns the damage that the cutting tool shall take
*/
public static int chopTree(World world, IBlockState broken_state, BlockPos startPos, int max_blocks_to_break, boolean without_target_block)
{
if((Compat.canChop(broken_state))) return Compat.chop(world, broken_state, startPos, max_blocks_to_break, without_target_block);
if(!BlockCategories.isLog(broken_state)) return 0;
final long ymin = startPos.getY();
final long max_leaf_distance = 6;

View file

@ -0,0 +1,20 @@
{
"forge_marker": 1,
"defaults": {
"model": "engineersdecor:fence/steel_mesh_fence_default",
"textures": {
"wall": "engineersdecor:blocks/fence/steel_mesh_fence",
"postside": "engineersdecor:blocks/fence/steel_mesh_pole_side",
"top": "engineersdecor:blocks/fence/steel_mesh_top",
"particle": "engineersdecor:blocks/fence/steel_mesh_top"
}
},
"variants": {
"inventory": { "model": "engineersdecor:fence/steel_mesh_fence_inventory" },
"up" : { "false":{}, "true": {"submodel": {"smwfence_up" : {"model": "engineersdecor:fence/steel_mesh_fence_post" }}} },
"north": { "false":{}, "true": {"submodel": {"smwfence_north" : {"model": "engineersdecor:fence/steel_mesh_fence_side", "uvlock": true, "y": 0 }}} },
"east" : { "false":{}, "true": {"submodel": {"smwfence_east" : {"model": "engineersdecor:fence/steel_mesh_fence_side", "uvlock": true, "y": 90 }}} },
"south": { "false":{}, "true": {"submodel": {"smwfence_south" : {"model": "engineersdecor:fence/steel_mesh_fence_side", "uvlock": true, "y": 180 }}} },
"west" : { "false":{}, "true": {"submodel": {"smwfence_west" : {"model": "engineersdecor:fence/steel_mesh_fence_side", "uvlock": true, "y": 270 }}} }
}
}

View file

@ -0,0 +1,11 @@
{
"forge_marker": 1,
"defaults": {
"model": "engineersdecor:furniture/treated_wood_windowsill_broad_model"
},
"variants": {
"normal": [{}],
"inventory": [{}],
"facing": { "north": {"y":0}, "south": {"y":180}, "west": {"y":-90}, "east": {"y":90}, "up":{}, "down":{} }
}
}

View file

@ -108,8 +108,12 @@ tile.engineersdecor.treated_wood_window.name=Treated Wood Window
tile.engineersdecor.treated_wood_window.help=§6Wood framed triple glazed window. Well insulating.§r Does not connect to adjacent blocks like glass panes.
tile.engineersdecor.treated_wood_windowsill.name=Treated Wood Window Sill
tile.engineersdecor.treated_wood_windowsill.help=§6Simple window decoration.
tile.engineersdecor.treated_wood_broad_windowsill.name=Broad Treated Wood Window Sill
tile.engineersdecor.treated_wood_broad_windowsill.help=§6Simple window decoration.
tile.engineersdecor.steel_framed_window.name=Steel Framed Window
tile.engineersdecor.steel_framed_window.help=§6Steel framed triple glazed window. Well insulating. §r Does not connect to adjacent blocks like glass panes.
tile.engineersdecor.steel_mesh_fence.name=Steel Mesh Fence
tile.engineersdecor.steel_mesh_fence.help=§6Industrial style fence.§r\nDoes not connect do regular fences.
#-----------------------------------------------------------------------------------------------------------
tile.engineersdecor.small_lab_furnace.name=Small Laboratory Furnace
tile.engineersdecor.small_lab_furnace.help=§6Small metal cased lab kiln.§r Solid fuel consuming, updraught. \

View file

@ -105,8 +105,12 @@ tile.engineersdecor.treated_wood_window.name=Обработанное дерев
tile.engineersdecor.treated_wood_window.help=§6Деревянный каркас окна с тройным остеклением. Ну и шумоизоляция.
tile.engineersdecor.treated_wood_windowsill.name=Обработанный деревянный подоконник
tile.engineersdecor.treated_wood_windowsill.help=§6Простое оформление окон.
tile.engineersdecor.treated_wood_broad_windowsill.name=Broad Treated Wood Window Sill
#tile.engineersdecor.treated_wood_broad_windowsill.help=§6Simple window decoration.
tile.engineersdecor.steel_framed_window.name=Окно со стальной рамой
tile.engineersdecor.steel_framed_window.help=§6Стальной каркас окна с тройным остеклением. Хорошо изолирует. §r Не подключается к смежным блокам, таким как стеклянные панели.
tile.engineersdecor.steel_mesh_fence.name=Steel Mesh Fence
#tile.engineersdecor.steel_mesh_fence.help=§6Industrial style fence.§r\nDoes not connect do regular fences.
#-----------------------------------------------------------------------------------------------------------
tile.engineersdecor.small_lab_furnace.name=Компактная лабораторная печь
tile.engineersdecor.small_lab_furnace.help=§6Лабораторная печь в металлическом корпусе.§r Подача твёрдого топлива сверху. Немного горячее, чем каменная, поэтому быстрее. Два внутренних слота для ввода, выхода и топлива.

View file

@ -106,8 +106,12 @@ tile.engineersdecor.treated_wood_window.name=Treated Wood Window
#tile.engineersdecor.treated_wood_window.help=§6Wood framed triple glazed window. Well insulating.§r Does not connect to adjacent blocks like glass panes.
tile.engineersdecor.treated_wood_windowsill.name=Treated Wood Window Sill
#tile.engineersdecor.treated_wood_windowsill.help=§6Simple window decoration.
tile.engineersdecor.treated_wood_broad_windowsill.name=Broad Treated Wood Window Sill
#tile.engineersdecor.treated_wood_broad_windowsill.help=§6Simple window decoration.
tile.engineersdecor.steel_framed_window.name=Steel Framed Window
#tile.engineersdecor.steel_framed_window.help=§6Steel framed triple glazed window. Well insulating. §r Does not connect to adjacent blocks like glass panes.
tile.engineersdecor.steel_mesh_fence.name=Steel Mesh Fence
#tile.engineersdecor.steel_mesh_fence.help=§6Industrial style fence.§r\nDoes not connect do regular fences.
#-----------------------------------------------------------------------------------------------------------
tile.engineersdecor.small_lab_furnace.name=Small Laboratory Furnace
#tile.engineersdecor.small_lab_furnace.help=§6Small metal cased lab kiln.§r Solid fuel consuming, updraught. \

View file

@ -0,0 +1,9 @@
{
"textures": {
"wall": "engineersdecor:blocks/fence/steel_mesh_fence",
"particle": "engineersdecor:blocks/fence/steel_mesh_fence"
},
"elements": [{
"from": [7.9, 7.9, 7.9], "to": [8, 8, 8], "faces": { "down": {"texture": "#wall"} }
}]
}

View file

@ -0,0 +1,427 @@
{
"parent": "block/block",
"ambientocclusion": false,
"textures": {
"wall": "engineersdecor:blocks/fence/steel_mesh_fence",
"particle": "engineersdecor:blocks/fence/steel_mesh_fence",
"top": "engineersdecor:blocks/fence/steel_mesh_top"
},
"elements": [
{
"name": "Full wall",
"from": [7, 0, 0.5],
"to": [9, 16, 2.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8.5]},
"faces": {
"north": {"texture": "#wall", "cullface": "north"},
"east": {"texture": "#wall"},
"south": {"texture": "#wall", "cullface": "south"},
"west": {"texture": "#wall"},
"up": {"texture": "#top"},
"down": {"texture": "#wall", "cullface": "down"}
}
},
{
"name": "Full wall",
"from": [7, 0, 13.5],
"to": [9, 16, 15.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 20.5]},
"faces": {
"north": {"texture": "#wall", "cullface": "north"},
"east": {"texture": "#wall"},
"south": {"texture": "#wall", "cullface": "south"},
"west": {"texture": "#wall"},
"up": {"texture": "#top"},
"down": {"texture": "#wall", "cullface": "down"}
}
},
{
"name": "Full wall",
"from": [8, 0.125, 2.5],
"to": [8.125, 0.5, 13.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 14.5]},
"faces": {
"north": {"texture": "#wall", "cullface": "north"},
"east": {"texture": "#wall"},
"south": {"texture": "#wall", "cullface": "south"},
"west": {"texture": "#wall"},
"up": {"texture": "#top"},
"down": {"texture": "#wall", "cullface": "down"}
}
},
{
"name": "Full wall",
"from": [8, 4.125, 2.5],
"to": [8.125, 4.5, 13.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 12, 14.5]},
"faces": {
"north": {"texture": "#wall", "cullface": "north"},
"east": {"texture": "#wall"},
"south": {"texture": "#wall", "cullface": "south"},
"west": {"texture": "#wall"},
"up": {"texture": "#top"},
"down": {"texture": "#wall", "cullface": "down"}
}
},
{
"name": "Full wall",
"from": [7.925, 0, 5.8125],
"to": [8.05, 15.375, 6.1875],
"rotation": {"angle": 0, "axis": "x", "origin": [7.875, 5.8125, 7.5]},
"faces": {
"north": {"rotation": 180, "texture": "#wall", "cullface": "down"},
"east": {"rotation": 270, "texture": "#wall"},
"south": {"texture": "#top"},
"west": {"rotation": 90, "texture": "#wall"},
"up": {"rotation": 180, "texture": "#wall", "cullface": "north"},
"down": {"texture": "#wall", "cullface": "south"}
}
},
{
"name": "Full wall",
"from": [8, 8.125, 2.5],
"to": [8.125, 8.5, 13.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 16, 14.5]},
"faces": {
"north": {"texture": "#wall", "cullface": "north"},
"east": {"texture": "#wall"},
"south": {"texture": "#wall", "cullface": "south"},
"west": {"texture": "#wall"},
"up": {"texture": "#top"},
"down": {"texture": "#wall", "cullface": "down"}
}
},
{
"name": "Full wall",
"from": [7.925, 0, 9.8125],
"to": [8.05, 15.375, 10.1875],
"rotation": {"angle": 0, "axis": "x", "origin": [7.875, 5.8125, 7.5]},
"faces": {
"north": {"rotation": 180, "texture": "#wall", "cullface": "down"},
"east": {"rotation": 270, "texture": "#wall"},
"south": {"texture": "#top"},
"west": {"rotation": 90, "texture": "#wall"},
"up": {"rotation": 180, "texture": "#wall", "cullface": "north"},
"down": {"texture": "#wall", "cullface": "south"}
}
},
{
"name": "Full wall",
"from": [8, 12.125, 2.5],
"to": [8.125, 12.5, 13.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 20, 14.5]},
"faces": {
"north": {"texture": "#wall", "cullface": "north"},
"east": {"texture": "#wall"},
"south": {"texture": "#wall", "cullface": "south"},
"west": {"texture": "#wall"},
"up": {"texture": "#top"},
"down": {"texture": "#wall", "cullface": "down"}
}
},
{
"name": "Full wall",
"from": [8, 2.125, 2.5],
"to": [8.125, 2.5, 13.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 10, 14.5]},
"faces": {
"north": {"texture": "#wall", "cullface": "north"},
"east": {"texture": "#wall"},
"south": {"texture": "#wall", "cullface": "south"},
"west": {"texture": "#wall"},
"up": {"texture": "#top"},
"down": {"texture": "#wall", "cullface": "down"}
}
},
{
"name": "Full wall",
"from": [7.925, 0, 3.8125],
"to": [8.05, 15.375, 4.1875],
"rotation": {"angle": 0, "axis": "x", "origin": [7.875, 5.8125, 7.5]},
"faces": {
"north": {"rotation": 180, "texture": "#wall", "cullface": "down"},
"east": {"rotation": 270, "texture": "#wall"},
"south": {"texture": "#top"},
"west": {"rotation": 90, "texture": "#wall"},
"up": {"rotation": 180, "texture": "#wall", "cullface": "north"},
"down": {"texture": "#wall", "cullface": "south"}
}
},
{
"name": "Full wall",
"from": [8, 6.125, 2.5],
"to": [8.125, 6.5, 13.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 14, 14.5]},
"faces": {
"north": {"texture": "#wall", "cullface": "north"},
"east": {"texture": "#wall"},
"south": {"texture": "#wall", "cullface": "south"},
"west": {"texture": "#wall"},
"up": {"texture": "#top"},
"down": {"texture": "#wall", "cullface": "down"}
}
},
{
"name": "Full wall",
"from": [7.925, 0, 7.8125],
"to": [8.05, 15.375, 8.1875],
"rotation": {"angle": 0, "axis": "x", "origin": [7.875, 5.8125, 7.5]},
"faces": {
"north": {"rotation": 180, "texture": "#wall", "cullface": "down"},
"east": {"rotation": 270, "texture": "#wall"},
"south": {"texture": "#top"},
"west": {"rotation": 90, "texture": "#wall"},
"up": {"rotation": 180, "texture": "#wall", "cullface": "north"},
"down": {"texture": "#wall", "cullface": "south"}
}
},
{
"name": "Full wall",
"from": [8, 10.125, 2.5],
"to": [8.125, 10.5, 13.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 18, 14.5]},
"faces": {
"north": {"texture": "#wall", "cullface": "north"},
"east": {"texture": "#wall"},
"south": {"texture": "#wall", "cullface": "south"},
"west": {"texture": "#wall"},
"up": {"texture": "#top"},
"down": {"texture": "#wall", "cullface": "down"}
}
},
{
"name": "Full wall",
"from": [7.925, 0, 11.8125],
"to": [8.05, 15.375, 12.1875],
"rotation": {"angle": 0, "axis": "x", "origin": [7.875, 5.8125, 7.5]},
"faces": {
"north": {"rotation": 180, "texture": "#wall", "cullface": "down"},
"east": {"rotation": 270, "texture": "#wall"},
"south": {"texture": "#top"},
"west": {"rotation": 90, "texture": "#wall"},
"up": {"rotation": 180, "texture": "#wall", "cullface": "north"},
"down": {"texture": "#wall", "cullface": "south"}
}
},
{
"name": "Full wall",
"from": [8, 14.125, 2.5],
"to": [8.125, 14.5, 13.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 22, 14.5]},
"faces": {
"north": {"texture": "#wall", "cullface": "north"},
"east": {"texture": "#wall"},
"south": {"texture": "#wall", "cullface": "south"},
"west": {"texture": "#wall"},
"up": {"texture": "#top"},
"down": {"texture": "#wall", "cullface": "down"}
}
},
{
"name": "Full wall",
"from": [7.875, 1.125, 2.5],
"to": [8, 1.5, 13.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 9, 14.5]},
"faces": {
"north": {"texture": "#wall", "cullface": "north"},
"east": {"texture": "#wall"},
"south": {"texture": "#wall", "cullface": "south"},
"west": {"texture": "#wall"},
"up": {"texture": "#top"},
"down": {"texture": "#wall", "cullface": "down"}
}
},
{
"name": "Full wall",
"from": [7.925, 0, 2.8125],
"to": [8.05, 15.375, 3.1875],
"rotation": {"angle": 0, "axis": "x", "origin": [7.875, 5.8125, 7.5]},
"faces": {
"north": {"rotation": 180, "texture": "#wall", "cullface": "down"},
"east": {"rotation": 270, "texture": "#wall"},
"south": {"texture": "#top"},
"west": {"rotation": 90, "texture": "#wall"},
"up": {"rotation": 180, "texture": "#wall", "cullface": "north"},
"down": {"texture": "#wall", "cullface": "south"}
}
},
{
"name": "Full wall",
"from": [7.875, 5.125, 2.5],
"to": [8, 5.5, 13.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 13, 14.5]},
"faces": {
"north": {"texture": "#wall", "cullface": "north"},
"east": {"texture": "#wall"},
"south": {"texture": "#wall", "cullface": "south"},
"west": {"texture": "#wall"},
"up": {"texture": "#top"},
"down": {"texture": "#wall", "cullface": "down"}
}
},
{
"name": "Full wall",
"from": [7.925, 0, 6.8125],
"to": [8.05, 15.375, 7.1875],
"rotation": {"angle": 0, "axis": "x", "origin": [7.875, 5.8125, 7.5]},
"faces": {
"north": {"rotation": 180, "texture": "#wall", "cullface": "down"},
"east": {"rotation": 270, "texture": "#wall"},
"south": {"texture": "#top"},
"west": {"rotation": 90, "texture": "#wall"},
"up": {"rotation": 180, "texture": "#wall", "cullface": "north"},
"down": {"texture": "#wall", "cullface": "south"}
}
},
{
"name": "Full wall",
"from": [7.875, 9.125, 2.5],
"to": [8, 9.5, 13.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 17, 14.5]},
"faces": {
"north": {"texture": "#wall", "cullface": "north"},
"east": {"texture": "#wall"},
"south": {"texture": "#wall", "cullface": "south"},
"west": {"texture": "#wall"},
"up": {"texture": "#top"},
"down": {"texture": "#wall", "cullface": "down"}
}
},
{
"name": "Full wall",
"from": [7.925, 0, 10.8125],
"to": [8.05, 15.375, 11.1875],
"rotation": {"angle": 0, "axis": "x", "origin": [7.875, 5.8125, 7.5]},
"faces": {
"north": {"rotation": 180, "texture": "#wall", "cullface": "down"},
"east": {"rotation": 270, "texture": "#wall"},
"south": {"texture": "#top"},
"west": {"rotation": 90, "texture": "#wall"},
"up": {"rotation": 180, "texture": "#wall", "cullface": "north"},
"down": {"texture": "#wall", "cullface": "south"}
}
},
{
"name": "Full wall",
"from": [7.875, 13.125, 2.5],
"to": [8, 13.5, 13.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 21, 14.5]},
"faces": {
"north": {"texture": "#wall", "cullface": "north"},
"east": {"texture": "#wall"},
"south": {"texture": "#wall", "cullface": "south"},
"west": {"texture": "#wall"},
"up": {"texture": "#top"},
"down": {"texture": "#wall", "cullface": "down"}
}
},
{
"name": "Full wall",
"from": [7.875, 15.125, 2.5],
"to": [8, 15.5, 13.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 23, 14.5]},
"faces": {
"north": {"texture": "#wall", "cullface": "north"},
"east": {"texture": "#wall"},
"south": {"texture": "#wall", "cullface": "south"},
"west": {"texture": "#wall"},
"up": {"texture": "#top"},
"down": {"texture": "#wall", "cullface": "down"}
}
},
{
"name": "Full wall",
"from": [7.875, 3.125, 2.5],
"to": [8, 3.5, 13.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 11, 14.5]},
"faces": {
"north": {"texture": "#wall", "cullface": "north"},
"east": {"texture": "#wall"},
"south": {"texture": "#wall", "cullface": "south"},
"west": {"texture": "#wall"},
"up": {"texture": "#top"},
"down": {"texture": "#wall", "cullface": "down"}
}
},
{
"name": "Full wall",
"from": [7.925, 0, 4.8125],
"to": [8.05, 15.375, 5.1875],
"rotation": {"angle": 0, "axis": "x", "origin": [7.875, 5.8125, 7.5]},
"faces": {
"north": {"rotation": 180, "texture": "#wall", "cullface": "down"},
"east": {"rotation": 270, "texture": "#wall"},
"south": {"texture": "#top"},
"west": {"rotation": 90, "texture": "#wall"},
"up": {"rotation": 180, "texture": "#wall", "cullface": "north"},
"down": {"texture": "#wall", "cullface": "south"}
}
},
{
"name": "Full wall",
"from": [7.875, 7.125, 2.5],
"to": [8, 7.5, 13.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 15, 14.5]},
"faces": {
"north": {"texture": "#wall", "cullface": "north"},
"east": {"texture": "#wall"},
"south": {"texture": "#wall", "cullface": "south"},
"west": {"texture": "#wall"},
"up": {"texture": "#top"},
"down": {"texture": "#wall", "cullface": "down"}
}
},
{
"name": "Full wall",
"from": [7.925, 0, 8.8125],
"to": [8.05, 15.375, 9.1875],
"rotation": {"angle": 0, "axis": "x", "origin": [7.875, 5.8125, 7.5]},
"faces": {
"north": {"rotation": 180, "texture": "#wall", "cullface": "down"},
"east": {"rotation": 270, "texture": "#wall"},
"south": {"texture": "#top"},
"west": {"rotation": 90, "texture": "#wall"},
"up": {"rotation": 180, "texture": "#wall", "cullface": "north"},
"down": {"texture": "#wall", "cullface": "south"}
}
},
{
"name": "Full wall",
"from": [7.875, 11.125, 2.5],
"to": [8, 11.5, 13.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 19, 14.5]},
"faces": {
"north": {"texture": "#wall", "cullface": "north"},
"east": {"texture": "#wall"},
"south": {"texture": "#wall", "cullface": "south"},
"west": {"texture": "#wall"},
"up": {"texture": "#top"},
"down": {"texture": "#wall", "cullface": "down"}
}
},
{
"name": "Full wall",
"from": [7.925, 0, 12.8125],
"to": [8.05, 15.375, 13.1875],
"rotation": {"angle": 0, "axis": "x", "origin": [7.875, 5.8125, 7.5]},
"faces": {
"north": {"rotation": 180, "texture": "#wall", "cullface": "down"},
"east": {"rotation": 270, "texture": "#wall"},
"south": {"texture": "#top"},
"west": {"rotation": 90, "texture": "#wall"},
"up": {"rotation": 180, "texture": "#wall", "cullface": "north"},
"down": {"texture": "#wall", "cullface": "south"}
}
}
],
"display": {
"gui": {
"rotation": [30, 135, 0],
"scale": [0.625, 0.625, 0.625]
},
"fixed": {
"rotation": [0, 90, 0],
"scale": [0.5, 0.5, 0.5]
}
}
}

View file

@ -0,0 +1,22 @@
{
"textures": {
"postside": "engineersdecor:blocks/fence/steel_mesh_pole_side",
"top": "engineersdecor:blocks/fence/steel_mesh_top",
"particle": "engineersdecor:blocks/fence/steel_mesh_top"
},
"elements": [
{
"name": "Center post",
"from": [6.5, 0, 6.5],
"to": [9.5, 16, 9.5],
"faces": {
"north": {"texture": "#postside"},
"east": {"texture": "#postside"},
"south": {"texture": "#postside"},
"west": {"texture": "#postside"},
"up": {"texture": "#top", "cullface": "up"},
"down": {"texture": "#top"}
}
}
]
}

View file

@ -0,0 +1,176 @@
{
"textures": {
"wall": "engineersdecor:blocks/fence/steel_mesh_fence"
},
"elements": [
{
"from": [8, 15.625, 0.0625],
"to": [8.1875, 15.98, 8],
"rotation": {"angle": 0, "axis": "y", "origin": [8.25, 8, 8]},
"faces": {
"north": {"texture": "#wall", "cullface": "north"},
"east": {"texture": "#wall"},
"south": {"texture": "#wall"},
"west": {"texture": "#wall"},
"up": {"texture": "#wall"},
"down": {"texture": "#wall"}
}
},
{
"from": [7.8125, 13.625, 0.0625],
"to": [8, 13.98, 8],
"rotation": {"angle": 0, "axis": "y", "origin": [8.0625, 6, 8]},
"faces": {
"north": {"texture": "#wall", "cullface": "north"},
"east": {"texture": "#wall"},
"south": {"texture": "#wall"},
"west": {"texture": "#wall"},
"up": {"texture": "#wall"},
"down": {"texture": "#wall"}
}
},
{
"from": [7.8125, 9.625, 0.0625],
"to": [8, 9.98, 8],
"rotation": {"angle": 0, "axis": "y", "origin": [8.0625, 2, 8]},
"faces": {
"north": {"texture": "#wall", "cullface": "north"},
"east": {"texture": "#wall"},
"south": {"texture": "#wall"},
"west": {"texture": "#wall"},
"up": {"texture": "#wall"},
"down": {"texture": "#wall"}
}
},
{
"from": [7.8125, 5.625, 0.0625],
"to": [8, 5.98, 8],
"rotation": {"angle": 0, "axis": "y", "origin": [8.0625, -2, 8]},
"faces": {
"north": {"texture": "#wall", "cullface": "north"},
"east": {"texture": "#wall"},
"south": {"texture": "#wall"},
"west": {"texture": "#wall"},
"up": {"texture": "#wall"},
"down": {"texture": "#wall"}
}
},
{
"from": [7.8125, 1.625, 0.0625],
"to": [8, 1.98, 8],
"rotation": {"angle": 0, "axis": "y", "origin": [8.0625, -6, 8]},
"faces": {
"north": {"texture": "#wall", "cullface": "north"},
"east": {"texture": "#wall"},
"south": {"texture": "#wall"},
"west": {"texture": "#wall"},
"up": {"texture": "#wall"},
"down": {"texture": "#wall"}
}
},
{
"from": [8, 11.625, 0.0625],
"to": [8.1875, 11.98, 8],
"rotation": {"angle": 0, "axis": "y", "origin": [8.25, 4, 8]},
"faces": {
"north": {"texture": "#wall", "cullface": "north"},
"east": {"texture": "#wall"},
"south": {"texture": "#wall"},
"west": {"texture": "#wall"},
"up": {"texture": "#wall"},
"down": {"texture": "#wall"}
}
},
{
"from": [8, 7.625, 0.0625],
"to": [8.1875, 7.98, 8],
"rotation": {"angle": 0, "axis": "y", "origin": [8.25, 0, 8]},
"faces": {
"north": {"texture": "#wall", "cullface": "north"},
"east": {"texture": "#wall"},
"south": {"texture": "#wall"},
"west": {"texture": "#wall"},
"up": {"texture": "#wall"},
"down": {"texture": "#wall"}
}
},
{
"from": [8, 3.625, 0.0625],
"to": [8.1875, 3.98, 8],
"rotation": {"angle": 0, "axis": "y", "origin": [8.25, -4, 8]},
"faces": {
"north": {"texture": "#wall", "cullface": "north"},
"east": {"texture": "#wall"},
"south": {"texture": "#wall"},
"west": {"texture": "#wall"},
"up": {"texture": "#wall"},
"down": {"texture": "#wall"}
}
},
{
"from": [7.875, 0, 1.875],
"to": [8.125, 15.855, 2.25],
"rotation": {"angle": 0, "axis": "y", "origin": [7.75, 8, 9.875]},
"faces": {
"north": {"texture": "#wall", "cullface": "north"},
"east": {"texture": "#wall"},
"south": {"texture": "#wall"},
"west": {"texture": "#wall"},
"up": {"texture": "#wall"},
"down": {"texture": "#wall"}
}
},
{
"from": [7.875, 0, 0],
"to": [8.125, 15.855, 0.1875],
"rotation": {"angle": 0, "axis": "y", "origin": [7.75, 8, 8]},
"faces": {
"north": {"texture": "#wall", "cullface": "north"},
"east": {"texture": "#wall"},
"south": {"texture": "#wall"},
"west": {"texture": "#wall"},
"up": {"texture": "#wall"},
"down": {"texture": "#wall"}
}
},
{
"from": [7.875, 0, 7.8125],
"to": [8.125, 15.855, 8],
"rotation": {"angle": 0, "axis": "y", "origin": [7.75, 8, 15.8125]},
"faces": {
"north": {"texture": "#wall", "cullface": "north"},
"east": {"texture": "#wall"},
"south": {"texture": "#wall"},
"west": {"texture": "#wall"},
"up": {"texture": "#wall"},
"down": {"texture": "#wall"}
}
},
{
"from": [7.875, 0, 3.875],
"to": [8.125, 15.855, 4.25],
"rotation": {"angle": 0, "axis": "y", "origin": [7.75, 8, 11.875]},
"faces": {
"north": {"texture": "#wall", "cullface": "north"},
"east": {"texture": "#wall"},
"south": {"texture": "#wall"},
"west": {"texture": "#wall"},
"up": {"texture": "#wall"},
"down": {"texture": "#wall"}
}
},
{
"from": [7.875, 0, 5.875],
"to": [8.125, 15.855, 6.25],
"rotation": {"angle": 0, "axis": "y", "origin": [7.75, 8, 13.875]},
"faces": {
"north": {"texture": "#wall", "cullface": "north"},
"east": {"texture": "#wall"},
"south": {"texture": "#wall"},
"west": {"texture": "#wall"},
"up": {"texture": "#wall"},
"down": {"texture": "#wall"}
}
}
]
}

View file

@ -0,0 +1,113 @@
{
"parent": "block/cube",
"textures": {
"o": "engineersdecor:blocks/iestyle/treated_wood_rough_texture",
"particle": "engineersdecor:blocks/iestyle/treated_wood_rough_texture"
},
"elements": [
{
"from": [1.625, 8.625, 13],
"to": [3.375, 16, 14.625],
"rotation": {"angle": -45, "axis": "x", "origin": [2.5, 11, 13.125]},
"faces": {
"north": {"uv": [12.625, 0, 14.375, 7.375], "texture": "#o"},
"east": {"uv": [1.375, 0, 3, 7.375], "texture": "#o"},
"south": {"uv": [1.625, 0, 3.375, 7.375], "texture": "#o"},
"west": {"uv": [13, 0, 14.625, 7.375], "texture": "#o"}
}
},
{
"from": [12.625, 8.625, 13],
"to": [14.375, 16, 14.625],
"rotation": {"angle": -45, "axis": "x", "origin": [13.5, 11, 13.125]},
"faces": {
"north": {"uv": [1.625, 0, 3.375, 7.375], "texture": "#o"},
"east": {"uv": [1.375, 0, 3, 7.375], "texture": "#o"},
"south": {"uv": [12.625, 0, 14.375, 7.375], "texture": "#o"},
"west": {"uv": [13, 0, 14.625, 7.375], "texture": "#o"}
}
},
{
"from": [0, 14.5, 4],
"to": [16, 16, 16],
"faces": {
"north": {"uv": [0, 0, 16, 1.5], "texture": "#o"},
"east": {"uv": [0, 0, 12, 1.5], "texture": "#o"},
"south": {"uv": [0, 0, 16, 1.5], "texture": "#o"},
"west": {"uv": [4, 0, 16, 1.5], "texture": "#o"},
"up": {"uv": [0, 4, 16, 16], "texture": "#o"},
"down": {"uv": [0, 0, 16, 12], "texture": "#o"}
}
},
{
"from": [1.5, 9, 14.375],
"to": [3.5, 15, 16],
"faces": {
"north": {"uv": [12.5, 1, 14.5, 7], "texture": "#o"},
"east": {"uv": [0, 1, 1.625, 7], "texture": "#o"},
"south": {"uv": [1.5, 1, 3.5, 7], "texture": "#o"},
"west": {"uv": [14.375, 1, 16, 7], "texture": "#o"},
"down": {"uv": [1.5, 0, 3.5, 1.625], "texture": "#o"}
}
},
{
"from": [3.5, 14, 14.375],
"to": [12.5, 15, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [10.25, 8, 8]},
"faces": {
"north": {"uv": [3.5, 1, 12.5, 2], "texture": "#o"},
"east": {"uv": [0, 1, 1.625, 2], "texture": "#o"},
"south": {"uv": [3.5, 1, 12.5, 2], "texture": "#o"},
"west": {"uv": [14.375, 1, 16, 2], "texture": "#o"},
"down": {"uv": [3.5, 0, 12.5, 1.625], "texture": "#o"}
}
},
{
"from": [1.5, 14, 5.5],
"to": [14.5, 15, 14.375],
"rotation": {"angle": 0, "axis": "y", "origin": [10.25, 8, 3]},
"faces": {
"north": {"uv": [1.5, 1, 14.5, 2], "texture": "#o"},
"east": {"uv": [1.625, 1, 10.5, 2], "texture": "#o"},
"south": {"uv": [1.5, 1, 14.5, 2], "texture": "#o"},
"west": {"uv": [5.5, 1, 14.375, 2], "texture": "#o"},
"down": {"uv": [1.5, 1.625, 14.5, 10.5], "texture": "#o"}
}
},
{
"from": [12.5, 9, 14.25],
"to": [14.5, 15, 16],
"faces": {
"north": {"uv": [1.5, 1, 3.5, 7], "texture": "#o"},
"east": {"uv": [0, 1, 1.75, 7], "texture": "#o"},
"south": {"uv": [12.5, 1, 14.5, 7], "texture": "#o"},
"west": {"uv": [14.25, 1, 16, 7], "texture": "#o"},
"down": {"uv": [12.5, 0, 14.5, 1.75], "texture": "#o"}
}
}
],
"display": {
"thirdperson_righthand": {
"rotation": [-8, 154, 97],
"translation": [-1.75, -1.75, -2.25],
"scale": [0.4, 0.4, 0.4]
},
"firstperson_righthand": {
"rotation": [-2, -59, -46],
"translation": [0, -0.75, 0],
"scale": [0.5, 0.5, 0.5]
},
"ground": {
"scale": [0.2, 0.2, 0.2]
},
"gui": {
"rotation": [30, 225, 0],
"translation": [0.75, -4.5, -3],
"scale": [0.7, 0.7, 0.7]
},
"fixed": {
"translation": [0, 0, -3.75],
"scale": [0.5, 0.5, 0.5]
}
}
}

View file

@ -0,0 +1,28 @@
{
"conditions": [
{
"type": "engineersdecor:grc",
"result": "engineersdecor:steel_mesh_fence",
"required": ["engineersdecor:thin_steel_pole"]
}
],
"type": "minecraft:crafting_shaped",
"pattern": [
"PNP",
"PNP"
],
"key": {
"P": {
"item": "engineersdecor:thin_steel_pole",
"data": 0
},
"N": {
"item": "minecraft:iron_nugget",
"data": 0
}
},
"result": {
"item": "engineersdecor:steel_mesh_fence",
"count": 6
}
}

View file

@ -0,0 +1,23 @@
{
"conditions": [
{
"type": "engineersdecor:grc",
"result": "engineersdecor:treated_wood_broad_windowsill",
"required": ["engineersdecor:treated_wood_windowsill"]
}
],
"type": "minecraft:crafting_shaped",
"pattern": [
"WW"
],
"key": {
"W": {
"item": "engineersdecor:treated_wood_windowsill",
"data": 0
}
},
"result": {
"item": "engineersdecor:treated_wood_broad_windowsill",
"count": 2
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 388 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 B

View file

@ -7,7 +7,7 @@
"mcversion": "${mcversion}",
"url": "https://github.com/stfwi/engineers-decor/",
"authorList": ["wile"],
"credits": "BluSunrize, malte0811, et al., the Forge Smiths, the Modders of the World.",
"credits": "BluSunrize, Damien Hazard, malte0811, et al., the Forge Smiths, the Modders of the World.",
"logoFile": "assets/engineersdecor/logo.png",
"screenshots": [],
"useDependencyInformation": false,