Metal Sliding Door added. Disabled injected buttons from other mods in container GUIs. Tree Cutter volume tracking restrictions relaxed to support trees with more branching.
This commit is contained in:
parent
ed54eea0bd
commit
48748a25c5
34 changed files with 732 additions and 79 deletions
|
@ -5,4 +5,4 @@ version_minecraft=1.16.3
|
|||
version_forge_minecraft=1.16.3-34.1.0
|
||||
version_fml_mappings=20200723-1.16.1
|
||||
version_jei=1.16.3:7.3.2.36
|
||||
version_engineersdecor=1.1.3-b2
|
||||
version_engineersdecor=1.1.3-b3
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/",
|
||||
"1.16.3": {
|
||||
"1.1.3-b3": "[A] Metal Sliding Door added (double door wing style).\n[A] Doors implicitly open/close adjacent wings of double doors.\n[A] Disabled injected buttons from other mods in container GUIs.\n[A] Mob spawning on Rebar/Gas Concrete inhibited (IE Concrete Compliancy).\n[M] Small Tree Cutter chopping improved (loosened tree volume search restrictions).",
|
||||
"1.1.3-b2": "[A] Crafting table shift/ctrl click item move actions tweaked to new metal slot design.\n[A] Factory Dropper and Block Placer now also support quick-move-all (shift-ctrl-click).\n[F] Fixed Small Lab Furnace speed boost factor (with IE Heater in aux slot).",
|
||||
"1.1.3-b1": "[A] The Factory Block Breaker can insert items into Hoppers underneath it (issue #121, winsrp).\n[F] Help tooltips manually wrapped.\n[F] Fixed Labeled Crate item name persistence (issue #127, ty inqie).\n[F] Help text typo fixed (issue #129, ty Smollet777).",
|
||||
"1.1.2": "[U] Updated to Forge 1.16.3-34.1.0.\n[A] Added Factory Hopper insertion/extraction for entities like Minecarts (issue #125, ty boneskull).",
|
||||
|
@ -15,6 +16,6 @@
|
|||
},
|
||||
"promos": {
|
||||
"1.16.3-recommended": "1.1.2",
|
||||
"1.16.3-latest": "1.1.3-b2"
|
||||
"1.16.3-latest": "1.1.3-b3"
|
||||
}
|
||||
}
|
|
@ -11,6 +11,12 @@ Mod sources for Minecraft version 1.16.3.
|
|||
|
||||
## Version history
|
||||
|
||||
- v1.1.3-b3 [A] Metal Sliding Door added (double door wing style).
|
||||
[A] Doors implicitly open/close adjacent wings of double doors.
|
||||
[A] Disabled injected buttons from other mods in container GUIs.
|
||||
[A] Mob spawning on Rebar/Gas Concrete inhibited (IE Concrete Compliancy).
|
||||
[M] Small Tree Cutter chopping improved (loosened tree volume search restrictions).
|
||||
|
||||
- v1.1.3-b2 [A] Crafting table shift/ctrl click item move actions tweaked to new metal slot design.
|
||||
[A] Factory Dropper and Block Placer now also support quick-move-all (shift-ctrl-click).
|
||||
[F] Fixed Small Lab Furnace speed boost factor (with IE Heater in aux slot).
|
||||
|
|
|
@ -12,15 +12,10 @@
|
|||
*/
|
||||
package wile.engineersdecor;
|
||||
|
||||
import wile.engineersdecor.blocks.*;
|
||||
import wile.engineersdecor.blocks.EdFurnace.FurnaceBlock;
|
||||
import wile.engineersdecor.blocks.EdFurnace.FurnaceContainer;
|
||||
import wile.engineersdecor.blocks.EdFurnace.FurnaceGui;
|
||||
import wile.engineersdecor.blocks.EdFurnace.FurnaceTileEntity;
|
||||
import wile.engineersdecor.items.EdItem;
|
||||
import wile.engineersdecor.libmc.blocks.StandardBlocks;
|
||||
import wile.engineersdecor.libmc.blocks.StandardBlocks.IStandardBlock;
|
||||
import wile.engineersdecor.libmc.detail.Auxiliaries;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.util.SoundEvents;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.block.material.MaterialColor;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.SoundType;
|
||||
|
@ -47,6 +42,16 @@ import net.minecraftforge.fml.client.registry.RenderingRegistry;
|
|||
import net.minecraftforge.fml.client.registry.ClientRegistry;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import wile.engineersdecor.blocks.*;
|
||||
import wile.engineersdecor.blocks.EdFurnace.FurnaceBlock;
|
||||
import wile.engineersdecor.blocks.EdFurnace.FurnaceContainer;
|
||||
import wile.engineersdecor.blocks.EdFurnace.FurnaceGui;
|
||||
import wile.engineersdecor.blocks.EdFurnace.FurnaceTileEntity;
|
||||
import wile.engineersdecor.items.EdItem;
|
||||
import wile.engineersdecor.libmc.blocks.StandardBlocks;
|
||||
import wile.engineersdecor.libmc.blocks.StandardBlocks.IStandardBlock;
|
||||
import wile.engineersdecor.libmc.detail.Auxiliaries;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
@ -60,6 +65,10 @@ public class ModContent
|
|||
{
|
||||
private static final String MODID = ModEngineersDecor.MODID;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
private static Boolean disallowSpawn(BlockState state, IBlockReader reader, BlockPos pos, EntityType<?> entity) { return false; }
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
// Blocks
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -134,86 +143,86 @@ public class ModContent
|
|||
|
||||
public static final DecorBlock.Normal REBAR_CONCRETE_BLOCK = (DecorBlock.Normal)(new DecorBlock.Normal(
|
||||
DecorBlock.CFG_DEFAULT,
|
||||
Block.Properties.create(Material.ROCK, MaterialColor.STONE).hardnessAndResistance(5f, 2000f).sound(SoundType.STONE)
|
||||
Block.Properties.create(Material.ROCK, MaterialColor.STONE).hardnessAndResistance(5f, 2000f).sound(SoundType.STONE).setAllowsSpawn(ModContent::disallowSpawn)
|
||||
)).setRegistryName(new ResourceLocation(MODID, "rebar_concrete"));
|
||||
|
||||
public static final EdSlabBlock REBAR_CONCRETE_SLAB = (EdSlabBlock)(new EdSlabBlock(
|
||||
DecorBlock.CFG_DEFAULT,
|
||||
Block.Properties.create(Material.ROCK, MaterialColor.STONE).hardnessAndResistance(5f, 2000f).sound(SoundType.STONE)
|
||||
Block.Properties.create(Material.ROCK, MaterialColor.STONE).hardnessAndResistance(5f, 2000f).sound(SoundType.STONE).setAllowsSpawn(ModContent::disallowSpawn)
|
||||
)).setRegistryName(new ResourceLocation(MODID, "rebar_concrete_slab"));
|
||||
|
||||
public static final EdStairsBlock REBAR_CONCRETE_STAIRS = (EdStairsBlock)(new EdStairsBlock(
|
||||
DecorBlock.CFG_DEFAULT,
|
||||
REBAR_CONCRETE_BLOCK.getDefaultState(),
|
||||
Block.Properties.create(Material.ROCK, MaterialColor.STONE).hardnessAndResistance(5f, 2000f).sound(SoundType.STONE)
|
||||
Block.Properties.create(Material.ROCK, MaterialColor.STONE).hardnessAndResistance(5f, 2000f).sound(SoundType.STONE).setAllowsSpawn(ModContent::disallowSpawn)
|
||||
)).setRegistryName(new ResourceLocation(MODID, "rebar_concrete_stairs"));
|
||||
|
||||
public static final EdWallBlock REBAR_CONCRETE_WALL = (EdWallBlock)(new EdWallBlock(
|
||||
DecorBlock.CFG_DEFAULT,
|
||||
Block.Properties.create(Material.ROCK, MaterialColor.STONE).hardnessAndResistance(5f, 2000f).sound(SoundType.STONE)
|
||||
Block.Properties.create(Material.ROCK, MaterialColor.STONE).hardnessAndResistance(5f, 2000f).sound(SoundType.STONE).setAllowsSpawn(ModContent::disallowSpawn)
|
||||
)).setRegistryName(new ResourceLocation(MODID, "rebar_concrete_wall"));
|
||||
|
||||
public static final EdSlabSliceBlock HALFSLAB_REBARCONCRETE = (EdSlabSliceBlock)(new EdSlabSliceBlock(
|
||||
DecorBlock.CFG_CUTOUT,
|
||||
Block.Properties.create(Material.ROCK, MaterialColor.STONE).hardnessAndResistance(5f, 2000f).sound(SoundType.STONE)
|
||||
Block.Properties.create(Material.ROCK, MaterialColor.STONE).hardnessAndResistance(5f, 2000f).sound(SoundType.STONE).setAllowsSpawn(ModContent::disallowSpawn)
|
||||
)).setRegistryName(new ResourceLocation(MODID, "halfslab_rebar_concrete"));
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
public static final DecorBlock.Normal GAS_CONCRETE_BLOCK = (DecorBlock.Normal)(new DecorBlock.Normal(
|
||||
DecorBlock.CFG_DEFAULT,
|
||||
Block.Properties.create(Material.ROCK, MaterialColor.STONE).hardnessAndResistance(1.5f, 10f).sound(SoundType.STONE)
|
||||
Block.Properties.create(Material.ROCK, MaterialColor.STONE).hardnessAndResistance(1.5f, 10f).sound(SoundType.STONE).setAllowsSpawn(ModContent::disallowSpawn)
|
||||
)).setRegistryName(new ResourceLocation(MODID, "gas_concrete"));
|
||||
|
||||
public static final EdSlabBlock GAS_CONCRETE_SLAB = (EdSlabBlock)(new EdSlabBlock(
|
||||
DecorBlock.CFG_DEFAULT,
|
||||
Block.Properties.create(Material.ROCK, MaterialColor.STONE).hardnessAndResistance(1.5f, 10f).sound(SoundType.STONE)
|
||||
Block.Properties.create(Material.ROCK, MaterialColor.STONE).hardnessAndResistance(1.5f, 10f).sound(SoundType.STONE).setAllowsSpawn(ModContent::disallowSpawn)
|
||||
)).setRegistryName(new ResourceLocation(MODID, "gas_concrete_slab"));
|
||||
|
||||
public static final EdStairsBlock GAS_CONCRETE_STAIRS = (EdStairsBlock)(new EdStairsBlock(
|
||||
DecorBlock.CFG_DEFAULT,
|
||||
REBAR_CONCRETE_BLOCK.getDefaultState(),
|
||||
Block.Properties.create(Material.ROCK, MaterialColor.STONE).hardnessAndResistance(1.5f, 10f).sound(SoundType.STONE)
|
||||
Block.Properties.create(Material.ROCK, MaterialColor.STONE).hardnessAndResistance(1.5f, 10f).sound(SoundType.STONE).setAllowsSpawn(ModContent::disallowSpawn)
|
||||
)).setRegistryName(new ResourceLocation(MODID, "gas_concrete_stairs"));
|
||||
|
||||
public static final EdWallBlock GAS_CONCRETE_WALL = (EdWallBlock)(new EdWallBlock(
|
||||
DecorBlock.CFG_DEFAULT,
|
||||
Block.Properties.create(Material.ROCK, MaterialColor.STONE).hardnessAndResistance(1.5f, 10f).sound(SoundType.STONE)
|
||||
Block.Properties.create(Material.ROCK, MaterialColor.STONE).hardnessAndResistance(1.5f, 10f).sound(SoundType.STONE).setAllowsSpawn(ModContent::disallowSpawn)
|
||||
)).setRegistryName(new ResourceLocation(MODID, "gas_concrete_wall"));
|
||||
|
||||
public static final EdSlabSliceBlock HALFSLAB_GASCONCRETE = (EdSlabSliceBlock)(new EdSlabSliceBlock(
|
||||
DecorBlock.CFG_CUTOUT,
|
||||
Block.Properties.create(Material.ROCK, MaterialColor.STONE).hardnessAndResistance(1.5f, 10f).sound(SoundType.STONE)
|
||||
Block.Properties.create(Material.ROCK, MaterialColor.STONE).hardnessAndResistance(1.5f, 10f).sound(SoundType.STONE).setAllowsSpawn(ModContent::disallowSpawn)
|
||||
)).setRegistryName(new ResourceLocation(MODID, "halfslab_gas_concrete"));
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
public static final DecorBlock.Normal REBAR_CONCRETE_TILE = (DecorBlock.Normal)(new DecorBlock.Normal(
|
||||
DecorBlock.CFG_DEFAULT,
|
||||
Block.Properties.create(Material.ROCK, MaterialColor.STONE).hardnessAndResistance(5f, 2000f).sound(SoundType.STONE)
|
||||
Block.Properties.create(Material.ROCK, MaterialColor.STONE).hardnessAndResistance(5f, 2000f).sound(SoundType.STONE).setAllowsSpawn(ModContent::disallowSpawn)
|
||||
)).setRegistryName(new ResourceLocation(MODID, "rebar_concrete_tile"));
|
||||
|
||||
public static final EdSlabBlock REBAR_CONCRETE_TILE_SLAB = (EdSlabBlock)(new EdSlabBlock(
|
||||
DecorBlock.CFG_DEFAULT,
|
||||
Block.Properties.create(Material.ROCK, MaterialColor.STONE).hardnessAndResistance(5f, 2000f).sound(SoundType.STONE)
|
||||
Block.Properties.create(Material.ROCK, MaterialColor.STONE).hardnessAndResistance(5f, 2000f).sound(SoundType.STONE).setAllowsSpawn(ModContent::disallowSpawn)
|
||||
)).setRegistryName(new ResourceLocation(MODID, "rebar_concrete_tile_slab"));
|
||||
|
||||
public static final EdStairsBlock REBAR_CONCRETE_TILE_STAIRS = (EdStairsBlock)(new EdStairsBlock(
|
||||
DecorBlock.CFG_DEFAULT,
|
||||
REBAR_CONCRETE_TILE.getDefaultState(),
|
||||
Block.Properties.create(Material.ROCK, MaterialColor.STONE).hardnessAndResistance(5f, 2000f).sound(SoundType.STONE)
|
||||
Block.Properties.create(Material.ROCK, MaterialColor.STONE).hardnessAndResistance(5f, 2000f).sound(SoundType.STONE).setAllowsSpawn(ModContent::disallowSpawn)
|
||||
)).setRegistryName(new ResourceLocation(MODID, "rebar_concrete_tile_stairs"));
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
public static final EdGlassBlock PANZERGLASS_BLOCK = (EdGlassBlock)(new EdGlassBlock(
|
||||
DecorBlock.CFG_TRANSLUCENT,
|
||||
Block.Properties.create(Material.GLASS, MaterialColor.AIR).hardnessAndResistance(0.7f, 2000f).sound(SoundType.METAL).notSolid()
|
||||
Block.Properties.create(Material.GLASS, MaterialColor.AIR).hardnessAndResistance(0.7f, 2000f).sound(SoundType.METAL).notSolid().setAllowsSpawn(ModContent::disallowSpawn)
|
||||
)).setRegistryName(new ResourceLocation(MODID, "panzerglass_block"));
|
||||
|
||||
public static final EdSlabBlock PANZERGLASS_SLAB = (EdSlabBlock)(new EdSlabBlock(
|
||||
DecorBlock.CFG_TRANSLUCENT,
|
||||
Block.Properties.create(Material.IRON, MaterialColor.IRON).hardnessAndResistance(0.7f, 2000f).sound(SoundType.METAL).notSolid()
|
||||
Block.Properties.create(Material.IRON, MaterialColor.IRON).hardnessAndResistance(0.7f, 2000f).sound(SoundType.METAL).notSolid().setAllowsSpawn(ModContent::disallowSpawn)
|
||||
)).setRegistryName(new ResourceLocation(MODID, "panzerglass_slab"));
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -299,6 +308,14 @@ public class ModContent
|
|||
Auxiliaries.getPixeledAABB(0.5,1,0, 15.5,14.,2)
|
||||
)).setRegistryName(new ResourceLocation(MODID, "iron_hatch"));
|
||||
|
||||
public static final EdDoorBlock METAL_SLIDING_DOOR = (EdDoorBlock)(new EdDoorBlock(
|
||||
DecorBlock.CFG_TRANSLUCENT|DecorBlock.CFG_HORIZIONTAL,
|
||||
Block.Properties.create(Material.IRON, MaterialColor.IRON).hardnessAndResistance(1.5f, 12f).sound(SoundType.METAL).notSolid(),
|
||||
Auxiliaries.getPixeledAABB(15,0,7, 16,16,9),
|
||||
Auxiliaries.getPixeledAABB( 0,0,7, 16,16,9),
|
||||
SoundEvents.BLOCK_IRON_DOOR_OPEN, SoundEvents.BLOCK_IRON_DOOR_CLOSE
|
||||
)).setRegistryName(new ResourceLocation(MODID, "metal_sliding_door"));
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
public static final DecorBlock.Normal OLD_INDUSTRIAL_PLANKS = (DecorBlock.Normal)(new DecorBlock.Normal(
|
||||
|
@ -324,7 +341,8 @@ public class ModContent
|
|||
|
||||
public static final EdDoorBlock OLD_INDUSTRIAL_WOOD_DOOR = (EdDoorBlock)(new EdDoorBlock(
|
||||
DecorBlock.CFG_DEFAULT,
|
||||
Block.Properties.create(Material.WOOD, MaterialColor.WOOD).hardnessAndResistance(1.5f, 12f).sound(SoundType.WOOD).notSolid()
|
||||
Block.Properties.create(Material.WOOD, MaterialColor.WOOD).hardnessAndResistance(1.5f, 12f).sound(SoundType.WOOD).notSolid(),
|
||||
SoundEvents.BLOCK_WOODEN_DOOR_OPEN, SoundEvents.BLOCK_WOODEN_DOOR_CLOSE
|
||||
)).setRegistryName(new ResourceLocation(MODID, "old_industrial_wood_door"));
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -921,6 +939,7 @@ public class ModContent
|
|||
METAL_RUNG_LADDER,
|
||||
METAL_RUNG_STEPS,
|
||||
TREATED_WOOD_LADDER,
|
||||
METAL_SLIDING_DOOR,
|
||||
IRON_HATCH,
|
||||
OLD_INDUSTRIAL_PLANKS,
|
||||
OLD_INDUSTRIAL_SLAB,
|
||||
|
|
|
@ -34,7 +34,6 @@ import net.minecraft.util.math.MathHelper;
|
|||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.math.BlockRayTraceResult;
|
||||
import net.minecraft.util.text.StringTextComponent;
|
||||
import net.minecraft.client.gui.screen.inventory.ContainerScreen;
|
||||
import net.minecraft.client.gui.widget.button.ImageButton;
|
||||
import net.minecraft.client.gui.widget.button.Button;
|
||||
import net.minecraft.client.renderer.ItemRenderer;
|
||||
|
@ -48,6 +47,7 @@ import com.google.common.collect.ImmutableList;
|
|||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import wile.engineersdecor.ModContent;
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
import wile.engineersdecor.libmc.client.ContainerGui;
|
||||
import wile.engineersdecor.libmc.detail.Auxiliaries;
|
||||
import wile.engineersdecor.libmc.detail.Inventories;
|
||||
import wile.engineersdecor.libmc.detail.Inventories.InventoryRange;
|
||||
|
@ -1058,7 +1058,7 @@ public class EdCraftingTable
|
|||
//--------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public static class CraftingTableGui extends ContainerScreen<CraftingTableContainer>
|
||||
public static class CraftingTableGui extends ContainerGui<CraftingTableContainer>
|
||||
{
|
||||
protected static final ResourceLocation BACKGROUND = new ResourceLocation(ModEngineersDecor.MODID, "textures/gui/metal_crafting_table_gui.png");
|
||||
protected final PlayerEntity player;
|
||||
|
|
|
@ -4,19 +4,24 @@
|
|||
* @copyright (C) 2020 Stefan Wilhelm
|
||||
* @license MIT (see https://opensource.org/licenses/MIT)
|
||||
*
|
||||
* Door blocks.
|
||||
* Blocks representing centered doors opening by sliding
|
||||
* to the sides.
|
||||
*/
|
||||
package wile.engineersdecor.blocks;
|
||||
|
||||
import wile.engineersdecor.libmc.blocks.StandardDoorBlock;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IWorldReader;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.block.*;
|
||||
|
||||
import wile.engineersdecor.libmc.blocks.StandardDoorBlock;
|
||||
|
||||
public class EdDoorBlock extends StandardDoorBlock implements IDecorBlock
|
||||
{
|
||||
public EdDoorBlock(long config, Block.Properties properties, AxisAlignedBB open_aabb, AxisAlignedBB closed_aabb, SoundEvent open_sound, SoundEvent close_sound)
|
||||
{ super(config, properties, open_aabb, closed_aabb, open_sound, close_sound); }
|
||||
|
||||
public EdDoorBlock(long config, Block.Properties properties, SoundEvent open_sound, SoundEvent close_sound)
|
||||
{ super(config, properties, open_sound, close_sound); }
|
||||
|
||||
public EdDoorBlock(long config, Block.Properties properties)
|
||||
{ super(config, properties); }
|
||||
}
|
||||
|
|
|
@ -31,7 +31,6 @@ import net.minecraft.inventory.container.Container;
|
|||
import net.minecraft.inventory.container.Slot;
|
||||
import net.minecraft.inventory.container.INamedContainerProvider;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.client.gui.screen.inventory.ContainerScreen;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.util.math.*;
|
||||
import net.minecraft.util.math.shapes.ISelectionContext;
|
||||
|
@ -53,6 +52,7 @@ import com.mojang.blaze3d.systems.RenderSystem;
|
|||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import wile.engineersdecor.ModContent;
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
import wile.engineersdecor.libmc.client.ContainerGui;
|
||||
import wile.engineersdecor.libmc.detail.Auxiliaries;
|
||||
import wile.engineersdecor.libmc.detail.Inventories;
|
||||
import wile.engineersdecor.libmc.detail.Inventories.InventoryRange;
|
||||
|
@ -885,7 +885,7 @@ public class EdDropper
|
|||
//--------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public static class DropperGui extends ContainerScreen<DropperContainer>
|
||||
public static class DropperGui extends ContainerGui<DropperContainer>
|
||||
{
|
||||
protected final PlayerEntity player_;
|
||||
protected final TooltipDisplay tooltip_ = new TooltipDisplay();
|
||||
|
|
|
@ -10,10 +10,6 @@ package wile.engineersdecor.blocks;
|
|||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import net.minecraft.util.text.TranslationTextComponent;
|
||||
import wile.engineersdecor.ModContent;
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
import wile.engineersdecor.libmc.detail.Inventories;
|
||||
import wile.engineersdecor.libmc.detail.Networking;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.block.BlockState;
|
||||
|
@ -41,7 +37,6 @@ import net.minecraft.util.math.MathHelper;
|
|||
import net.minecraft.inventory.*;
|
||||
import net.minecraft.inventory.container.*;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.client.gui.screen.inventory.ContainerScreen;
|
||||
import net.minecraft.stats.Stats;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
@ -54,8 +49,13 @@ import net.minecraftforge.items.CapabilityItemHandler;
|
|||
import net.minecraftforge.items.IItemHandler;
|
||||
import net.minecraftforge.items.ItemHandlerHelper;
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import wile.engineersdecor.ModContent;
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
import wile.engineersdecor.libmc.detail.TooltipDisplay;
|
||||
import wile.engineersdecor.libmc.detail.TooltipDisplay.TipRange;
|
||||
import wile.engineersdecor.libmc.client.ContainerGui;
|
||||
import wile.engineersdecor.libmc.detail.Inventories;
|
||||
import wile.engineersdecor.libmc.detail.Networking;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
@ -782,7 +782,7 @@ public class EdElectricalFurnace
|
|||
//--------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public static class ElectricalFurnaceGui extends ContainerScreen<ElectricalFurnaceContainer>
|
||||
public static class ElectricalFurnaceGui extends ContainerGui<ElectricalFurnaceContainer>
|
||||
{
|
||||
protected final PlayerEntity player_;
|
||||
protected final TooltipDisplay tooltip_ = new TooltipDisplay();
|
||||
|
|
|
@ -12,6 +12,7 @@ import com.mojang.blaze3d.matrix.MatrixStack;
|
|||
import wile.engineersdecor.ModContent;
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
import wile.engineersdecor.detail.ExternalObjects;
|
||||
import wile.engineersdecor.libmc.client.ContainerGui;
|
||||
import wile.engineersdecor.libmc.detail.Inventories;
|
||||
import wile.engineersdecor.libmc.detail.Networking;
|
||||
import net.minecraft.tileentity.*;
|
||||
|
@ -19,7 +20,6 @@ import net.minecraft.inventory.container.*;
|
|||
import net.minecraft.item.crafting.AbstractCookingRecipe;
|
||||
import net.minecraft.item.crafting.IRecipeType;
|
||||
import net.minecraft.block.RedstoneTorchBlock;
|
||||
import net.minecraft.client.gui.screen.inventory.ContainerScreen;
|
||||
import net.minecraft.entity.item.ExperienceOrbEntity;
|
||||
import net.minecraft.item.crafting.FurnaceRecipe;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
|
@ -980,7 +980,7 @@ public class EdFurnace
|
|||
//--------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public static class FurnaceGui extends ContainerScreen<FurnaceContainer>
|
||||
public static class FurnaceGui extends ContainerGui<FurnaceContainer>
|
||||
{
|
||||
protected final PlayerEntity player_;
|
||||
|
||||
|
|
|
@ -36,7 +36,6 @@ import net.minecraft.util.math.shapes.ISelectionContext;
|
|||
import net.minecraft.util.math.shapes.VoxelShapes;
|
||||
import net.minecraft.util.text.*;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.client.gui.screen.inventory.ContainerScreen;
|
||||
import net.minecraftforge.fml.network.NetworkHooks;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
@ -49,6 +48,7 @@ import com.mojang.blaze3d.matrix.MatrixStack;
|
|||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import wile.engineersdecor.ModContent;
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
import wile.engineersdecor.libmc.client.ContainerGui;
|
||||
import wile.engineersdecor.libmc.detail.Auxiliaries;
|
||||
import wile.engineersdecor.libmc.detail.Inventories;
|
||||
import wile.engineersdecor.libmc.detail.Networking;
|
||||
|
@ -837,7 +837,7 @@ public class EdHopper
|
|||
//--------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public static class HopperGui extends ContainerScreen<HopperContainer>
|
||||
public static class HopperGui extends ContainerGui<HopperContainer>
|
||||
{
|
||||
protected final PlayerEntity player_;
|
||||
protected final TooltipDisplay tooltip_ = new TooltipDisplay();
|
||||
|
|
|
@ -11,6 +11,7 @@ package wile.engineersdecor.blocks;
|
|||
import wile.engineersdecor.ModContent;
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
import wile.engineersdecor.libmc.blocks.StandardBlocks;
|
||||
import wile.engineersdecor.libmc.client.ContainerGui;
|
||||
import wile.engineersdecor.libmc.detail.Auxiliaries;
|
||||
import wile.engineersdecor.libmc.detail.Inventories.InventoryRange;
|
||||
import wile.engineersdecor.libmc.detail.Networking;
|
||||
|
@ -42,7 +43,6 @@ import net.minecraft.util.text.ITextComponent;
|
|||
import net.minecraft.util.text.TranslationTextComponent;
|
||||
import net.minecraft.network.NetworkManager;
|
||||
import net.minecraft.network.play.server.SUpdateTileEntityPacket;
|
||||
import net.minecraft.client.gui.screen.inventory.ContainerScreen;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
@ -698,7 +698,7 @@ public class EdLabeledCrate
|
|||
//--------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public static class LabeledCrateGui extends ContainerScreen<LabeledCrateContainer>
|
||||
public static class LabeledCrateGui extends ContainerGui<LabeledCrateContainer>
|
||||
{
|
||||
protected final PlayerEntity player_;
|
||||
|
||||
|
|
|
@ -11,11 +11,6 @@ package wile.engineersdecor.blocks;
|
|||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import net.minecraft.inventory.container.ClickType;
|
||||
import net.minecraft.util.math.vector.Vector3d;
|
||||
import wile.engineersdecor.ModContent;
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
import wile.engineersdecor.libmc.detail.Auxiliaries;
|
||||
import wile.engineersdecor.libmc.detail.Inventories.InventoryRange;
|
||||
import wile.engineersdecor.libmc.detail.Networking;
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -35,7 +30,6 @@ import net.minecraft.inventory.*;
|
|||
import net.minecraft.inventory.container.INamedContainerProvider;
|
||||
import net.minecraft.inventory.container.Container;
|
||||
import net.minecraft.inventory.container.Slot;
|
||||
import net.minecraft.client.gui.screen.inventory.ContainerScreen;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.util.math.*;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
@ -57,6 +51,12 @@ import net.minecraftforge.fml.network.NetworkHooks;
|
|||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import wile.engineersdecor.libmc.detail.TooltipDisplay;
|
||||
import wile.engineersdecor.libmc.detail.TooltipDisplay.TipRange;
|
||||
import wile.engineersdecor.libmc.client.ContainerGui;
|
||||
import wile.engineersdecor.libmc.detail.Auxiliaries;
|
||||
import wile.engineersdecor.libmc.detail.Inventories.InventoryRange;
|
||||
import wile.engineersdecor.libmc.detail.Networking;
|
||||
import wile.engineersdecor.ModContent;
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
|
@ -738,7 +738,7 @@ public class EdPlacer
|
|||
//--------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public static class PlacerGui extends ContainerScreen<PlacerContainer>
|
||||
public static class PlacerGui extends ContainerGui<PlacerContainer>
|
||||
{
|
||||
protected final PlayerEntity player_;
|
||||
protected final TooltipDisplay tooltip_ = new TooltipDisplay();
|
||||
|
|
|
@ -9,10 +9,6 @@
|
|||
package wile.engineersdecor.blocks;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import wile.engineersdecor.ModContent;
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
import wile.engineersdecor.blocks.EdFurnace.FurnaceBlock;
|
||||
import wile.engineersdecor.libmc.detail.Inventories;
|
||||
import net.minecraft.inventory.container.INamedContainerProvider;
|
||||
import net.minecraft.tileentity.ITickableTileEntity;
|
||||
import net.minecraft.entity.player.ServerPlayerEntity;
|
||||
|
@ -36,7 +32,6 @@ import net.minecraft.nbt.CompoundNBT;
|
|||
import net.minecraft.util.SoundEvents;
|
||||
import net.minecraft.item.*;
|
||||
import net.minecraft.inventory.*;
|
||||
import net.minecraft.client.gui.screen.inventory.ContainerScreen;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
@ -53,6 +48,12 @@ import net.minecraftforge.items.CapabilityItemHandler;
|
|||
import net.minecraftforge.items.IItemHandler;
|
||||
import net.minecraftforge.items.ItemHandlerHelper;
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import wile.engineersdecor.ModContent;
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
import wile.engineersdecor.blocks.EdFurnace.FurnaceBlock;
|
||||
import wile.engineersdecor.libmc.client.ContainerGui;
|
||||
import wile.engineersdecor.libmc.detail.Inventories;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
|
@ -687,7 +688,7 @@ public class EdWasteIncinerator
|
|||
//--------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public static class WasteIncineratorGui extends ContainerScreen<WasteIncineratorContainer>
|
||||
public static class WasteIncineratorGui extends ContainerGui<WasteIncineratorContainer>
|
||||
{
|
||||
protected final PlayerEntity player_;
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ public class TreeCutting
|
|||
{
|
||||
if(world.isRemote || !isLog(broken_state)) return 0;
|
||||
final long ymin = startPos.getY();
|
||||
final long max_leaf_distance = 6;
|
||||
final long max_leaf_distance = 8;
|
||||
Set<BlockPos> checked = new HashSet<BlockPos>();
|
||||
ArrayList<BlockPos> to_break = new ArrayList<BlockPos>();
|
||||
ArrayList<BlockPos> to_decay = new ArrayList<BlockPos>();
|
||||
|
@ -89,7 +89,7 @@ public class TreeCutting
|
|||
LinkedList<BlockPos> upqueue = new LinkedList<BlockPos>();
|
||||
queue.add(startPos);
|
||||
int cutlevel = 0;
|
||||
int steps_left = 64;
|
||||
int steps_left = 128;
|
||||
while(!queue.isEmpty() && (--steps_left >= 0)) {
|
||||
final BlockPos pos = queue.removeFirst();
|
||||
// Vertical search
|
||||
|
@ -101,7 +101,7 @@ public class TreeCutting
|
|||
// Up is log
|
||||
upqueue.add(uppos);
|
||||
to_break.add(uppos);
|
||||
steps_left = 64;
|
||||
steps_left = 128;
|
||||
} else {
|
||||
boolean isleaf = isLeaves(upstate);
|
||||
if(isleaf || world.isAirBlock(uppos) || (upstate.getBlock() instanceof VineBlock)) {
|
||||
|
@ -128,13 +128,14 @@ public class TreeCutting
|
|||
final BlockPos p = pos.add(v);
|
||||
if(checked.contains(p)) continue;
|
||||
checked.add(p);
|
||||
if(p.distanceSq(new BlockPos(startPos.getX(), p.getY(), startPos.getZ())) > (3+cutlevel*cutlevel)) continue;
|
||||
if(p.distanceSq(new BlockPos(startPos.getX(), p.getY(), startPos.getZ())) > (cutlevel > 2 ? 256 : 9)) continue;
|
||||
final BlockState st = world.getBlockState(p);
|
||||
final Block bl = st.getBlock();
|
||||
if(isSameLog(st, broken_state)) {
|
||||
queue.add(p);
|
||||
to_break.add(p);
|
||||
} else if(isLeaves(st)) {
|
||||
queue.add(p);
|
||||
to_decay.add(p);
|
||||
}
|
||||
}
|
||||
|
@ -157,7 +158,7 @@ public class TreeCutting
|
|||
final ArrayList<BlockPos> leafs = to_decay;
|
||||
to_decay = new ArrayList<BlockPos>();
|
||||
for(BlockPos pos:leafs) {
|
||||
int dist = 2;
|
||||
int dist = 3;
|
||||
to_decay.add(pos);
|
||||
to_decay.addAll(findBlocksAround(world, pos, leaf_type_state, checked, dist));
|
||||
}
|
||||
|
|
|
@ -83,7 +83,15 @@ public class StandardBlocks
|
|||
enum RenderTypeHint { SOLID,CUTOUT,CUTOUT_MIPPED,TRANSLUCENT,TRANSLUCENT_NO_CRUMBLING }
|
||||
|
||||
default RenderTypeHint getRenderTypeHint()
|
||||
{ return RenderTypeHint.SOLID; }
|
||||
{ return getRenderTypeHint(config()); }
|
||||
|
||||
default RenderTypeHint getRenderTypeHint(long config)
|
||||
{
|
||||
if((config & CFG_CUTOUT)!=0) return RenderTypeHint.CUTOUT;
|
||||
if((config & CFG_MIPPED)!=0) return RenderTypeHint.CUTOUT_MIPPED;
|
||||
if((config & CFG_TRANSLUCENT)!=0) return RenderTypeHint.TRANSLUCENT;
|
||||
return RenderTypeHint.SOLID;
|
||||
}
|
||||
}
|
||||
|
||||
public interface IBlockItemFactory
|
||||
|
@ -136,12 +144,7 @@ public class StandardBlocks
|
|||
|
||||
@Override
|
||||
public RenderTypeHint getRenderTypeHint()
|
||||
{
|
||||
if((config & CFG_CUTOUT)!=0) return RenderTypeHint.CUTOUT;
|
||||
if((config & CFG_MIPPED)!=0) return RenderTypeHint.CUTOUT_MIPPED;
|
||||
if((config & CFG_TRANSLUCENT)!=0) return RenderTypeHint.TRANSLUCENT;
|
||||
return RenderTypeHint.SOLID;
|
||||
}
|
||||
{ return getRenderTypeHint(config); }
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
|
|
|
@ -10,13 +10,24 @@ package wile.engineersdecor.libmc.blocks;
|
|||
|
||||
import net.minecraft.entity.EntitySpawnPlacementRegistry;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.state.properties.DoorHingeSide;
|
||||
import net.minecraft.state.properties.DoubleBlockHalf;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.util.Direction.Axis;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockRayTraceResult;
|
||||
import net.minecraft.util.math.shapes.ISelectionContext;
|
||||
import net.minecraft.util.math.shapes.VoxelShape;
|
||||
import net.minecraft.util.math.shapes.VoxelShapes;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import wile.engineersdecor.libmc.detail.Auxiliaries;
|
||||
|
@ -27,10 +38,74 @@ import java.util.List;
|
|||
|
||||
public class StandardDoorBlock extends DoorBlock implements StandardBlocks.IStandardBlock
|
||||
{
|
||||
private final long config;
|
||||
private final long config_;
|
||||
protected final VoxelShape shapes_[][][];
|
||||
protected final SoundEvent open_sound_;
|
||||
protected final SoundEvent close_sound_;
|
||||
|
||||
public StandardDoorBlock(long config, Block.Properties properties, AxisAlignedBB open_aabb, AxisAlignedBB closed_aabb, SoundEvent open_sound, SoundEvent close_sound)
|
||||
{
|
||||
super(properties);
|
||||
VoxelShape shapes[][][] = new VoxelShape[Direction.values().length][2][2];
|
||||
for(Direction facing: Direction.values()) {
|
||||
for(boolean open: new boolean[]{false,true}) {
|
||||
for(boolean hinge_right: new boolean[]{false,true}) {
|
||||
if(facing.getAxis() == Axis.Y) {
|
||||
shapes[facing.ordinal()][open?1:0][hinge_right?1:0] = VoxelShapes.fullCube();
|
||||
} else {
|
||||
AxisAlignedBB aabb = Auxiliaries.getRotatedAABB(open ? open_aabb : closed_aabb, facing, true);
|
||||
if(!hinge_right) aabb = Auxiliaries.getMirroredAABB(aabb, facing.rotateY().getAxis());
|
||||
shapes[facing.ordinal()][open?1:0][hinge_right?1:0] = VoxelShapes.create(aabb);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
config_ = config;
|
||||
shapes_ = shapes;
|
||||
open_sound_ = open_sound;
|
||||
close_sound_ = close_sound;
|
||||
}
|
||||
|
||||
public StandardDoorBlock(long config, Block.Properties properties, SoundEvent open_sound, SoundEvent close_sound)
|
||||
{
|
||||
this(
|
||||
config, properties,
|
||||
Auxiliaries.getPixeledAABB(13,0, 0, 16,16,16),
|
||||
Auxiliaries.getPixeledAABB( 0,0,13, 16,16,16),
|
||||
open_sound,
|
||||
close_sound
|
||||
);
|
||||
}
|
||||
|
||||
public StandardDoorBlock(long config, Block.Properties properties)
|
||||
{ super(properties); this.config = config; }
|
||||
{
|
||||
this(
|
||||
config, properties,
|
||||
Auxiliaries.getPixeledAABB(13,0, 0, 16,16,16),
|
||||
Auxiliaries.getPixeledAABB( 0,0,13, 16,16,16),
|
||||
SoundEvents.BLOCK_WOODEN_DOOR_OPEN,
|
||||
SoundEvents.BLOCK_WOODEN_DOOR_CLOSE
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long config()
|
||||
{ return config_; }
|
||||
|
||||
protected void sound(IBlockReader world, BlockPos pos, boolean open)
|
||||
{ if(world instanceof World) ((World)world).playSound(null, pos, open ? open_sound_ : close_sound_, SoundCategory.BLOCKS, 0.7f, 1f); }
|
||||
|
||||
protected void actuate_adjacent_wing(BlockState state, IBlockReader world_ro, BlockPos pos, boolean open)
|
||||
{
|
||||
if(!(world_ro instanceof World)) return;
|
||||
final World world = (World)world_ro;
|
||||
final BlockPos adjecent_pos = pos.offset( (state.get(HINGE)==DoorHingeSide.LEFT) ? (state.get(FACING).rotateY()) : (state.get(FACING).rotateYCCW()));
|
||||
if(!world.isBlockPresent(adjecent_pos)) return;
|
||||
BlockState adjacent_state = world.getBlockState(adjecent_pos);
|
||||
if(adjacent_state.getBlock()!=this) return;
|
||||
if(adjacent_state.get(OPEN)==open) return;
|
||||
world.setBlockState(adjecent_pos, adjacent_state.with(OPEN, open), 2|10);
|
||||
}
|
||||
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
|
@ -44,4 +119,26 @@ public class StandardDoorBlock extends DoorBlock implements StandardBlocks.IStan
|
|||
@Override
|
||||
public boolean canCreatureSpawn(BlockState state, IBlockReader world, BlockPos pos, EntitySpawnPlacementRegistry.PlacementType type, @Nullable EntityType<?> entityType)
|
||||
{ return false; }
|
||||
|
||||
public VoxelShape getShape(BlockState state, IBlockReader world, BlockPos pos, ISelectionContext context)
|
||||
{ return shapes_[state.get(FACING).ordinal()][state.get(OPEN)?1:0][state.get(HINGE)==DoorHingeSide.RIGHT?1:0]; }
|
||||
|
||||
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit)
|
||||
{
|
||||
boolean open = !state.get(OPEN);
|
||||
state = state.with(OPEN, open);
|
||||
world.setBlockState(pos, state, 2|8);
|
||||
sound(world, pos, open);
|
||||
actuate_adjacent_wing(state, world, pos, open);
|
||||
return world.isRemote ? ActionResultType.SUCCESS : ActionResultType.CONSUME;
|
||||
}
|
||||
|
||||
public void neighborChanged(BlockState state, World world, BlockPos pos, Block block, BlockPos fromPos, boolean isMoving)
|
||||
{
|
||||
boolean powered = world.isBlockPowered(pos) || world.isBlockPowered(pos.offset(state.get(HALF) == DoubleBlockHalf.LOWER ? Direction.UP : Direction.DOWN));
|
||||
if((block == this) || (powered == state.get(POWERED))) return;
|
||||
world.setBlockState(pos, state.with(POWERED, powered).with(OPEN, powered), 2);
|
||||
actuate_adjacent_wing(state, world, pos, powered);
|
||||
if(powered != state.get(OPEN)) sound(world, pos, powered);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
package wile.engineersdecor.libmc.client;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.IGuiEventListener;
|
||||
import net.minecraft.client.gui.IHasContainer;
|
||||
import net.minecraft.client.gui.screen.inventory.ContainerScreen;
|
||||
import net.minecraft.client.gui.widget.Widget;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.inventory.container.Container;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public abstract class ContainerGui<T extends Container> extends ContainerScreen<T> implements IHasContainer<T>
|
||||
{
|
||||
public ContainerGui(T screenContainer, PlayerInventory inv, ITextComponent titleIn)
|
||||
{ super(screenContainer, inv, titleIn); }
|
||||
|
||||
protected boolean canHaveDisturbingButtonsFromOtherMods()
|
||||
{ return false; }
|
||||
|
||||
public void init(Minecraft minecraft, int width, int height)
|
||||
{
|
||||
this.minecraft = minecraft;
|
||||
this.itemRenderer = minecraft.getItemRenderer();
|
||||
this.font = minecraft.fontRenderer;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
java.util.function.Consumer<Widget> remove = (b) -> { buttons.remove(b); children.remove(b); };
|
||||
if((!canHaveDisturbingButtonsFromOtherMods()) || (!net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.InitGuiEvent.Pre(this, this.buttons, this::addButton, remove)))) {
|
||||
this.buttons.clear();
|
||||
this.children.clear();
|
||||
this.setListener((IGuiEventListener)null);
|
||||
this.init();
|
||||
}
|
||||
if(canHaveDisturbingButtonsFromOtherMods()) {
|
||||
net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.InitGuiEvent.Post(this, this.buttons, this::addButton, remove));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -11,7 +11,6 @@ package wile.engineersdecor.libmc.detail;
|
|||
import net.minecraft.client.util.InputMappings;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.nbt.INBT;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.Direction.Axis;
|
||||
import net.minecraft.util.SharedConstants;
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
package wile.engineersdecor.libmc.detail;
|
||||
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.screen.inventory.ContainerScreen;
|
||||
import net.minecraft.inventory.container.Container;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
@ -20,7 +19,6 @@ import net.minecraftforge.api.distmarker.OnlyIn;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
{"variants":{
|
||||
"facing=east,half=lower,hinge=left,open=false": { "model": "engineersdecor:block/door/metal_sliding_door_model_bottom_closed", "y": 270 },
|
||||
"facing=east,half=lower,hinge=left,open=true": { "model": "engineersdecor:block/door/metal_sliding_door_model_bottom_open" , "y": 270 },
|
||||
"facing=east,half=lower,hinge=right,open=false": { "model": "engineersdecor:block/door/metal_sliding_door_model_bottom_closed", "y": 90 },
|
||||
"facing=east,half=lower,hinge=right,open=true": { "model": "engineersdecor:block/door/metal_sliding_door_model_bottom_open" , "y": 90 },
|
||||
"facing=east,half=upper,hinge=left,open=false": { "model": "engineersdecor:block/door/metal_sliding_door_model_top_closed" , "y": 270 },
|
||||
"facing=east,half=upper,hinge=left,open=true": { "model": "engineersdecor:block/door/metal_sliding_door_model_top_open" , "y": 270 },
|
||||
"facing=east,half=upper,hinge=right,open=false": { "model": "engineersdecor:block/door/metal_sliding_door_model_top_closed" , "y": 90 },
|
||||
"facing=east,half=upper,hinge=right,open=true": { "model": "engineersdecor:block/door/metal_sliding_door_model_top_open" , "y": 90 },
|
||||
|
||||
"facing=north,half=lower,hinge=left,open=false": { "model": "engineersdecor:block/door/metal_sliding_door_model_bottom_closed", "y": 180 },
|
||||
"facing=north,half=lower,hinge=left,open=true": { "model": "engineersdecor:block/door/metal_sliding_door_model_bottom_open" , "y": 180 },
|
||||
"facing=north,half=lower,hinge=right,open=false":{ "model": "engineersdecor:block/door/metal_sliding_door_model_bottom_closed", "y": 0 },
|
||||
"facing=north,half=lower,hinge=right,open=true": { "model": "engineersdecor:block/door/metal_sliding_door_model_bottom_open" , "y": 0 },
|
||||
"facing=north,half=upper,hinge=left,open=false": { "model": "engineersdecor:block/door/metal_sliding_door_model_top_closed" , "y": 180 },
|
||||
"facing=north,half=upper,hinge=left,open=true": { "model": "engineersdecor:block/door/metal_sliding_door_model_top_open" , "y": 180 },
|
||||
"facing=north,half=upper,hinge=right,open=false":{ "model": "engineersdecor:block/door/metal_sliding_door_model_top_closed" , "y": 0 },
|
||||
"facing=north,half=upper,hinge=right,open=true": { "model": "engineersdecor:block/door/metal_sliding_door_model_top_open" , "y": 0 },
|
||||
|
||||
"facing=south,half=lower,hinge=left,open=false": { "model": "engineersdecor:block/door/metal_sliding_door_model_bottom_closed", "y": 0 },
|
||||
"facing=south,half=lower,hinge=left,open=true": { "model": "engineersdecor:block/door/metal_sliding_door_model_bottom_open" , "y": 0 },
|
||||
"facing=south,half=lower,hinge=right,open=false":{ "model": "engineersdecor:block/door/metal_sliding_door_model_bottom_closed", "y": 180 },
|
||||
"facing=south,half=lower,hinge=right,open=true": { "model": "engineersdecor:block/door/metal_sliding_door_model_bottom_open" , "y": 180 },
|
||||
"facing=south,half=upper,hinge=left,open=false": { "model": "engineersdecor:block/door/metal_sliding_door_model_top_closed" , "y": 0 },
|
||||
"facing=south,half=upper,hinge=left,open=true": { "model": "engineersdecor:block/door/metal_sliding_door_model_top_open" , "y": 0 },
|
||||
"facing=south,half=upper,hinge=right,open=false":{ "model": "engineersdecor:block/door/metal_sliding_door_model_top_closed" , "y": 180 },
|
||||
"facing=south,half=upper,hinge=right,open=true": { "model": "engineersdecor:block/door/metal_sliding_door_model_top_open" , "y": 180 },
|
||||
|
||||
"facing=west,half=lower,hinge=left,open=false": { "model": "engineersdecor:block/door/metal_sliding_door_model_bottom_closed", "y": 90 },
|
||||
"facing=west,half=lower,hinge=left,open=true": { "model": "engineersdecor:block/door/metal_sliding_door_model_bottom_open" , "y": 90 },
|
||||
"facing=west,half=lower,hinge=right,open=false": { "model": "engineersdecor:block/door/metal_sliding_door_model_bottom_closed", "y": 270 },
|
||||
"facing=west,half=lower,hinge=right,open=true": { "model": "engineersdecor:block/door/metal_sliding_door_model_bottom_open" , "y": 270 },
|
||||
"facing=west,half=upper,hinge=left,open=false": { "model": "engineersdecor:block/door/metal_sliding_door_model_top_closed" , "y": 90 },
|
||||
"facing=west,half=upper,hinge=left,open=true": { "model": "engineersdecor:block/door/metal_sliding_door_model_top_open" , "y": 90 },
|
||||
"facing=west,half=upper,hinge=right,open=false": { "model": "engineersdecor:block/door/metal_sliding_door_model_top_closed" , "y": 270 },
|
||||
"facing=west,half=upper,hinge=right,open=true": { "model": "engineersdecor:block/door/metal_sliding_door_model_top_open" , "y": 270 }
|
||||
}}
|
|
@ -160,6 +160,7 @@
|
|||
"block.engineersdecor.metal_rung_ladder.help": "Typical industrial wall ladder,\n consisting of horizontal metal\n rod rungs. Look up/down to climb\n faster.",
|
||||
"block.engineersdecor.metal_rung_steps": "Staggered Metal Steps",
|
||||
"block.engineersdecor.metal_rung_steps.help": "Staggered rod rungs affixed to a\n wall, allowing to climb up, fall\n down, and so on. Look up/down\n to climb faster.",
|
||||
"block.engineersdecor.metal_sliding_door": "Metal Sliding Door",
|
||||
"block.engineersdecor.old_industrial_wood_door": "Old Industrial Wood Door",
|
||||
"block.engineersdecor.old_industrial_wood_planks": "Old Industrial Wood Planks",
|
||||
"block.engineersdecor.old_industrial_wood_slab": "Old Industrial Wood Slab",
|
||||
|
|
|
@ -160,6 +160,7 @@
|
|||
"block.engineersdecor.metal_rung_ladder.help": "§6Типичная промышленная настенная лестница, состоящая из горизонтальных металлических стержней.§r Смотри вверх/вниз, чтобы подняться быстрее.",
|
||||
"block.engineersdecor.metal_rung_steps": "Настенные металлические ступеньки",
|
||||
"block.engineersdecor.metal_rung_steps.help": "§6Металлические ступеньки, крепятся к стене. Позволяют подниматься/спускаться.§r Смотри вверх/вниз, чтобы подняться быстрее.",
|
||||
"block.engineersdecor.metal_sliding_door": "Metal Sliding Door",
|
||||
"block.engineersdecor.old_industrial_wood_door": "Old Industrial Wood Door",
|
||||
"block.engineersdecor.old_industrial_wood_planks": "Old Industrial Wood Planks",
|
||||
"block.engineersdecor.old_industrial_wood_slab": "Old Industrial Wood Slab",
|
||||
|
|
|
@ -160,6 +160,7 @@
|
|||
"block.engineersdecor.metal_rung_ladder.help": "§6典型的工业墙梯,由水平的金属杆蹬组成。§r往上/下看会爬得更快。",
|
||||
"block.engineersdecor.metal_rung_steps": "交错金属台阶",
|
||||
"block.engineersdecor.metal_rung_steps.help": "§6贴在墙上的交错金属杆蹬,能够爬上或爬下。§r往上/下看会爬得更快。",
|
||||
"block.engineersdecor.metal_sliding_door": "Metal Sliding Door",
|
||||
"block.engineersdecor.old_industrial_wood_door": "Old Industrial Wood Door",
|
||||
"block.engineersdecor.old_industrial_wood_planks": "Old Industrial Wood Planks",
|
||||
"block.engineersdecor.old_industrial_wood_slab": "Old Industrial Wood Slab",
|
||||
|
|
|
@ -0,0 +1,66 @@
|
|||
{
|
||||
"ambientocclusion": false,
|
||||
"textures": {
|
||||
"bottom": "engineersdecor:block/door/metal_sliding_door_texture_bottom",
|
||||
"particle": "engineersdecor:block/door/metal_sliding_door_texture_side"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [0, 0, 7],
|
||||
"to": [16, 16, 9],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 16, 16], "texture": "#bottom"},
|
||||
"east": {"uv": [14, 0, 16, 16], "texture": "#particle"},
|
||||
"south": {"uv": [0, 0, 16, 16], "texture": "#bottom"},
|
||||
"west": {"uv": [14, 0, 16, 16], "texture": "#particle"},
|
||||
"down": {"uv": [0, 1, 16, 3], "texture": "#particle"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [15, 0, 6],
|
||||
"to": [16, 16, 7],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 1, 16], "texture": "#bottom"},
|
||||
"east": {"uv": [15, 0, 16, 16], "texture": "#particle"},
|
||||
"west": {"uv": [0, 0, 1, 16], "texture": "#bottom"},
|
||||
"down": {"uv": [15, 9, 16, 10], "rotation": 270, "texture": "#particle"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 0, 6],
|
||||
"to": [15, 0.25, 7],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [7, 8, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [1, 15, 16, 16], "texture": "#bottom"},
|
||||
"east": {"uv": [9, 15, 10, 16], "texture": "#particle"},
|
||||
"south": {"uv": [0, 15, 15, 16], "texture": "#particle"},
|
||||
"west": {"uv": [6, 15, 7, 16], "texture": "#bottom"},
|
||||
"up": {"uv": [0, 1, 15, 2], "texture": "#particle"},
|
||||
"down": {"uv": [0, 15, 15, 16], "texture": "#particle"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 0, 9],
|
||||
"to": [15, 0.25, 10],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [7, 8, 11]},
|
||||
"faces": {
|
||||
"north": {"uv": [1, 15, 16, 16], "texture": "#bottom"},
|
||||
"east": {"uv": [9, 15, 10, 16], "texture": "#particle"},
|
||||
"south": {"uv": [0, 15, 15, 16], "texture": "#particle"},
|
||||
"west": {"uv": [6, 15, 7, 16], "texture": "#bottom"},
|
||||
"up": {"uv": [0, 1, 15, 2], "texture": "#particle"},
|
||||
"down": {"uv": [0, 15, 15, 16], "texture": "#particle"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [15, 0, 9],
|
||||
"to": [16, 16, 10],
|
||||
"faces": {
|
||||
"east": {"uv": [13, 0, 14, 16], "texture": "#particle"},
|
||||
"south": {"uv": [15, 0, 16, 16], "texture": "#bottom"},
|
||||
"west": {"uv": [14, 0, 15, 16], "texture": "#particle"},
|
||||
"down": {"uv": [15, 6, 16, 7], "rotation": 270, "texture": "#particle"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
{
|
||||
"ambientocclusion": false,
|
||||
"textures": {
|
||||
"bottom": "engineersdecor:block/door/metal_sliding_door_texture_bottom",
|
||||
"particle": "engineersdecor:block/door/metal_sliding_door_texture_side"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [14.75, 0.25, 7],
|
||||
"to": [15, 16, 9],
|
||||
"faces": {
|
||||
"north": {"uv": [1, 0, 1.25, 15.75], "texture": "#bottom"},
|
||||
"east": {"uv": [7, 0, 9, 15.75], "texture": "#particle"},
|
||||
"south": {"uv": [14.75, 0, 15, 15.75], "texture": "#bottom"},
|
||||
"west": {"uv": [14, 0, 16, 15.75], "texture": "#particle"},
|
||||
"down": {"uv": [14.75, 7, 15, 9], "texture": "#particle"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [15, 0, 6],
|
||||
"to": [16, 16, 10],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 1, 16], "texture": "#bottom"},
|
||||
"east": {"uv": [6, 0, 10, 16], "texture": "#particle"},
|
||||
"south": {"uv": [15, 0, 16, 16], "texture": "#particle"},
|
||||
"west": {"uv": [6, 0, 10, 16], "texture": "#particle"},
|
||||
"down": {"uv": [15, 6, 16, 10], "rotation": 270, "texture": "#particle"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 0, 6],
|
||||
"to": [15, 0.25, 7],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [7, 8, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [1, 15.75, 16, 16], "texture": "#bottom"},
|
||||
"east": {"uv": [9, 15.75, 10, 16], "texture": "#particle"},
|
||||
"south": {"uv": [0, 15.75, 15, 16], "texture": "#particle"},
|
||||
"west": {"uv": [6, 15.75, 7, 16], "texture": "#bottom"},
|
||||
"up": {"uv": [0, 6, 15, 7], "texture": "#particle"},
|
||||
"down": {"uv": [0, 9, 15, 10], "texture": "#particle"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 0, 9],
|
||||
"to": [15, 0.25, 10],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [7, 8, 11]},
|
||||
"faces": {
|
||||
"north": {"uv": [1, 15.75, 16, 16], "texture": "#bottom"},
|
||||
"east": {"uv": [9, 15.75, 10, 16], "texture": "#particle"},
|
||||
"south": {"uv": [0, 15.75, 15, 16], "texture": "#particle"},
|
||||
"west": {"uv": [6, 15.75, 7, 16], "texture": "#bottom"},
|
||||
"up": {"uv": [0, 6, 15, 7], "texture": "#particle"},
|
||||
"down": {"uv": [0, 9, 15, 10], "texture": "#particle"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 0, 7],
|
||||
"to": [15, 0.0625, 9],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [7, 8, 10]},
|
||||
"faces": {
|
||||
"north": {"uv": [1, 15.75, 16, 16], "texture": "#bottom"},
|
||||
"east": {"uv": [7, 15.75, 9, 16], "texture": "#particle"},
|
||||
"south": {"uv": [0, 15.75, 15, 16], "texture": "#particle"},
|
||||
"west": {"uv": [7, 15.75, 9, 16], "texture": "#bottom"},
|
||||
"up": {"uv": [0, 7, 15, 9], "texture": "#particle"},
|
||||
"down": {"uv": [0, 7, 15, 9], "texture": "#particle"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
"parent": "block/block",
|
||||
"ambientocclusion": false,
|
||||
"textures": {
|
||||
"bottom": "engineersdecor:block/door/metal_sliding_door_texture_bottom",
|
||||
"top": "engineersdecor:block/door/metal_sliding_door_texture_top",
|
||||
"particle": "engineersdecor:block/door/metal_sliding_door_texture_side"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [7.25, 8, 3.5],
|
||||
"to": [8.75, 16, 11.5],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 7.5]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 3, 16], "texture": "#particle"},
|
||||
"east": {"uv": [16, 0, 0, 16], "texture": "#top"},
|
||||
"south": {"uv": [13, 0, 16, 16], "texture": "#particle"},
|
||||
"west": {"uv": [0, 0, 16, 16], "texture": "#top"},
|
||||
"up": {"uv": [0, 0, 16, 3], "rotation": 270, "texture": "#particle"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [7.25, 0, 3.5],
|
||||
"to": [8.75, 8, 11.5],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 7.5]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 3, 16], "texture": "#particle"},
|
||||
"east": {"uv": [16, 0, 0, 16], "texture": "#bottom"},
|
||||
"south": {"uv": [13, 0, 16, 16], "texture": "#particle"},
|
||||
"west": {"uv": [0, 0, 16, 16], "texture": "#bottom"},
|
||||
"down": {"uv": [0, 13, 16, 16], "rotation": 90, "texture": "#particle"}
|
||||
}
|
||||
}
|
||||
],
|
||||
"gui_light": "front",
|
||||
"display": {
|
||||
"thirdperson_righthand": {
|
||||
"rotation": [6, 88, 39],
|
||||
"scale": [0.4, 0.4, 0.4]
|
||||
},
|
||||
"firstperson_righthand": {
|
||||
"rotation": [-4, 27, 0],
|
||||
"translation": [2.25, 0, 0],
|
||||
"scale": [0.5, 0.5, 0.5]
|
||||
},
|
||||
"ground": {
|
||||
"translation": [0, 1.75, 0],
|
||||
"scale": [0.4, 0.4, 0.4]
|
||||
},
|
||||
"gui": {
|
||||
"rotation": [0, 90, 0],
|
||||
"translation": [0, 0.25, 0],
|
||||
"scale": [0.9, 0.9, 0.9]
|
||||
},
|
||||
"fixed": {
|
||||
"rotation": [0, 90, 0]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,113 @@
|
|||
{
|
||||
"ambientocclusion": false,
|
||||
"textures": {
|
||||
"top": "engineersdecor:block/door/metal_sliding_door_texture_top",
|
||||
"particle": "engineersdecor:block/door/metal_sliding_door_texture_side",
|
||||
"g": "engineersdecor:block/glass/panzerglass_block_texture0"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [12, 0, 7],
|
||||
"to": [16, 16, 9],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 4, 16], "texture": "#top"},
|
||||
"east": {"uv": [13, 0, 15, 16], "texture": "#particle"},
|
||||
"south": {"uv": [12, 0, 16, 16], "texture": "#top"},
|
||||
"west": {"uv": [1, 0, 3, 16], "texture": "#particle"},
|
||||
"up": {"uv": [12, 1, 16, 3], "texture": "#particle"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 0, 7],
|
||||
"to": [4, 16, 9],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [-4, 8, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [12, 0, 16, 16], "texture": "#top"},
|
||||
"east": {"uv": [13, 0, 15, 16], "texture": "#particle"},
|
||||
"south": {"uv": [0, 0, 4, 16], "texture": "#top"},
|
||||
"west": {"uv": [1, 0, 3, 16], "texture": "#particle"},
|
||||
"up": {"uv": [0, 1, 4, 3], "texture": "#particle"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [4, 12, 7],
|
||||
"to": [12, 16, 9],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [0, 8, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [4, 0, 12, 4], "texture": "#top"},
|
||||
"south": {"uv": [4, 0, 12, 4], "texture": "#top"},
|
||||
"up": {"uv": [4, 1, 12, 3], "texture": "#particle"},
|
||||
"down": {"uv": [4, 13, 12, 15], "texture": "#top"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [4, 0, 7],
|
||||
"to": [12, 1, 9],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [0, -4, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [4, 15, 12, 16], "texture": "#top"},
|
||||
"east": {"uv": [13, 15, 15, 16], "texture": "#particle"},
|
||||
"south": {"uv": [4, 15, 12, 16], "texture": "#top"},
|
||||
"west": {"uv": [1, 15, 3, 16], "texture": "#particle"},
|
||||
"up": {"uv": [4, 1, 12, 3], "texture": "#particle"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [4, 1, 7],
|
||||
"to": [12, 12, 9],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [0, -2, 8.5]},
|
||||
"faces": {
|
||||
"north": {"uv": [4, 4, 12, 15], "texture": "#g"},
|
||||
"south": {"uv": [4, 4, 12, 15], "texture": "#g"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 15.5, 6],
|
||||
"to": [15, 16, 7],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [7, 8, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 16, 1], "texture": "#top"},
|
||||
"east": {"uv": [2.5, 0, 3, 1], "texture": "#particle"},
|
||||
"south": {"uv": [0, 0, 16, 1], "texture": "#top"},
|
||||
"west": {"uv": [13, 0, 13.5, 1], "texture": "#particle"},
|
||||
"up": {"uv": [2.5, 0, 3, 16], "rotation": 270, "texture": "#particle"},
|
||||
"down": {"uv": [2.5, 0, 3, 16], "rotation": 90, "texture": "#particle"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 15.5, 9],
|
||||
"to": [15, 16, 10],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [7, 8, 8]},
|
||||
"faces": {
|
||||
"east": {"uv": [6, 0, 7, 0.25], "texture": "#particle"},
|
||||
"south": {"uv": [1, 0, 16, 0.25], "texture": "#top"},
|
||||
"west": {"uv": [9, 0, 10, 0.25], "texture": "#particle"},
|
||||
"up": {"uv": [1, 15, 16, 16], "texture": "#particle"},
|
||||
"down": {"uv": [1, 0, 16, 1], "texture": "#particle"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [15, 0, 6],
|
||||
"to": [16, 16, 7],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [23, 8, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [15, 1, 16, 16], "texture": "#top"},
|
||||
"east": {"uv": [2.5, 1, 3, 16], "texture": "#particle"},
|
||||
"south": {"uv": [0, 1, 1, 16], "texture": "#top"},
|
||||
"west": {"uv": [13, 1, 13.5, 16], "texture": "#particle"},
|
||||
"up": {"uv": [0, 0, 0, 0], "rotation": 270, "texture": "#particle"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [15, 0, 9],
|
||||
"to": [16, 16, 10],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [23, 8, 8]},
|
||||
"faces": {
|
||||
"east": {"uv": [0, 1, 0.5, 16], "texture": "#particle"},
|
||||
"south": {"uv": [0, 1, 1, 16], "texture": "#top"},
|
||||
"west": {"uv": [15.5, 1, 16, 16], "texture": "#particle"},
|
||||
"up": {"uv": [0, 0, 0, 0], "rotation": 270, "texture": "#particle"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,82 @@
|
|||
{
|
||||
"ambientocclusion": false,
|
||||
"textures": {
|
||||
"top": "engineersdecor:block/door/metal_sliding_door_texture_top",
|
||||
"particle": "engineersdecor:block/door/metal_sliding_door_texture_side"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [14.75, 0, 7],
|
||||
"to": [16, 16, 9],
|
||||
"faces": {
|
||||
"north": {"uv": [14.75, 0, 16, 16], "texture": "#top"},
|
||||
"east": {"uv": [1, 0, 3, 16], "texture": "#particle"},
|
||||
"south": {"uv": [0, 0, 1.25, 16], "texture": "#top"},
|
||||
"west": {"uv": [14, 0, 16, 16], "texture": "#particle"},
|
||||
"up": {"uv": [14.75, 7, 16, 9], "texture": "#particle"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 15.5, 6],
|
||||
"to": [15, 16, 7],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [7, 8, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 16, 1], "texture": "#top"},
|
||||
"east": {"uv": [2.5, 0, 3, 1], "texture": "#particle"},
|
||||
"south": {"uv": [0, 0, 16, 1], "texture": "#top"},
|
||||
"west": {"uv": [13, 0, 13.5, 1], "texture": "#particle"},
|
||||
"up": {"uv": [2.5, 0, 3, 16], "rotation": 270, "texture": "#particle"},
|
||||
"down": {"uv": [2.5, 0, 3, 16], "rotation": 90, "texture": "#particle"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 15.75, 7],
|
||||
"to": [15, 16, 9],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [7, 8, 9]},
|
||||
"faces": {
|
||||
"north": {"uv": [1, 0, 16, 0.5], "texture": "#top"},
|
||||
"east": {"uv": [7, 0, 9, 0.5], "texture": "#particle"},
|
||||
"south": {"uv": [0, 0, 15, 0.5], "texture": "#top"},
|
||||
"west": {"uv": [7, 0, 9, 0.5], "texture": "#particle"},
|
||||
"up": {"uv": [1, 0, 16, 2], "texture": "#particle"},
|
||||
"down": {"uv": [1, 14, 16, 16], "texture": "#particle"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 15.5, 9],
|
||||
"to": [15, 16, 10],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [7, 8, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 15, 0.5], "texture": "#top"},
|
||||
"east": {"uv": [6, 0, 7, 0.25], "texture": "#particle"},
|
||||
"south": {"uv": [1, 0, 16, 0.25], "texture": "#top"},
|
||||
"west": {"uv": [9, 0, 10, 0.25], "texture": "#particle"},
|
||||
"up": {"uv": [1, 15, 16, 16], "texture": "#particle"},
|
||||
"down": {"uv": [1, 0, 16, 1], "texture": "#particle"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [15, 0, 6],
|
||||
"to": [16, 16, 7],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [23, 8, 8]},
|
||||
"faces": {
|
||||
"north": {"uv": [15, 1, 16, 16], "texture": "#top"},
|
||||
"east": {"uv": [2.5, 1, 3, 16], "texture": "#particle"},
|
||||
"south": {"uv": [0, 1, 1, 16], "texture": "#top"},
|
||||
"west": {"uv": [13, 1, 13.5, 16], "texture": "#particle"},
|
||||
"up": {"uv": [0, 0, 0, 0], "rotation": 270, "texture": "#particle"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [15, 0, 9],
|
||||
"to": [16, 16, 10],
|
||||
"rotation": {"angle": 0, "axis": "y", "origin": [23, 8, 8]},
|
||||
"faces": {
|
||||
"east": {"uv": [0, 1, 0.5, 16], "texture": "#particle"},
|
||||
"south": {"uv": [0, 1, 1, 16], "texture": "#top"},
|
||||
"west": {"uv": [15.5, 1, 16, 16], "texture": "#particle"},
|
||||
"up": {"uv": [0, 0, 0, 0], "rotation": 270, "texture": "#particle"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
{ "parent": "engineersdecor:block/door/metal_sliding_door_model_inventory" }
|
Binary file not shown.
After Width: | Height: | Size: 517 B |
Binary file not shown.
After Width: | Height: | Size: 428 B |
Binary file not shown.
After Width: | Height: | Size: 564 B |
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [{
|
||||
"name": "metal_sliding_door_dlt",
|
||||
"rolls": 1,
|
||||
"conditions": [
|
||||
{ "condition": "minecraft:survives_explosion" }
|
||||
],
|
||||
"entries": [{
|
||||
"name": "engineersdecor:metal_sliding_door",
|
||||
"type": "minecraft:item",
|
||||
"conditions": [{
|
||||
"block": "engineersdecor:metal_sliding_door",
|
||||
"condition": "minecraft:block_state_property",
|
||||
"properties": { "half": "lower" }
|
||||
}
|
||||
]
|
||||
}]
|
||||
}]
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"type": "forge:conditional",
|
||||
"recipes": [
|
||||
{
|
||||
"conditions": [
|
||||
{
|
||||
"type": "engineersdecor:optional",
|
||||
"result": "engineersdecor:metal_sliding_door",
|
||||
"required": ["engineersdecor:metal_bar", "minecraft:iron_door"]
|
||||
}
|
||||
],
|
||||
"recipe": {
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"BB",
|
||||
"DD",
|
||||
"BB"
|
||||
],
|
||||
"key": {
|
||||
"B": { "item": "engineersdecor:metal_bar" },
|
||||
"D": { "item": "minecraft:iron_door" }
|
||||
},
|
||||
"result": {
|
||||
"item": "engineersdecor:metal_sliding_door",
|
||||
"count": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue