Fixed Double-T support thick steel pole connection. Concrete and Clinker walls connect to windows and glass panes.

This commit is contained in:
stfwi 2020-09-13 14:53:56 +02:00
parent 3efa21e1b6
commit 16ad286f59
9 changed files with 67 additions and 31 deletions

View file

@ -93,14 +93,18 @@ def reobfArtifact = artifacts.add('default', reobfFile) { type 'jar'; builtBy 'r
def signing = { ->
def sp = new Properties()
sp.keystore_file = project.keystore_file
sp.keystore_alias = project.keystore_alias
sp.keystore_pass = project.keystore_pass
sp.keystore_keypass = project.keystore_keypass
sp.fingerprint_sha1 = project.fingerprint_sha1
if(project.hasProperty("keystore_file")) {
sp.keystore_file = project.keystore_file
sp.keystore_alias = project.keystore_alias
sp.keystore_pass = project.keystore_pass
sp.keystore_keypass = project.keystore_keypass
sp.fingerprint_sha1 = project.fingerprint_sha1
} else {
logger.warn("[WARNING] No signing data available.")
}
if(file("signing.properties").exists()) file("signing.properties").withInputStream { sp.load(it) }
return sp
}();
}()
task signJar(type: SignJar, dependsOn: jar) {
onlyIf { signing.hasProperty("keystore_file") }
if(signing.hasProperty("keystore_file")) {

View file

@ -5,4 +5,4 @@ version_minecraft=1.16.3
version_forge_minecraft=1.16.3-34.0.1
version_fml_mappings=20200723-1.16.1
version_jei=1.16.3:7.1.3.19
version_engineersdecor=1.1.2-b7
version_engineersdecor=1.1.2-b8

View file

@ -1,6 +1,7 @@
{
"homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/",
"1.16.3": {
"1.1.2-b8": "[F] Fixed Double-T support thick steel pole connection (thx @CastCrafter).\n[A] Concrete and Clinker walls connect to windows and glass panes.",
"1.1.2-b7": "[U] Ported to MC1.16.3.\n[F] Roof lighting improved.",
"1.1.2-b6": "[A] Signs added: Generic Caution, Magical Hazard, Radioactive Hazard, Laser Hazard, Fire Hazard, Caution Hot Surface, Magnetic Field Caution, Frost Warning.\n[A] Water Freezer added (generates Ice, Packed Ice, Blue Ice from water).\n[F] Mineral Smelter GUI model facing fixed.\n[M] Hatch handling improved.\n[M] Ladder fast-move improved.\n[F] Roof Chimney Trunk shape hollow to allow feeding IE Wire power over the roof into the building.\n[A] Roof Chimney added (smoking offset for Dark Shingle Roof Chimney Trunk block).\n[A] Metal Bar (ingredient item) added to circumvent recipe collisions with other mods.\n[M] Recipes for metallic blocks modified accordingly to depend on Metal Bars.",
"1.1.2-b5": "[A] Sandstone Ornamented Clinker Brick added.\n[A] Old Industrial Wood Planks/Stairs/Slabs/Slab Slices added.\n[A] Old Industrial Wood Door added.\n[M] Wood textures made slightly darker.\n[F] Milking Machine fluid transfer re-added (thx gebcrafter).\n[F] Fluid Barrel status overlay message format fixed.\n[F] Fixed missing Dense Grit Dirt loot table (issue #124, thx vaelzan).",
@ -10,7 +11,7 @@
"1.1.2-b1": "[U] Ported to MC1.16.2."
},
"promos": {
"1.16.3-recommended": "1.1.2-b7",
"1.16.3-latest": "1.1.2-b7"
"1.16.3-recommended": "1.1.2-b8",
"1.16.3-latest": "1.1.2-b8"
}
}

View file

@ -11,6 +11,9 @@ Mod sources for Minecraft version 1.16.3.
## Version history
- v1.1.2-b8 [F] Fixed Double-T support thick steel pole connection (thx @CastCrafter).
[A] Concrete and Clinker walls connect to windows and glass panes.
- v1.1.2-b7 [U] Ported to MC1.16.3.
[F] Roof lighting improved.

View file

@ -484,7 +484,10 @@ public class ModContent
public static final EdHorizontalSupportBlock STEEL_DOUBLE_T_SUPPORT = (EdHorizontalSupportBlock)(new EdHorizontalSupportBlock(
DecorBlock.CFG_CUTOUT|DecorBlock.CFG_HORIZIONTAL|DecorBlock.CFG_LOOK_PLACEMENT,
Block.Properties.create(Material.IRON, MaterialColor.IRON).hardnessAndResistance(2f, 15f).sound(SoundType.METAL).notSolid(),
Auxiliaries.getPixeledAABB(5,11,0, 11,16,16)
Auxiliaries.getPixeledAABB( 5,11,0, 11,16,16), // main beam
Auxiliaries.getPixeledAABB(10,11,5, 16,16,11), // east beam (also for west 180deg)
Auxiliaries.getPixeledAABB( 6, 0,6, 10,16,10), // down thin
Auxiliaries.getPixeledAABB( 5, 0,5, 11,16,11) // down thick
)).setRegistryName(new ResourceLocation(MODID, "steel_double_t_support"));
// -------------------------------------------------------------------------------------------------------------------

View file

@ -9,12 +9,9 @@
*/
package wile.engineersdecor.blocks;
import net.minecraft.entity.EntitySpawnPlacementRegistry;
import wile.engineersdecor.ModContent;
import wile.engineersdecor.libmc.detail.Auxiliaries;
import net.minecraft.entity.EntityType;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.block.Block;
import net.minecraft.entity.EntitySpawnPlacementRegistry;
import net.minecraft.entity.EntityType;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.state.BooleanProperty;
import net.minecraft.state.IntegerProperty;
@ -22,15 +19,20 @@ import net.minecraft.state.StateContainer;
import net.minecraft.util.*;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.util.math.shapes.VoxelShapes;
import net.minecraft.util.math.shapes.IBooleanFunction;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorld;
import net.minecraft.world.World;
import net.minecraft.block.BlockState;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import wile.engineersdecor.ModContent;
import wile.engineersdecor.libmc.detail.Auxiliaries;
import javax.annotation.Nullable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
public class EdHorizontalSupportBlock extends DecorBlock.WaterLoggable implements IDecorBlock
@ -39,19 +41,29 @@ public class EdHorizontalSupportBlock extends DecorBlock.WaterLoggable implement
public static final BooleanProperty LEFTBEAM = BooleanProperty.create("leftbeam");
public static final BooleanProperty RIGHTBEAM = BooleanProperty.create("rightbeam");
public static final IntegerProperty DOWNCONNECT = IntegerProperty.create("downconnect", 0, 2);
protected final ArrayList<VoxelShape> AABBs;
protected final Map<BlockState, VoxelShape> AABBs;
public EdHorizontalSupportBlock(long config, Block.Properties builder, final AxisAlignedBB unrotatedAABB)
public EdHorizontalSupportBlock(long config, Block.Properties builder, final AxisAlignedBB mainBeamAABB, final AxisAlignedBB eastBeamAABB, final AxisAlignedBB thinDownBeamAABB, final AxisAlignedBB thickDownBeamAABB)
{
super(config|DecorBlock.CFG_HORIZIONTAL, builder);
AABBs = new ArrayList<VoxelShape>(Arrays.asList(
// Effective bounding box
VoxelShapes.create(Auxiliaries.getRotatedAABB(unrotatedAABB.grow(2.0/16, 0, 0), Direction.NORTH, true)),
VoxelShapes.create(Auxiliaries.getRotatedAABB(unrotatedAABB.grow(2.0/16, 0, 0), Direction.WEST, true)),
// Displayed bounding box
VoxelShapes.create(Auxiliaries.getRotatedAABB(unrotatedAABB, Direction.NORTH, true)),
VoxelShapes.create(Auxiliaries.getRotatedAABB(unrotatedAABB, Direction.WEST, true))
));
Map<BlockState, VoxelShape> aabbs = new HashMap<>();
for(boolean eastwest:EASTWEST.getAllowedValues()) {
for(boolean leftbeam:LEFTBEAM.getAllowedValues()) {
for(boolean rightbeam:RIGHTBEAM.getAllowedValues()) {
for(int downconnect:DOWNCONNECT.getAllowedValues()) {
final BlockState state = getDefaultState().with(EASTWEST, eastwest).with(LEFTBEAM, leftbeam).with(RIGHTBEAM, rightbeam).with(DOWNCONNECT, downconnect);
VoxelShape shape = VoxelShapes.create(Auxiliaries.getRotatedAABB(mainBeamAABB, eastwest?Direction.EAST:Direction.NORTH, true));
if(rightbeam) shape = VoxelShapes.combine(shape, VoxelShapes.create(Auxiliaries.getRotatedAABB(eastBeamAABB, eastwest?Direction.EAST:Direction.NORTH, true)), IBooleanFunction.OR);
if(leftbeam) shape = VoxelShapes.combine(shape, VoxelShapes.create(Auxiliaries.getRotatedAABB(eastBeamAABB, eastwest?Direction.WEST:Direction.SOUTH, true)), IBooleanFunction.OR);
if(downconnect==1) shape = VoxelShapes.combine(shape, VoxelShapes.create(thinDownBeamAABB), IBooleanFunction.OR);
if(downconnect==2) shape = VoxelShapes.combine(shape, VoxelShapes.create(thickDownBeamAABB), IBooleanFunction.OR);
aabbs.put(state.with(WATERLOGGED, false), shape);
aabbs.put(state.with(WATERLOGGED, true), shape);
}
}
}
}
AABBs = aabbs;
}
@Override
@ -68,7 +80,7 @@ public class EdHorizontalSupportBlock extends DecorBlock.WaterLoggable implement
@Override
public VoxelShape getShape(BlockState state, IBlockReader source, BlockPos pos, ISelectionContext selectionContext)
{ return AABBs.get(state.get(EASTWEST) ? 0x1 : 0x0); }
{ return AABBs.get(state); }
@Override
public VoxelShape getCollisionShape(BlockState state, IBlockReader world, BlockPos pos, ISelectionContext selectionContext)

View file

@ -8,11 +8,24 @@
*/
package wile.engineersdecor.blocks;
import wile.engineersdecor.libmc.blocks.VariantWallBlock;
import net.minecraft.block.*;
import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IWorldReader;
import wile.engineersdecor.libmc.blocks.VariantWallBlock;
public class EdWallBlock extends VariantWallBlock implements IDecorBlock
{
public EdWallBlock(long config, Block.Properties builder)
{ super(config, builder); }
protected boolean attachesTo(BlockState facingState, IWorldReader world, BlockPos facingPos, Direction side)
{
if(facingState==null) return false;
if(super.attachesTo(facingState, world, facingPos, side)) return true;
if(facingState.getBlock() instanceof EdWindowBlock) return true;
if(facingState.getBlock() instanceof PaneBlock) return true;
return false;
}
}

View file

@ -132,7 +132,7 @@ public class VariantWallBlock extends WallBlock implements StandardBlocks.IStand
protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder)
{ super.fillStateContainer(builder); builder.add(TEXTURE_VARIANT); }
private boolean attachesTo(BlockState facingState, IWorldReader world, BlockPos facingPos, Direction side)
protected boolean attachesTo(BlockState facingState, IWorldReader world, BlockPos facingPos, Direction side)
{
final Block block = facingState.getBlock();
if((block instanceof FenceGateBlock) || (block instanceof WallBlock)) return true;

View file

@ -14,6 +14,6 @@
},{ "when": { "downconnect" : "1" },
"apply": { "model": "engineersdecor:block/hsupport/steel_double_t_support_xconnect_thin_pole_model" }
},{ "when": { "downconnect" : "2" },
"apply": { "model": "engineersdecor:block/hsupport/steel_double_t_support_xconnect_thin_pole_model" }
"apply": { "model": "engineersdecor:block/hsupport/steel_double_t_support_xconnect_thick_pole_model" }
}
]}