diff --git a/1.12/gradle.properties b/1.12/gradle.properties index 44450e2..4b6c77f 100644 --- a/1.12/gradle.properties +++ b/1.12/gradle.properties @@ -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.3 +version_engineersdecor=1.0.4 diff --git a/1.12/meta/update.json b/1.12/meta/update.json index f4ccff1..15eb6a0 100644 --- a/1.12/meta/update.json +++ b/1.12/meta/update.json @@ -1,6 +1,16 @@ { "homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/", "1.12.2": { + "1.0.4": "[R] Release based on v1.0.3-b9. Release-to-release changes: * Crafting table: Quick crafting history re-fab, JEI integration. * Rendering improvements and issue fixes (stairs, ambient occlusion, optifine, etc). * Walls with texture variations. * Thin/thick steel poles with support feet/heads. * Horizontal steel double-T support beams added. * Fluid pipe valves added: Check valve, redstone controlled valve, analog redstone controlled valve. Support pressuzized transfer. * Tooltip documentation (CTRL-SHIFT) for stairs added. * Internal code cleanups. * Recipes tuned.\n[E] Added pass-through electrical furnace (experimental, see config).", + "1.0.4-b9": "[F] Inserting fluids with pressurized tag only into IE piping.\n[F] Valve redstone connector rendering does not check for \"can connect redstone\" but only for \"can provide power\".\n[M] Valves are adapted to be detected as pipe by IE.", + "1.0.4-b8": "[F] Fixed stairs rendering without smooth light (thanks rastot9).\n[E] Added passive fluid accumulator (experimental feature, see config).", + "1.0.4-b7": "[F] Fixed recipe loading issue if IE is not installed.\n[M] Valves support IE pressurized fluid transfer.", + "1.0.4-b6": "[A] Added redstone controlled fluid valve.\n[A] Added redstone controlled analog fluid valve.\n[M] Check valve recipe adapted (thanks majijn).", + "1.0.4-b5": "[A] Horizontal steel double-T support beam with pole connections.\n[A] Added fluid pipe check valve (straight, conducts only one way).\n[M] Internal registration block/te handling changed.", + "1.0.4-b4": "[F] Clinker/slag brick wall side cullfacing disabled to prevent texture leaks when connecting to concrete walls.\n[F] Unused treated wood pole texture regions filled (optifine).\n[F] Using mipped cutout format for window multi-layer model (issue #19, thanks rixmswey for reporting and details).\n[M] Recipe tuning, added standalone recipe for all mod blocks.\n[M] In-game CTRL-SHIFT tooltip documentation updated.\n[M] Panzer glass block: Ambient occlusion and light opacity tuned.\n[M] Stairs: Light opacity tuned.\n[A] Tooltip documentation added for mod stairs.\n[E] Horizontal steel double-T support beam (config:experimental).", + "1.0.4-b3": "[A] Added thin (4x4x16) and thick (6x6x16) steel hollow poles.\n[A] Added support head/foot components for thin and thick steel poles.", + "1.0.4-b2": "[A] Added position dependent texture variation to clinker wall, slag brick wall and rebar concrete wall.", + "1.0.4-b1": "[A] Crafting table: JEI integration for recipe placement added.\n[A] Crafting table: History re-fab added, allowing to quickly select and re-craft recent recipes. Selection with arrow buttons, ingredient placement by clicking the result slot. Automatic item distribution on shift-click. Quick-move buttons.\n[F] Crafting table textures modified to prevent optifine glitches on the edges of the legs.", "1.0.3": "[R] Release based on v1.0.3-b5. Release-to-release changes: * Small laboratory furnace added. * Extensive config options for mod packing and tuning added. * Rendering issues fixes (window bleeding, optifine). * Steel framed window added. * Treated wood pole \"end pieces\" added (two support variants). * Sitting on treated wood stool added including mobs (but not villagers, as these are obviously very upright people). * Lang ru_ru added (github contribution from Yaroslavik). * Creative tab logo changed to mod logo. * Table/crafting table bounding boxes refined. * Standalone \"escape\" recipes added if IE is not installed.", "1.0.3-b5": "[F] Fixed typo in en-en lang file.\n[F] Fixed IE concrete texture missing bailout in log if IE is not installed.\n[F] Using forge multi-layer models for windows to circumvent glitches.\n[M] Changed creative tab logo to the mod logo.\n[A] Added alternative recipes for crafting table and furnace if main IE ingredients are missing (for \"stand-alone\" mod usage).", "1.0.3-b4": "[A] Lab furnace supports electrical speedup when a IE external is placed in one of the two auxiliary slots.\n[F] Fixed window rendering issue (issue #15, thanks to ILLOMIURGE).\n[M] Updated ru_ru lang file (Yaroslavik).", @@ -23,7 +33,7 @@ "1.0.0-b1": "[A] Initial structure.\n[A] Added clinker bricks and clinker brick stairs.\n[A] Added slag bricks and slag brick stairs.\n[A] Added metal rung ladder.\n[A] Added staggered metal steps ladder.\n[A] Added treated wood ladder.\n[A] Added treated wood pole.\n[A] Added treated wood table." }, "promos": { - "1.12.2-recommended": "1.0.3", - "1.12.2-latest": "1.0.3" + "1.12.2-recommended": "1.0.4", + "1.12.2-latest": "1.0.4" } } \ No newline at end of file diff --git a/1.12/readme.md b/1.12/readme.md index d307c08..6549ddd 100644 --- a/1.12/readme.md +++ b/1.12/readme.md @@ -10,6 +10,67 @@ Mod sources for Minecraft version 1.12.2. ---- ## Revision history + ------------------------------------------------------------------- + - v1.0.4 [R] Release based on v1.0.3-b9. Release-to-release changes: + * Crafting table: Quick crafting history re-fab, JEI integration. + * Rendering improvements and issue fixes (stairs, ambient occlusion, + optifine, etc). + * Walls with texture variations. + * Thin/thick steel poles with support feet/heads. + * Horizontal steel double-T support beams added. + * Fluid pipe valves added: Check valve, redstone controlled valve, + analog redstone controlled valve. Support pressuzized transfer. + * Tooltip documentation (CTRL-SHIFT) for stairs added. + * Internal code cleanups. + * Recipes tuned. + ------------------------------------------------------------------- + [E] Added pass-through electrical furnace (experimental, see config). + + - v1.0.4-b9 [F] Inserting fluids with pressurized tag only into IE piping. + [F] Valve redstone connector rendering does not check for + "can connect redstone" but only for "can provide power". + [M] Valves are adapted to be detected as pipe by IE. + + - v1.0.4-b8 [F] Fixed stairs rendering without smooth light (thanks rastot9). + [E] Added passive fluid accumulator (experimental feature, see config). + + - v1.0.4-b7 [F] Fixed recipe loading issue if IE is not installed. + [M] Valves support IE pressurized fluid transfer. + + - v1.0.4-b6 [A] Added redstone controlled fluid valve. + [A] Added redstone controlled analog fluid valve. + [M] Check valve recipe adapted (thanks majijn). + + - v1.0.4-b5 [A] Horizontal steel double-T support beam with pole connections. + [A] Added fluid pipe check valve (straight, conducts only one way). + [M] Internal registration block/te handling changed. + + - v1.0.4-b4 [F] Clinker/slag brick wall side cullfacing disabled to prevent + texture leaks when connecting to concrete walls. + [F] Unused treated wood pole texture regions filled (optifine). + [F] Using mipped cutout format for window multi-layer model + (issue #19, thanks rixmswey for reporting and details). + [M] Recipe tuning, added standalone recipe for all mod blocks. + [M] In-game CTRL-SHIFT tooltip documentation updated. + [M] Panzer glass block: Ambient occlusion and light opacity tuned. + [M] Stairs: Light opacity tuned. + [A] Tooltip documentation added for mod stairs. + [E] Horizontal steel double-T support beam (config:experimental). + + - v1.0.4-b3 [A] Added thin (4x4x16) and thick (6x6x16) steel hollow poles. + [A] Added support head/foot components for thin and thick steel poles. + + - v1.0.4-b2 [A] Added position dependent texture variation to clinker wall, + slag brick wall and rebar concrete wall. + + - v1.0.4-b1 [A] Crafting table: JEI integration for recipe placement added. + [A] Crafting table: History re-fab added, allowing to quickly select + and re-craft recent recipes. Selection with arrow buttons, + ingredient placement by clicking the result slot. Automatic + item distribution on shift-click. Quick-move buttons. + [F] Crafting table textures modified to prevent optifine glitches + on the edges of the legs. + ------------------------------------------------------------------- - v1.0.3 [R] Release based on v1.0.3-b5. Release-to-release changes: * Small laboratory furnace added. diff --git a/1.12/src/main/java/blusunrize/immersiveengineering/api/fluid/IFluidPipe.java b/1.12/src/main/java/blusunrize/immersiveengineering/api/fluid/IFluidPipe.java new file mode 100644 index 0000000..f22061e --- /dev/null +++ b/1.12/src/main/java/blusunrize/immersiveengineering/api/fluid/IFluidPipe.java @@ -0,0 +1,18 @@ +/* + * BluSunrize + * Copyright (c) 2017 + * + * This code is licensed under "Blu's License of Common Sense" + * Details can be found in the license file in the root folder of this project + */ + +package blusunrize.immersiveengineering.api.fluid; + +import net.minecraft.util.EnumFacing; + +public interface IFluidPipe +{ + boolean canOutputPressurized(boolean consumePower); + + boolean hasOutputConnection(EnumFacing side); +} diff --git a/1.12/src/main/java/wile/engineersdecor/ModEngineersDecor.java b/1.12/src/main/java/wile/engineersdecor/ModEngineersDecor.java index 052d6ef..aad5da8 100644 --- a/1.12/src/main/java/wile/engineersdecor/ModEngineersDecor.java +++ b/1.12/src/main/java/wile/engineersdecor/ModEngineersDecor.java @@ -8,11 +8,10 @@ */ package wile.engineersdecor; -import wile.engineersdecor.detail.ModConfig; -import wile.engineersdecor.detail.ExtItems; -import wile.engineersdecor.detail.Networking; -import wile.engineersdecor.detail.RecipeCondModSpecific; +import net.minecraft.item.crafting.IRecipe; +import wile.engineersdecor.detail.*; import wile.engineersdecor.blocks.*; +import wile.engineersdecor.items.*; import net.minecraft.world.World; import net.minecraft.tileentity.TileEntity; import net.minecraft.client.multiplayer.WorldClient; @@ -39,6 +38,7 @@ import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.client.event.ModelRegistryEvent; import net.minecraftforge.fml.relauncher.SideOnly; import org.apache.logging.log4j.Logger; + import javax.annotation.Nonnull; @@ -126,12 +126,16 @@ public class ModEngineersDecor @SubscribeEvent public static void registerItems(final RegistryEvent.Register event) - { ModBlocks.registerItemBlocks(event); } + { ModBlocks.registerItemBlocks(event); ModItems.registerItems(event); } + + @SubscribeEvent + public static void registerRecipes(RegistryEvent.Register event) + { ModRecipes.registerRecipes(event); } @SideOnly(Side.CLIENT) @SubscribeEvent public static void registerModels(final ModelRegistryEvent event) - { ModBlocks.initModels(); } + { ModBlocks.initModels(); ModItems.initModels(); } } public static final CreativeTabs CREATIVE_TAB_ENGINEERSDECOR = (new CreativeTabs("tabengineersdecor") { @@ -149,6 +153,7 @@ public class ModEngineersDecor { public static final int GUIID_CRAFTING_TABLE = 213101; public static final int GUIID_SMALL_LAB_FURNACE = 213102; + public static final int GUIID_ELECTRICAL_LAB_FURNACE = 213103; @Override public Object getServerGuiElement(final int guiid, final EntityPlayer player, final World world, int x, int y, int z) @@ -158,6 +163,7 @@ public class ModEngineersDecor switch(guiid) { case GUIID_CRAFTING_TABLE: return BlockDecorCraftingTable.getServerGuiElement(player, world, pos, te); case GUIID_SMALL_LAB_FURNACE: return BlockDecorFurnace.getServerGuiElement(player, world, pos, te); + case GUIID_ELECTRICAL_LAB_FURNACE: return BlockDecorFurnaceElectrical.getServerGuiElement(player, world, pos, te); } return null; } @@ -171,6 +177,7 @@ public class ModEngineersDecor switch(guiid) { case GUIID_CRAFTING_TABLE: return BlockDecorCraftingTable.getClientGuiElement(player, world, pos, te); case GUIID_SMALL_LAB_FURNACE: return BlockDecorFurnace.getClientGuiElement(player, world, pos, te); + case GUIID_ELECTRICAL_LAB_FURNACE: return BlockDecorFurnaceElectrical.getClientGuiElement(player, world, pos, te); } return null; } diff --git a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecor.java b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecor.java index fb8e184..06575c5 100644 --- a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecor.java +++ b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecor.java @@ -9,13 +9,14 @@ * - MC block defaults. * - Tooltip functionality * - Model initialisation + * - Accumulating "deprecated" warnings from Block where "overriding/implementing is fine". */ package wile.engineersdecor.blocks; -import net.minecraft.block.SoundType; -import net.minecraft.util.*; import wile.engineersdecor.ModEngineersDecor; import wile.engineersdecor.detail.ModAuxiliaries; +import net.minecraft.block.SoundType; +import net.minecraft.block.state.BlockFaceShape; import net.minecraft.block.Block; import net.minecraft.block.material.EnumPushReaction; import net.minecraft.block.material.Material; @@ -25,8 +26,8 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraft.item.ItemStack; import net.minecraft.client.util.ITooltipFlag; -import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.*; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraftforge.fml.relauncher.Side; @@ -48,10 +49,13 @@ public class BlockDecor extends Block public static final long CFG_FACING_PLACEMENT = 0x0000000000000008L; // placed on the facing the player has clicked. public static final long CFG_OPPOSITE_PLACEMENT = 0x0000000000000010L; // placed placed in the opposite direction of the face the player clicked. public static final long CFG_FLIP_PLACEMENT_IF_SAME = 0x0000000000000020L; // placement direction flipped if an instance of the same class was clicked - public static final long CFG_TRANSLUCENT = 0x0000000000000040L; // indicates a block/pane is glass like (transparent, etc) + public static final long CFG_FLIP_PLACEMENT_SHIFTCLICK = 0x0000000000000040L; // placement direction flipped if player is sneaking + public static final long CFG_TRANSLUCENT = 0x0000000000000080L; // indicates a block/pane is glass like (transparent, etc) public static final long CFG_LIGHT_VALUE_MASK = 0x0000000000000f00L; // fixed value for getLightValue() public static final long CFG_LIGHT_VALUE_SHIFT = 8L; - public static final long CFG_LAB_FURNACE_CRUDE = 0x0000000000010000L; // For DecorFurnace, denotes that it is a crude furnace. + public static final long CFG_ELECTRICAL = 0x0000000000010000L; // Denotes if a component is mainly flux driven. + public static final long CFG_REDSTONE_CONTROLLED = 0x0000000000020000L; // Denotes if a component has somehow a redstone control input + public static final long CFG_ANALOG = 0x0000000000040000L; // Denotes if a component has analog behaviour protected final AxisAlignedBB aabb; @@ -89,6 +93,11 @@ public class BlockDecor extends Block public boolean shouldSideBeRendered(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side) { return true; } + @Override + @SuppressWarnings("deprecation") + public BlockFaceShape getBlockFaceShape(IBlockAccess world, IBlockState state, BlockPos pos, EnumFacing face) + { return BlockFaceShape.SOLID; } + @Override @SuppressWarnings("deprecation") public boolean isFullCube(IBlockState state) @@ -156,37 +165,18 @@ public class BlockDecor extends Block public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) { return aabb; } + @SideOnly(Side.CLIENT) + @SuppressWarnings("deprecation") + public AxisAlignedBB getSelectedBoundingBox(IBlockState state, World worldIn, BlockPos pos) + { return state.getBoundingBox(worldIn, pos).offset(pos); } + @Override public boolean hasTileEntity(IBlockState state) { return false; } - @Override - public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) - {} - - @Override - public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) - { return false; } - - @Override - public void onBlockClicked(World world, BlockPos pos, EntityPlayer player) - {} - @Override @SuppressWarnings("deprecation") public void neighborChanged(IBlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos) {} - @Override - public int getLightValue(IBlockState state, IBlockAccess world, BlockPos pos) - { return (int)((config & CFG_LIGHT_VALUE_MASK) >> CFG_LIGHT_VALUE_SHIFT); } - - @Override - public boolean canPlaceBlockOnSide(World world, BlockPos pos, EnumFacing side) - { return super.canPlaceBlockOnSide(world, pos, side); } - - @Override - public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer, EnumHand hand) - { return super.getStateForPlacement(world, pos, facing, hitX, hitY, hitZ, meta, placer, hand); } - } diff --git a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorChair.java b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorChair.java index ba82522..4d9bb6c 100644 --- a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorChair.java +++ b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorChair.java @@ -8,6 +8,7 @@ */ package wile.engineersdecor.blocks; +import wile.engineersdecor.ModEngineersDecor; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; @@ -21,7 +22,6 @@ import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.world.World; -import wile.engineersdecor.ModEngineersDecor; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.List; diff --git a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorCraftingTable.java b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorCraftingTable.java index d9a7d74..8d225cb 100644 --- a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorCraftingTable.java +++ b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorCraftingTable.java @@ -9,8 +9,8 @@ */ package wile.engineersdecor.blocks; -import net.minecraft.client.gui.GuiButtonImage; import wile.engineersdecor.ModEngineersDecor; +import wile.engineersdecor.detail.Networking; import net.minecraft.block.Block; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; @@ -25,6 +25,8 @@ import net.minecraft.inventory.*; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.init.Items; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.item.crafting.Ingredient; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.*; @@ -37,10 +39,12 @@ import net.minecraft.client.renderer.RenderHelper; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiButtonImage; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; +import net.minecraftforge.fml.common.registry.GameRegistry; +import net.minecraftforge.registries.IForgeRegistry; import com.google.common.collect.ImmutableList; -import wile.engineersdecor.detail.Networking; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.ArrayList; @@ -51,10 +55,14 @@ import java.util.List; public class BlockDecorCraftingTable extends BlockDecorDirected { public static boolean with_assist = true; + public static boolean with_assist_direct_history_refab = false; + public static boolean with_assist_quickmove_buttons = false; - public static final void on_config(boolean without_crafting_assist) + public static final void on_config(boolean without_crafting_assist, boolean with_assist_immediate_history_refab, boolean with_quickmove_buttons) { with_assist = !without_crafting_assist; + with_assist_direct_history_refab = with_assist_immediate_history_refab; + with_assist_quickmove_buttons = with_quickmove_buttons; CraftingHistory.max_history_size(32); } @@ -157,11 +165,15 @@ public class BlockDecorCraftingTable extends BlockDecorDirected private static class CraftingHistory { + public static final int RESULT_STACK_INDEX = 0; + public static final int INPUT_STACKS_BEGIN = 1; public static final List NOTHING = new ArrayList(); + private static int max_history_size_ = 5; private List history_ = new ArrayList(); private int current_ = -1; - private static int max_history_size_ = 5; + private List current_stacks_ = new ArrayList(); + private IRecipe current_recipe_ = null; public CraftingHistory() {} @@ -186,6 +198,7 @@ public class BlockDecorCraftingTable extends BlockDecorDirected } } current_ = (!subsect.hasKey("current")) ? (-1) : MathHelper.clamp(subsect.getInteger("current"), -1, history_.size()-1); + update_current(); } catch(Throwable ex) { ModEngineersDecor.logger.error("Exception reading crafting table history NBT, resetting, exception is:" + ex.getMessage()); clear(); @@ -201,27 +214,39 @@ public class BlockDecorCraftingTable extends BlockDecorDirected } public void clear() - { current_ = -1; history_.clear(); } + { reset_current(); history_.clear(); } - public void reset_curent() - { current_ = -1; } + public void reset_current() + { current_ = -1; current_stacks_ = NOTHING; current_recipe_ = null; } - public void add(final List grid_stacks) + void update_current() { - if(!with_assist) { clear(); return; } - String s = stacks2str(grid_stacks); - if(s.isEmpty()) return; - history_.removeIf(e->e.equals(s)); - history_.add(s); - while(history_.size() > max_history_size()) history_.remove(0); - if(current_ >= history_.size()) current_ = -1; + if((current_ < 0) || (current_ >= history_.size())) { reset_current(); return; } + Tuple> data = str2stacks(history_.get(current_)); + if(data == null) { reset_current(); return; } + current_recipe_ = data.getFirst(); + current_stacks_ = data.getSecond(); } - public String stacks2str(final List grid_stacks) + public void add(final List grid_stacks, IRecipe recipe) { - if((grid_stacks==null) || (grid_stacks.size() != 10)) return ""; + if(!with_assist) { clear(); return; } + String s = stacks2str(grid_stacks, recipe); + String recipe_filter = recipe.getRegistryName().toString() + ";"; + if(s.isEmpty()) return; + history_.removeIf(e->e.equals(s)); + history_.removeIf(e->e.startsWith(recipe_filter)); + history_.add(s); + while(history_.size() > max_history_size()) history_.remove(0); + if(current_ >= history_.size()) reset_current(); + } + + public String stacks2str(final List grid_stacks, IRecipe recipe) + { + if((grid_stacks==null) || (grid_stacks.size() != 10) || (recipe==null)) return ""; if(grid_stacks.get(0).isEmpty()) return ""; final ArrayList items = new ArrayList(); + items.add(recipe.getRegistryName().toString().trim()); for(ItemStack st:grid_stacks) { int meta = st.getMetadata(); items.add( (st.isEmpty()) ? ("") : ((st.getItem().getRegistryName().toString().trim()) + ((meta==0)?(""):("/"+meta)) )); @@ -229,13 +254,21 @@ public class BlockDecorCraftingTable extends BlockDecorDirected return String.join(";", items); } - public List str2stacks(final String entry) + public @Nullable Tuple> str2stacks(final String entry) { try { - if((entry == null) || (entry.isEmpty())) return NOTHING; + if((entry == null) || (entry.isEmpty())) return null; ArrayList item_regnames = new ArrayList(Arrays.asList(entry.split("[;]"))); - if((item_regnames == null) || (item_regnames.size() > 10)) return NOTHING; - while(item_regnames.size() < 10) item_regnames.add(""); + if((item_regnames == null) || (item_regnames.size() < 2) || (item_regnames.size() > 11)) return null; + while(item_regnames.size() < 11) item_regnames.add(""); + IRecipe recipe = null; + try { + final IForgeRegistry recipe_registry = GameRegistry.findRegistry(IRecipe.class); + recipe = recipe_registry.getValue(new ResourceLocation(item_regnames.remove(0))); + } catch(Throwable e) { + ModEngineersDecor.logger.error("Recipe lookup failed: " + e.getMessage()); + } + if(recipe==null) return null; List stacks = new ArrayList(); for(String regname : item_regnames) { ItemStack stack = ItemStack.EMPTY; @@ -244,42 +277,54 @@ public class BlockDecorCraftingTable extends BlockDecorDirected if(regname.indexOf('/') >= 0) { String[] itemdetails = regname.split("[/]"); if(itemdetails.length>0) regname = itemdetails[0]; - try { if(itemdetails.length>1) meta = Integer.parseInt(itemdetails[1]); } catch(Throwable e){meta=0;} // ignore exception here + if(itemdetails.length>1) try { meta=Integer.parseInt(itemdetails[1]); } catch(Throwable e){ meta=0; } // ignore exception here } final Item item = Item.REGISTRY.getObject(new ResourceLocation(regname)); stack = ((item == null) || (item == Items.AIR)) ? ItemStack.EMPTY : (new ItemStack(item, 1, meta)); } stacks.add(stack); } - if((stacks.size() != 10) || (stacks.get(0).isEmpty())) return NOTHING; // invalid size or no result - return stacks; + if((stacks.size() != 10) || (stacks.get(0).isEmpty())) return null; // invalid size or no result + return new Tuple>(recipe, stacks); } catch(Throwable ex) { ModEngineersDecor.logger.error("History stack building failed: " + ex.getMessage()); - return NOTHING; + return null; } } public List current() - { - if((current_ < 0) || (current_ >= history_.size())) { current_ = -1; return NOTHING; } - return str2stacks(history_.get(current_)); - } + { return current_stacks_; } + + public IRecipe current_recipe() + { return current_recipe_; } public void next() { - if(history_.isEmpty()) { current_ = -1; return; } - current_ = ((++current_) >= history_.size()) ? (-1) : (current_); + if(history_.isEmpty()) { + current_ = -1; + } else { + current_ = ((++current_) >= history_.size()) ? (-1) : (current_); + } + update_current(); } public void prev() { - if(history_.isEmpty()) { current_ = -1; return; } - current_ = ((--current_) < -1) ? (history_.size()-1) : (current_); + if(history_.isEmpty()) { + current_ = -1; + } else { + current_ = ((--current_) < -1) ? (history_.size()-1) : (current_); + } + update_current(); } + public void reset_selection() + { current_ = -1; update_current(); } + public String toString() { - StringBuilder s = new StringBuilder("{ current:" + current_ + ", elements:[ "); + String rec = (current_recipe_==null) ? "none" : (current_recipe_.getRegistryName().toString()); + StringBuilder s = new StringBuilder("{ current:" + current_ + ", recipe:'" + rec + "', elements:[ "); for(int i=0; i buttons = new ArrayList(); + protected final boolean history_slot_tooltip[] = {false,false,false,false,false,false,false,false,false,false}; public BGui(InventoryPlayer playerInventory, World world, BlockPos pos, BTileEntity te) - { super(new BContainer(playerInventory, world, pos, te)); this.te = te; } + { super(new BContainer(playerInventory, world, pos, te)); this.te = te; this.player=playerInventory.player; } @Override @SuppressWarnings("unused") @@ -315,12 +366,15 @@ public class BlockDecorCraftingTable extends BlockDecorDirected final int x0=((width - xSize)/2), y0=((height - ySize)/2); buttons.clear(); if(with_assist) { - buttons.add(addButton(new GuiButtonImage(BUTTON_NEXT, x0+156,y0+44, 12,12, 194,44, 12, BACKGROUND))); - buttons.add(addButton(new GuiButtonImage(BUTTON_PREV, x0+156,y0+30, 12,12, 180,30, 12, BACKGROUND))); - // buttons.add(addButton(new GuiButtonImage(BUTTON_FROM_STORAGE, x0+49,y0+34, 9,17, 219,34, 17, BACKGROUND))); - // buttons.add(addButton(new GuiButtonImage(BUTTON_TO_STORAGE, x0+49,y0+52, 9,17, 208,16, 17, BACKGROUND))); - // buttons.add(addButton(new GuiButtonImage(BUTTON_FROM_PLAYER, x0+77,y0+71, 17,9, 198,71, 9, BACKGROUND))); - // buttons.add(addButton(new GuiButtonImage(BUTTON_TO_PLAYER, x0+59,y0+71, 17,9, 180,71, 9, BACKGROUND))); + buttons.add(addButton(new GuiButtonImage(BUTTON_NEXT, x0+158,y0+44, 12,12, 194,44, 12, BACKGROUND))); + buttons.add(addButton(new GuiButtonImage(BUTTON_PREV, x0+158,y0+30, 12,12, 180,30, 12, BACKGROUND))); + buttons.add(addButton(new GuiButtonImage(BUTTON_CLEAR_GRID, x0+158,y0+58, 12,12, 194,8, 12, BACKGROUND))); + if(with_assist_quickmove_buttons) { + buttons.add(addButton(new GuiButtonImage(BUTTON_FROM_STORAGE, x0+49, y0+34, 9,17, 219,34, 17, BACKGROUND))); + buttons.add(addButton(new GuiButtonImage(BUTTON_TO_STORAGE, x0+49, y0+52, 9,17, 208,16, 17, BACKGROUND))); + buttons.add(addButton(new GuiButtonImage(BUTTON_FROM_PLAYER, x0+77, y0+71, 17,9, 198,71, 9, BACKGROUND))); + buttons.add(addButton(new GuiButtonImage(BUTTON_TO_PLAYER, x0+59, y0+71, 17,9, 180,71, 9, BACKGROUND))); + } } } @@ -332,6 +386,26 @@ public class BlockDecorCraftingTable extends BlockDecorDirected renderHoveredToolTip(mouseX, mouseY); } + @Override + protected void renderHoveredToolTip(int mouseX, int mouseY) + { + if((!player.inventory.getItemStack().isEmpty()) || (getSlotUnderMouse() == null)) return; + final Slot slot = getSlotUnderMouse(); + if(!slot.getStack().isEmpty()) { renderToolTip(slot.getStack(), mouseX, mouseY); return; } + if(with_assist) { + int hist_index = -1; + if(slot instanceof BSlotCrafting) { + hist_index = 0; + } else if(slot.inventory instanceof BInventoryCrafting) { + hist_index = slot.getSlotIndex() + 1; + } + if((hist_index < 0) || (hist_index >= history_slot_tooltip.length)) return; + if(!history_slot_tooltip[hist_index]) return; + ItemStack hist_stack = te.history.current().get(hist_index); + if(!hist_stack.isEmpty()) renderToolTip(hist_stack, mouseX, mouseY); + } + } + @Override protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) { @@ -340,14 +414,15 @@ public class BlockDecorCraftingTable extends BlockDecorDirected final int x0=((width - xSize)/2), y0=((height - ySize)/2); drawTexturedModalRect(x0, y0, 0, 0, xSize, ySize); if(with_assist) { + for(int i=0; i crafting_template = te.history.current(); if((crafting_template == null) || (crafting_template.isEmpty())) return; - if(inventorySlots.getSlot(0).getHasStack()) return; { int i = 0; for(Tuple e : ((BContainer) inventorySlots).CRAFTING_SLOT_POSITIONS) { + if(i==0) continue; // explicitly here, that is the result slot. if((inventorySlots.getSlot(i).getHasStack())) { - if(!inventorySlots.getSlot(i).getStack().getItem().equals(crafting_template.get(i).getItem())) { + if(!inventorySlots.getSlot(i).getStack().isItemEqual(crafting_template.get(i))) { return; // user has placed another recipe } } @@ -358,7 +433,14 @@ public class BlockDecorCraftingTable extends BlockDecorDirected int i = 0; for(Tuple e : ((BContainer) inventorySlots).CRAFTING_SLOT_POSITIONS) { final ItemStack stack = crafting_template.get(i); - if(!stack.isEmpty()) drawTemplateItemAt(stack, x0, y0, e.getFirst(), e.getSecond()); + if(!stack.isEmpty()) { + if(!inventorySlots.getSlot(i).getHasStack()) history_slot_tooltip[i] = true; + if((i==0) && inventorySlots.getSlot(i).getStack().isItemEqual(crafting_template.get(i))) { + continue; // don't shade the output slot if the result can be crafted. + } else { + drawTemplateItemAt(stack, x0, y0, e.getFirst(), e.getSecond()); + } + } ++i; } } @@ -367,9 +449,10 @@ public class BlockDecorCraftingTable extends BlockDecorDirected protected void drawTemplateItemAt(ItemStack stack, int x0, int y0, int x, int y) { + final float main_zl = zLevel; RenderHelper.disableStandardItemLighting(); RenderHelper.enableGUIStandardItemLighting(); - float zl = itemRender.zLevel; + final float zl = itemRender.zLevel; itemRender.zLevel = -50; itemRender.renderItemIntoGUI(stack, x0+x, y0+y); itemRender.zLevel = zl; @@ -377,7 +460,9 @@ public class BlockDecorCraftingTable extends BlockDecorDirected GlStateManager.color(0.7f, 0.7f, 0.7f, 0.8f); mc.getTextureManager().bindTexture(BACKGROUND); drawTexturedModalRect(x0+x, y0+y, x, y, 16, 16); + RenderHelper.enableGUIStandardItemLighting(); RenderHelper.enableStandardItemLighting(); + zLevel = main_zl; } @Override @@ -386,17 +471,58 @@ public class BlockDecorCraftingTable extends BlockDecorDirected switch(button.id) { case BUTTON_NEXT: case BUTTON_PREV: + case BUTTON_CLEAR_GRID: case BUTTON_FROM_STORAGE: case BUTTON_TO_STORAGE: case BUTTON_FROM_PLAYER: - case BUTTON_TO_PLAYER: { + case BUTTON_TO_PLAYER: + case ACTION_PLACE_CURRENT_HISTORY_SEL: { NBTTagCompound nbt = new NBTTagCompound(); - nbt.setInteger("button", button.id); + nbt.setInteger("action", button.id); Networking.PacketTileNotify.sendToServer(te, nbt); break; } } } + + @Override + protected void handleMouseClick(Slot slot, int slotId, int mouseButton, ClickType type) + { + if(type == ClickType.PICKUP) { + boolean place_refab = (slot instanceof BSlotCrafting) && (!slot.getHasStack()); + if(place_refab && with_assist_direct_history_refab) onHistoryItemPlacement(); // place before crafting -> direct item pick + super.handleMouseClick(slot, slotId, mouseButton, type); + if(place_refab && (!with_assist_direct_history_refab)) onHistoryItemPlacement(); // place after crafting -> confirmation first + return; + } + if((type == ClickType.QUICK_MOVE) && (slotId > 9) && (slot.getHasStack())) { // container slots 0..9 are crafting output and grid + List history = te.history.current(); + boolean palce_in_crafting_grid = (!history.isEmpty()); + if(!palce_in_crafting_grid) { + for(int i=0; i<9; ++i) { + if(!(te.getStackInSlot(i).isEmpty())) { palce_in_crafting_grid = true; break; } + } + } + if(palce_in_crafting_grid) { + NBTTagCompound nbt = new NBTTagCompound(); + nbt.setInteger("action", ACTION_PLACE_SHIFTCLICKED_STACK); + nbt.setInteger("containerslot", slotId); + Networking.PacketTileNotify.sendToServer(te, nbt); + return; + } + } + super.handleMouseClick(slot, slotId, mouseButton, type); + } + + private void onHistoryItemPlacement() + { + if(te.history.current().isEmpty()) return; + final Slot resultSlot = this.getSlotUnderMouse(); // double check + if(!(resultSlot instanceof BSlotCrafting)) return; + NBTTagCompound nbt = new NBTTagCompound(); + nbt.setInteger("action", ACTION_PLACE_CURRENT_HISTORY_SEL); + Networking.PacketTileNotify.sendToServer(te, nbt); + } } //-------------------------------------------------------------------------------------------------------------------- @@ -415,11 +541,12 @@ public class BlockDecorCraftingTable extends BlockDecorDirected protected void onCrafting(ItemStack stack) { if((with_assist) && ((player.world!=null) && (!(player.world.isRemote))) && (!stack.isEmpty())) { + final IRecipe recipe = ((InventoryCraftResult)this.inventory).getRecipeUsed(); final ArrayList grid = new ArrayList(); grid.add(stack); for(int i = 0; i < 9; ++i) grid.add(te.stacks.get(i)); - te.history.add(grid); - te.history.reset_curent(); + te.history.add(grid, recipe); + te.history.reset_current(); te.syncHistory(player); } super.onCrafting(stack); @@ -430,7 +557,7 @@ public class BlockDecorCraftingTable extends BlockDecorDirected // Crafting container //-------------------------------------------------------------------------------------------------------------------- - private static class BContainer extends Container + public static class BContainer extends Container { private final World world; private final BlockPos pos; @@ -449,28 +576,33 @@ public class BlockDecorCraftingTable extends BlockDecorDirected this.te = te; craftMatrix = new BInventoryCrafting(this, te); craftMatrix.openInventory(player); + // container slotId 0 === crafting output addSlotToContainer(new BSlotCrafting(te, playerInventory.player, craftMatrix, craftResult, 0, 134, 35)); slotpositions.add(new Tuple<>(134, 35)); + // container slotId 1..9 === TE slots 0..8 for(int y=0; y<3; ++y) { for(int x=0; x<3; ++x) { int xpos = 60+x*18; int ypos = 17+y*18; - addSlotToContainer(new Slot(craftMatrix, x+y*3, xpos, ypos)); // block slots 0..8 + addSlotToContainer(new Slot(craftMatrix, x+y*3, xpos, ypos)); slotpositions.add(new Tuple<>(xpos, ypos)); } } CRAFTING_SLOT_POSITIONS = ImmutableList.copyOf(slotpositions); + // container slotId 10..36 === player slots: 9..35 for(int y=0; y<3; ++y) { - for (int x=0; x<9; ++x) { - addSlotToContainer(new Slot(playerInventory, x+y*9+9, 8+x*18, 86+y*18)); // player slots: 9..35 + for(int x=0; x<9; ++x) { + addSlotToContainer(new Slot(playerInventory, x+y*9+9, 8+x*18, 86+y*18)); } } + // container slotId 37..45 === player slots: 0..8 for(int x=0; x<9; ++x) { - addSlotToContainer(new Slot(playerInventory, x, 8+x*18, 144)); // player slots: 0..8 + addSlotToContainer(new Slot(playerInventory, x, 8+x*18, 144)); } + // container slotId 46..53 === TE slots 9..17 (storage) for(int y=0; y<4; ++y) { - for (int x=0; x<2; ++x) { - addSlotToContainer(new Slot(craftMatrix, x+y*2+9, 8+x*18, 9+y*18)); // block slots 9..17 + for(int x=0; x<2; ++x) { + addSlotToContainer(new Slot(craftMatrix, x+y*2+9, 8+x*18, 9+y*18)); } } onCraftMatrixChanged(craftMatrix); @@ -541,6 +673,9 @@ public class BlockDecorCraftingTable extends BlockDecorDirected } return stack; } + + public void setCraftingMatrixSlot(int slot_index, ItemStack stack) + { craftMatrix.setInventorySlotContents(slot_index, stack.copy()); } } //-------------------------------------------------------------------------------------------------------------------- @@ -599,7 +734,9 @@ public class BlockDecorCraftingTable extends BlockDecorDirected //-------------------------------------------------------------------------------------------------------------------- public static class BTileEntity extends TileEntity implements IInventory, Networking.IPacketReceiver { + public static final int CRAFTING_SLOTS_BEGIN = 0; public static final int NUM_OF_CRAFTING_SLOTS = 9; + public static final int STORAGE_SLOTS_BEGIN = NUM_OF_CRAFTING_SLOTS; public static final int NUM_OF_STORAGE_SLOTS = 8; public static final int NUM_OF_SLOTS = NUM_OF_CRAFTING_SLOTS+NUM_OF_STORAGE_SLOTS; protected NonNullList stacks; @@ -625,35 +762,384 @@ public class BlockDecorCraftingTable extends BlockDecorDirected history.write(compound); } + // private aux methods --------------------------------------------------------------------- + + private boolean itemstack_recipe_match(ItemStack grid_stack, ItemStack history_stack) + { + if(history.current_recipe()!=null) { + boolean grid_match, dist_match; + for(final Ingredient ingredient:history.current_recipe().getIngredients()) { + grid_match = false; dist_match = false; + for(final ItemStack match:ingredient.getMatchingStacks()) { + if(match.isItemEqualIgnoreDurability(grid_stack)) dist_match = true; + if(match.isItemEqualIgnoreDurability(history_stack)) grid_match = true; + if(dist_match && grid_match) return true; + } + } + } + return false; + } + + private List crafting_slot_stacks_to_add() + { + final ArrayList slots = new ArrayList(); + final List tocraft = history.current(); + final int stack_sizes[] = {-1,-1,-1,-1,-1,-1,-1,-1,-1}; + if(tocraft.isEmpty()) return slots; + for(int i=0; i<9; ++i) { + if((i+CraftingHistory.INPUT_STACKS_BEGIN) >= tocraft.size()) break; + final ItemStack needed = tocraft.get(i+CraftingHistory.INPUT_STACKS_BEGIN); + final ItemStack palced = getStackInSlot(i+CRAFTING_SLOTS_BEGIN); + if(needed.isEmpty() && (!palced.isEmpty())) return slots; // history vs grid mismatch. + if((!palced.isEmpty()) && (!itemstack_recipe_match(needed, palced))) return slots; // also mismatch + if(!needed.isEmpty()) stack_sizes[i] = palced.getCount(); + } + int min_placed = 64, max_placed=0; + for(int i=0; i<9; ++i) { // todo: check if java has something like std::accumulate<>() + if(stack_sizes[i] < 0) continue; + min_placed = Math.min(min_placed, stack_sizes[i]); + max_placed = Math.max(max_placed, stack_sizes[i]); + } + int fillup_size = (max_placed <= min_placed) ? (min_placed + 1) : max_placed; + for(int i=0; i<9; ++i) { + if(stack_sizes[i] < 0) continue; + if(fillup_size > getStackInSlot(i+CRAFTING_SLOTS_BEGIN).getMaxStackSize()) return slots; // can't fillup all + } + for(int i=0; i<9; ++i) { + if(stack_sizes[i] < 0) { + slots.add(ItemStack.EMPTY); + } else { + ItemStack st = getStackInSlot(i+CRAFTING_SLOTS_BEGIN).copy(); + if(st.isEmpty()) { + st = tocraft.get(i+CraftingHistory.INPUT_STACKS_BEGIN).copy(); + st.setCount(Math.min(st.getMaxStackSize(), fillup_size)); + } else { + st.setCount(MathHelper.clamp(fillup_size-st.getCount(), 0, st.getMaxStackSize())); + } + slots.add(st); + } + } + return slots; + } + + /** + * Moves as much items from the stack to the slots in range [first_slot, last_slot] of the inventory, + * filling up existing stacks first, then (player inventory only) checks appropriate empty slots next + * to stacks that have that item already, and last uses any empty slot that can be found. + * Returns the stack that is still remaining in the referenced `stack`. + */ + private ItemStack move_stack_to_inventory(final ItemStack stack_to_move, IInventory inventory, final int slot_begin, final int slot_end, boolean only_fillup) + { + final ItemStack mvstack = stack_to_move.copy(); + if((mvstack.isEmpty()) || (slot_begin < 0) || (slot_end > inventory.getSizeInventory())) return mvstack; + // first iteration: fillup existing stacks + for(int i = slot_begin; i < slot_end; ++i) { + final ItemStack stack = inventory.getStackInSlot(i); + if((stack.isEmpty()) || (!stack.isItemEqual(mvstack))) continue; + int nmax = stack.getMaxStackSize() - stack.getCount(); + if(mvstack.getCount() <= nmax) { + stack.setCount(stack.getCount()+mvstack.getCount()); + mvstack.setCount(0); + inventory.setInventorySlotContents(i, stack); + return mvstack; + } else { + stack.setCount(stack.getMaxStackSize()); + mvstack.shrink(nmax); + inventory.setInventorySlotContents(i, stack); + } + } + if(only_fillup) return mvstack; + if(inventory instanceof InventoryPlayer) { + // second iteration: use appropriate empty slots + for(int i = slot_begin+1; i < slot_end-1; ++i) { + final ItemStack stack = inventory.getStackInSlot(i); + if(!stack.isEmpty()) continue; + if((!inventory.getStackInSlot(i+1).isItemEqual(mvstack)) && (!inventory.getStackInSlot(i-1).isItemEqual(mvstack))) continue; + inventory.setInventorySlotContents(i, mvstack.copy()); + mvstack.setCount(0); + return mvstack; + } + } + // third iteration: use any empty slots + for(int i = slot_begin; i < slot_end; ++i) { + final ItemStack stack = inventory.getStackInSlot(i); + if(!stack.isEmpty()) continue; + inventory.setInventorySlotContents(i, mvstack.copy()); + mvstack.setCount(0); + return mvstack; + } + return mvstack; + } + + /** + * Moves as much items from the slots in range [first_slot, last_slot] of the inventory into a new stack. + * Implicitly shrinks the inventory stacks and the `request_stack`. + */ + private ItemStack move_stack_from_inventory(IInventory inventory, final ItemStack request_stack, final int slot_begin, final int slot_end) + { + ItemStack fetched_stack = request_stack.copy(); + fetched_stack.setCount(0); + int n_left = request_stack.getCount(); + while(n_left > 0) { + int smallest_stack_size = 0; + int smallest_stack_index = -1; + for(int i = slot_begin; i < slot_end; ++i) { + final ItemStack stack = inventory.getStackInSlot(i); + if((!stack.isEmpty()) && (stack.isItemEqual(request_stack))) { + // Never automatically place stuff with nbt (except a few allowed like "Damage"), + // as this could be a full crate, a valuable tool item, etc. For these recipes + // the user has to place this item manually. + if(stack.hasTagCompound()) { + final NBTTagCompound nbt = stack.getTagCompound(); + int n = stack.getTagCompound().getSize(); + if((n > 0) && (stack.getTagCompound().hasKey("Damage"))) --n; + if(n > 0) continue; + } + fetched_stack = stack.copy(); // copy exact stack with nbt and tool damage, otherwise we have an automagical repair of items. + fetched_stack.setCount(0); + int n = stack.getCount(); + if((n < smallest_stack_size) || (smallest_stack_size <= 0)) { + smallest_stack_size = n; + smallest_stack_index = i; + } + } + } + if(smallest_stack_index < 0) { + break; // no more items available + } else { + int n = Math.min(n_left, smallest_stack_size); + n_left -= n; + fetched_stack.grow(n); + ItemStack st = inventory.getStackInSlot(smallest_stack_index); + st.shrink(n); + inventory.setInventorySlotContents(smallest_stack_index, st); + } + } + return fetched_stack; + } + + private boolean clear_grid_to_storage(EntityPlayer player) + { + boolean changed = false; + for(int grid_i = CRAFTING_SLOTS_BEGIN; grid_i < (CRAFTING_SLOTS_BEGIN + NUM_OF_CRAFTING_SLOTS); ++grid_i) { + ItemStack stack = getStackInSlot(grid_i); + if(stack.isEmpty()) continue; + ItemStack remaining = move_stack_to_inventory(stack, this, STORAGE_SLOTS_BEGIN, STORAGE_SLOTS_BEGIN+NUM_OF_STORAGE_SLOTS, false); + setInventorySlotContents(grid_i, remaining); + changed = true; + } + return changed; + } + + private boolean clear_grid_to_player(EntityPlayer player) + { + boolean changed = false; + for(int grid_i = CRAFTING_SLOTS_BEGIN; grid_i < (CRAFTING_SLOTS_BEGIN + NUM_OF_CRAFTING_SLOTS); ++grid_i) { + ItemStack remaining = getStackInSlot(grid_i); + if(remaining.isEmpty()) continue; + remaining = move_stack_to_inventory(remaining, player.inventory,9, 36, true); // prefer filling up inventory stacks + remaining = move_stack_to_inventory(remaining, player.inventory,0, 9, true); // then fill up the hotbar stacks + remaining = move_stack_to_inventory(remaining, player.inventory,9, 36, false); // then allow empty stacks in inventory + remaining = move_stack_to_inventory(remaining, player.inventory,0, 9, false); // then new stacks in the hotbar + this.setInventorySlotContents(grid_i, remaining); + changed = true; + } + return changed; + } + + enum EnumRefabPlacement { UNCHANGED, INCOMPLETE, PLACED } + private EnumRefabPlacement place_refab_stacks(IInventory inventory, final int slot_begin, final int slot_end) + { + List to_fill = crafting_slot_stacks_to_add(); + boolean slots_changed = false; + boolean missing_item = false; + int num_slots_placed = 0; + if(!to_fill.isEmpty()) { + for(int it_guard=63; it_guard>=0; --it_guard) { + boolean slots_updated = false; + for(int i = 0; i < 9; ++i) { + final ItemStack req_stack = to_fill.get(i).copy(); + if(req_stack.isEmpty()) continue; + req_stack.setCount(1); + to_fill.get(i).shrink(1); + final ItemStack mv_stack = move_stack_from_inventory(inventory, req_stack, slot_begin, slot_end); + if(mv_stack.isEmpty()) { missing_item=true; continue; } + // sizes already checked + ItemStack grid_stack = getStackInSlot(i + CRAFTING_SLOTS_BEGIN).copy(); + if(grid_stack.isEmpty()) { + grid_stack = mv_stack.copy(); + } else { + grid_stack.grow(mv_stack.getCount()); + } + setInventorySlotContents(i + CRAFTING_SLOTS_BEGIN, grid_stack); + slots_changed = true; + slots_updated = true; + } + if(!slots_updated) break; + } + } + if(!slots_changed) { + return EnumRefabPlacement.UNCHANGED; + } else if(missing_item) { + return EnumRefabPlacement.INCOMPLETE; + } else { + return EnumRefabPlacement.PLACED; + } + } + + private EnumRefabPlacement distribute_stack(IInventory inventory, final int slotno) + { + List to_refab = crafting_slot_stacks_to_add(); + ItemStack to_distribute = inventory.getStackInSlot(slotno).copy(); + if(to_distribute.isEmpty()) return EnumRefabPlacement.UNCHANGED; + int matching_grid_stack_sizes[] = {-1,-1,-1,-1,-1,-1,-1,-1,-1}; + int max_matching_stack_size = -1; + int min_matching_stack_size = 65; + int total_num_missing_stacks = 0; + for(int i=0; i<9; ++i) { + final ItemStack grid_stack = getStackInSlot(i + CRAFTING_SLOTS_BEGIN); + final ItemStack refab_stack = to_refab.isEmpty() ? ItemStack.EMPTY : to_refab.get(i).copy(); + if((!grid_stack.isEmpty()) && (grid_stack.isItemEqual(to_distribute))) { + matching_grid_stack_sizes[i] = grid_stack.getCount(); + total_num_missing_stacks += grid_stack.getMaxStackSize()-grid_stack.getCount(); + if(max_matching_stack_size < matching_grid_stack_sizes[i]) max_matching_stack_size = matching_grid_stack_sizes[i]; + if(min_matching_stack_size > matching_grid_stack_sizes[i]) min_matching_stack_size = matching_grid_stack_sizes[i]; + } else if((!refab_stack.isEmpty()) && (refab_stack.isItemEqual(to_distribute))) { + matching_grid_stack_sizes[i] = 0; + total_num_missing_stacks += grid_stack.getMaxStackSize(); + if(max_matching_stack_size < matching_grid_stack_sizes[i]) max_matching_stack_size = matching_grid_stack_sizes[i]; + if(min_matching_stack_size > matching_grid_stack_sizes[i]) min_matching_stack_size = matching_grid_stack_sizes[i]; + } else if(grid_stack.isEmpty() && (!refab_stack.isEmpty())) { + if(itemstack_recipe_match(to_distribute, refab_stack)) { + matching_grid_stack_sizes[i] = 0; + total_num_missing_stacks += grid_stack.getMaxStackSize(); + if(max_matching_stack_size < matching_grid_stack_sizes[i]) max_matching_stack_size = matching_grid_stack_sizes[i]; + if(min_matching_stack_size > matching_grid_stack_sizes[i]) min_matching_stack_size = matching_grid_stack_sizes[i]; + } + } + } + if(min_matching_stack_size < 0) return EnumRefabPlacement.UNCHANGED; + final int stack_limit_size = Math.min(to_distribute.getMaxStackSize(), getInventoryStackLimit()); + if(min_matching_stack_size >= stack_limit_size) return EnumRefabPlacement.UNCHANGED; + int n_to_distribute = to_distribute.getCount(); + for(int it_guard=63; it_guard>=0; --it_guard) { + if(n_to_distribute <= 0) break; + for(int i=0; i<9; ++i) { + if(n_to_distribute <= 0) break; + if(matching_grid_stack_sizes[i] == min_matching_stack_size) { + ++matching_grid_stack_sizes[i]; + --n_to_distribute; + } + } + if(min_matching_stack_size < max_matching_stack_size) { + ++min_matching_stack_size; // distribute short stacks + } else { + ++min_matching_stack_size; // stacks even, increase all + max_matching_stack_size = min_matching_stack_size; + } + if(min_matching_stack_size >= stack_limit_size) break; // all full + } + if(n_to_distribute == to_distribute.getCount()) return EnumRefabPlacement.UNCHANGED; // was already full + if(n_to_distribute <= 0) { + inventory.setInventorySlotContents(slotno, ItemStack.EMPTY); + } else { + to_distribute.setCount(n_to_distribute); + inventory.setInventorySlotContents(slotno, to_distribute); + } + for(int i=0; i<9; ++i) { + if(matching_grid_stack_sizes[i] < 0) continue; + ItemStack grid_stack = getStackInSlot(i + CRAFTING_SLOTS_BEGIN).copy(); + if(grid_stack.isEmpty()) grid_stack = to_distribute.copy(); + grid_stack.setCount(matching_grid_stack_sizes[i]); + setInventorySlotContents(i + CRAFTING_SLOTS_BEGIN, grid_stack); + } + return EnumRefabPlacement.PLACED; + } + // Networking.IPacketReceiver -------------------------------------------------------------- @Override public void onClientPacketReceived(EntityPlayer player, NBTTagCompound nbt) { - if(with_assist && nbt.hasKey("button")) { - switch(nbt.getInteger("button")) { - case BGui.BUTTON_NEXT: + if((world.isRemote) || (!(player.openContainer instanceof BContainer))) return; + final BContainer container = (BContainer)player.openContainer; + if(container.te != this) return; + boolean te_changed = false; + boolean player_inventory_changed = false; + if(with_assist && nbt.hasKey("action")) { + switch(nbt.getInteger("action")) { + case BGui.BUTTON_NEXT: { history.next(); syncHistory(player); - break; - case BGui.BUTTON_PREV: + // implicitly clear the grid, so that the player can see the refab, and that no recipe is active. + if(clear_grid_to_player(player)) { te_changed = true; player_inventory_changed = true; } + if(clear_grid_to_storage(player)) te_changed = true; + } break; + case BGui.BUTTON_PREV: { history.prev(); syncHistory(player); - break; - case BGui.BUTTON_FROM_STORAGE: - //System.out.println("BUTTON_FROM_STORAGE"); - break; - case BGui.BUTTON_TO_STORAGE: - //System.out.println("BUTTON_TO_STORAGE"); - break; - case BGui.BUTTON_FROM_PLAYER: - //System.out.println("BUTTON_FROM_PLAYER"); - break; - case BGui.BUTTON_TO_PLAYER: - //System.out.println("BUTTON_TO_PLAYER"); - break; + if(clear_grid_to_player(player)) { te_changed = true; player_inventory_changed = true; } + if(clear_grid_to_storage(player)) te_changed = true; + } break; + case BGui.BUTTON_CLEAR_GRID: { + history.reset_selection(); + syncHistory(player); + if(clear_grid_to_player(player)) { te_changed = true; player_inventory_changed = true; } + if(clear_grid_to_storage(player)) te_changed = true; + } break; + case BGui.BUTTON_TO_STORAGE: { + if(clear_grid_to_storage(player)) te_changed = true; + } break; + case BGui.BUTTON_TO_PLAYER: { + if(clear_grid_to_player(player)) { te_changed = true; player_inventory_changed = true; } + } break; + case BGui.BUTTON_FROM_STORAGE: { + EnumRefabPlacement from_storage = place_refab_stacks(this, STORAGE_SLOTS_BEGIN, STORAGE_SLOTS_BEGIN + NUM_OF_STORAGE_SLOTS); + if(from_storage != EnumRefabPlacement.UNCHANGED) te_changed = true; + } break; + case BGui.BUTTON_FROM_PLAYER: { + EnumRefabPlacement from_player_inv = place_refab_stacks(player.inventory, 9, 36); + if(from_player_inv != EnumRefabPlacement.UNCHANGED) { te_changed = true; player_inventory_changed = true; } + if(from_player_inv != EnumRefabPlacement.PLACED) { + EnumRefabPlacement from_hotbar = place_refab_stacks(player.inventory, 0, 9); + if(from_hotbar != EnumRefabPlacement.UNCHANGED) { te_changed = true; player_inventory_changed = true; } + } + } break; + case BGui.ACTION_PLACE_CURRENT_HISTORY_SEL: { + EnumRefabPlacement from_storage = place_refab_stacks(this, STORAGE_SLOTS_BEGIN, STORAGE_SLOTS_BEGIN + NUM_OF_STORAGE_SLOTS); + if(from_storage != EnumRefabPlacement.UNCHANGED) te_changed = true; + if(from_storage != EnumRefabPlacement.PLACED) { + EnumRefabPlacement from_player_inv = place_refab_stacks(player.inventory, 9, 36); + if(from_player_inv != EnumRefabPlacement.UNCHANGED) { te_changed = true; player_inventory_changed = true; } + if(from_player_inv != EnumRefabPlacement.PLACED) { + EnumRefabPlacement from_hotbar = place_refab_stacks(player.inventory, 0, 9); + if(from_hotbar != EnumRefabPlacement.UNCHANGED) { te_changed = true; player_inventory_changed = true; } + } + } + } break; + case BGui.ACTION_PLACE_SHIFTCLICKED_STACK: { + final int container_slot_id = nbt.getInteger("containerslot"); + if((container_slot_id < 10) || (container_slot_id > 53)) break; // out of range + if(container_slot_id >= 46) { + // from storage + final int storage_slot = container_slot_id - 46 + STORAGE_SLOTS_BEGIN; + EnumRefabPlacement stat = distribute_stack(this, storage_slot); + if(stat != EnumRefabPlacement.UNCHANGED) te_changed = true; + } else { + // from player + int player_slot = (container_slot_id >= 37) ? (container_slot_id-37) : (container_slot_id-10+9); + EnumRefabPlacement stat = distribute_stack(player.inventory, player_slot); + if(stat != EnumRefabPlacement.UNCHANGED) { player_inventory_changed = true; te_changed = true; } + } + } break; } } + if(te_changed) markDirty(); + if(player_inventory_changed) player.inventory.markDirty(); + if(te_changed || player_inventory_changed) { + container.onCraftMatrixChanged(this); + container.detectAndSendChanges(); + } } @Override diff --git a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorDirected.java b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorDirected.java index 95bea2d..acb35e4 100644 --- a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorDirected.java +++ b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorDirected.java @@ -8,7 +8,6 @@ */ package wile.engineersdecor.blocks; -import net.minecraft.block.SoundType; import wile.engineersdecor.detail.ModAuxiliaries; import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.BlockDirectional; @@ -16,9 +15,11 @@ import net.minecraft.block.material.Material; import net.minecraft.block.properties.PropertyDirection; import net.minecraft.block.state.BlockFaceShape; import net.minecraft.block.state.IBlockState; +import net.minecraft.block.SoundType; import net.minecraft.entity.EntityLivingBase; import net.minecraft.world.World; import net.minecraft.world.IBlockAccess; +import net.minecraft.util.EnumHand; import net.minecraft.util.Mirror; import net.minecraft.util.Rotation; import net.minecraft.util.EnumFacing; @@ -67,12 +68,14 @@ public class BlockDecorDirected extends BlockDecor { return false; } @Override - @SuppressWarnings("deprecation") + public int getLightValue(IBlockState state, IBlockAccess world, BlockPos pos) + { return (int)((config & CFG_LIGHT_VALUE_MASK) >> CFG_LIGHT_VALUE_SHIFT); } + + @Override public BlockFaceShape getBlockFaceShape(IBlockAccess world, IBlockState state, BlockPos pos, EnumFacing face) { return BlockFaceShape.UNDEFINED; } @Override - @SuppressWarnings("deprecation") public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) { return AABBs.get(((EnumFacing)state.getValue(FACING)).getIndex() & 0x7); } @@ -102,7 +105,6 @@ public class BlockDecorDirected extends BlockDecor { return state.withRotation(mirrorIn.toRotation((EnumFacing)state.getValue(FACING))); } @Override - @SuppressWarnings("deprecation") public boolean canPlaceBlockOnSide(World world, BlockPos pos, EnumFacing side) { if(!super.canPlaceBlockOnSide(world, pos, side)) return false; @@ -110,8 +112,7 @@ public class BlockDecorDirected extends BlockDecor } @Override - @SuppressWarnings("deprecation") - public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) + public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer, EnumHand hand) { if((config & (CFG_HORIZIONTAL|CFG_LOOK_PLACEMENT)) == (CFG_HORIZIONTAL|CFG_LOOK_PLACEMENT)) { // horizontal placement in direction the player is looking @@ -126,6 +127,7 @@ public class BlockDecorDirected extends BlockDecor // default: placement on the face the player clicking } if((config & CFG_OPPOSITE_PLACEMENT)!=0) facing = facing.getOpposite(); + if(((config & CFG_FLIP_PLACEMENT_SHIFTCLICK) != 0) && (placer.isSneaking())) facing = facing.getOpposite(); return getDefaultState().withProperty(FACING, facing); } } diff --git a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorFull.java b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorFull.java index a237d36..1110a9a 100644 --- a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorFull.java +++ b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorFull.java @@ -23,10 +23,7 @@ import javax.annotation.Nullable; public class BlockDecorFull extends BlockDecor { public BlockDecorFull(@Nonnull String registryName, long config, @Nullable Material material, float hardness, float resistance, @Nullable SoundType sound) - { - super(registryName, config, material, hardness, resistance, sound); - setLightOpacity(255); - } + { super(registryName, config, material, hardness, resistance, sound); } @Override public boolean isOpaqueCube(IBlockState state) diff --git a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorFurnace.java b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorFurnace.java index 5ffda4d..c5317ca 100644 --- a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorFurnace.java +++ b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorFurnace.java @@ -8,12 +8,9 @@ */ package wile.engineersdecor.blocks; -import com.google.common.collect.Maps; -import net.minecraft.entity.item.EntityXPOrb; -import net.minecraft.init.SoundEvents; -import net.minecraftforge.energy.CapabilityEnergy; -import net.minecraftforge.energy.IEnergyStorage; import wile.engineersdecor.ModEngineersDecor; +import wile.engineersdecor.detail.ExtItems; + import net.minecraft.stats.StatList; import net.minecraft.block.properties.PropertyBool; import net.minecraft.block.state.BlockStateContainer; @@ -23,6 +20,7 @@ import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.world.World; import net.minecraft.world.Explosion; +import net.minecraft.entity.item.EntityXPOrb; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; @@ -30,6 +28,7 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.tileentity.TileEntityFurnace; import net.minecraft.tileentity.TileEntity; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.init.SoundEvents; import net.minecraft.init.Items; import net.minecraft.item.*; import net.minecraft.item.crafting.FurnaceRecipes; @@ -43,12 +42,15 @@ import net.minecraft.util.text.TextComponentTranslation; import net.minecraft.util.math.MathHelper; import net.minecraft.util.*; import net.minecraftforge.common.capabilities.Capability; +import net.minecraftforge.energy.CapabilityEnergy; +import net.minecraftforge.energy.IEnergyStorage; import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.wrapper.SidedInvWrapper; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import wile.engineersdecor.detail.ExtItems; + +import com.google.common.collect.Maps; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.Map; @@ -469,7 +471,7 @@ public class BlockDecorFurnace extends BlockDecorDirected private int proc_time_needed_; private int boost_energy_; // small, not saved in nbt. private boolean heater_inserted_ = false; - private NonNullList stacks_; + protected NonNullList stacks_; public static void on_config(int speed_percent, int fuel_efficiency_percent, int boost_energy_per_tick) { @@ -483,7 +485,7 @@ public class BlockDecorFurnace extends BlockDecorDirected public BTileEntity() { reset(); } - public void reset() + protected void reset() { stacks_ = NonNullList.withSize(NUM_OF_SLOTS, ItemStack.EMPTY); proc_time_elapsed_ = 0; @@ -505,7 +507,7 @@ public class BlockDecorFurnace extends BlockDecorDirected fuel_burntime_ = getItemBurnTime(stacks_.get(SMELTING_FUEL_SLOT_NO)); } - private void writenbt(NBTTagCompound compound) + protected void writenbt(NBTTagCompound compound) { compound.setInteger("BurnTime", MathHelper.clamp(burntime_left_,0 , MAX_BURNTIME)); compound.setInteger("CookTime", MathHelper.clamp(proc_time_elapsed_, 0, MAX_BURNTIME)); @@ -650,68 +652,6 @@ public class BlockDecorFurnace extends BlockDecorDirected public void clear() { stacks_.clear(); } - @Override - public void update() - { - if(--tick_timer_ > 0) return; - tick_timer_ = TICK_INTERVAL; - final boolean was_burning = isBurning(); - if(was_burning) burntime_left_ -= TICK_INTERVAL; - if(burntime_left_ < 0) burntime_left_ = 0; - if(world.isRemote) return; - boolean dirty = false; - if(--fifo_timer_ <= 0) { - fifo_timer_ = FIFO_INTERVAL/TICK_INTERVAL; - // note, intentionally not using bitwise OR piping. - if(transferItems(FIFO_OUTPUT_0_SLOT_NO, FIFO_OUTPUT_1_SLOT_NO, 1)) dirty = true; - if(transferItems(SMELTING_OUTPUT_SLOT_NO, FIFO_OUTPUT_0_SLOT_NO, 1)) dirty = true; - if(transferItems(FIFO_FUEL_0_SLOT_NO, SMELTING_FUEL_SLOT_NO, 1)) dirty = true; - if(transferItems(FIFO_FUEL_1_SLOT_NO, FIFO_FUEL_0_SLOT_NO, 1)) dirty = true; - if(transferItems(FIFO_INPUT_0_SLOT_NO, SMELTING_INPUT_SLOT_NO, 1)) dirty = true; - if(transferItems(FIFO_INPUT_1_SLOT_NO, FIFO_INPUT_0_SLOT_NO, 1)) dirty = true; - heater_inserted_ = (ExtItems.IE_EXTERNAL_HEATER==null) // without IE always allow electrical boost - || (stacks_.get(AUX_0_SLOT_NO).getItem()==ExtItems.IE_EXTERNAL_HEATER) - || (stacks_.get(AUX_1_SLOT_NO).getItem()==ExtItems.IE_EXTERNAL_HEATER); - } - ItemStack fuel = stacks_.get(SMELTING_FUEL_SLOT_NO); - if(isBurning() || (!fuel.isEmpty()) && (!(stacks_.get(SMELTING_INPUT_SLOT_NO)).isEmpty())) { - if(!isBurning() && canSmelt()) { - burntime_left_ = (int)MathHelper.clamp((proc_fuel_efficiency_ * getItemBurnTime(fuel)), 0, MAX_BURNTIME); - fuel_burntime_ = (burntime_left_ * proc_speed_interval_) / VANILLA_FURNACE_SPEED_INTERVAL; - if(isBurning()) { - dirty = true; - if(!fuel.isEmpty()) { - Item fuel_item = fuel.getItem(); - fuel.shrink(1); - if(fuel.isEmpty()) stacks_.set(SMELTING_FUEL_SLOT_NO, fuel_item.getContainerItem(fuel)); - } - } - } - if(isBurning() && canSmelt()) { - proc_time_elapsed_ += TICK_INTERVAL; - if(heater_inserted_ && (boost_energy_ >= boost_energy_consumption)) { boost_energy_ = 0; proc_time_elapsed_ += TICK_INTERVAL; } - if(proc_time_elapsed_ >= proc_time_needed_) { - proc_time_elapsed_ = 0; - proc_time_needed_ = getCookTime(stacks_.get(SMELTING_INPUT_SLOT_NO)); - smeltItem(); - dirty = true; - } - } else { - proc_time_elapsed_ = 0; - } - } else if(!isBurning() && (proc_time_elapsed_ > 0)) { - proc_time_elapsed_ = MathHelper.clamp(proc_time_elapsed_-2, 0, proc_time_needed_); - } - if(was_burning != isBurning()) { - dirty = true; - final IBlockState state = world.getBlockState(pos); - if(state.getBlock() instanceof BlockDecorFurnace) { - world.setBlockState(pos, state.withProperty(LIT, isBurning())); - } - } - if(dirty) markDirty(); - } - public boolean isBurning() { return burntime_left_ > 0; } @@ -752,7 +692,7 @@ public class BlockDecorFurnace extends BlockDecorDirected return changed; } - private boolean canSmelt() + protected boolean canSmelt() { if(stacks_.get(SMELTING_INPUT_SLOT_NO).isEmpty()) return false; final ItemStack recipe_result_items = BRecipes.instance().getSmeltingResult(stacks_.get(SMELTING_INPUT_SLOT_NO)); @@ -770,7 +710,6 @@ public class BlockDecorFurnace extends BlockDecorDirected final ItemStack smelting_input_stack = stacks_.get(SMELTING_INPUT_SLOT_NO); final ItemStack recipe_result_items = BRecipes.instance().getSmeltingResult(smelting_input_stack); final ItemStack smelting_output_stack = stacks_.get(SMELTING_OUTPUT_SLOT_NO); - final ItemStack fuel_stack = stacks_.get(SMELTING_FUEL_SLOT_NO); if(smelting_output_stack.isEmpty()) { stacks_.set(SMELTING_OUTPUT_SLOT_NO, recipe_result_items.copy()); } else if(smelting_output_stack.getItem() == recipe_result_items.getItem()) { @@ -851,6 +790,70 @@ public class BlockDecorFurnace extends BlockDecorDirected return super.getCapability(capability, facing); } } + + // ITickable ------------------------------------------------------------------------------------ + + @Override + public void update() + { + if(--tick_timer_ > 0) return; + tick_timer_ = TICK_INTERVAL; + final boolean was_burning = isBurning(); + if(was_burning) burntime_left_ -= TICK_INTERVAL; + if(burntime_left_ < 0) burntime_left_ = 0; + if(world.isRemote) return; + boolean dirty = false; + if(--fifo_timer_ <= 0) { + fifo_timer_ = FIFO_INTERVAL/TICK_INTERVAL; + // note, intentionally not using bitwise OR piping. + if(transferItems(FIFO_OUTPUT_0_SLOT_NO, FIFO_OUTPUT_1_SLOT_NO, 1)) dirty = true; + if(transferItems(SMELTING_OUTPUT_SLOT_NO, FIFO_OUTPUT_0_SLOT_NO, 1)) dirty = true; + if(transferItems(FIFO_FUEL_0_SLOT_NO, SMELTING_FUEL_SLOT_NO, 1)) dirty = true; + if(transferItems(FIFO_FUEL_1_SLOT_NO, FIFO_FUEL_0_SLOT_NO, 1)) dirty = true; + if(transferItems(FIFO_INPUT_0_SLOT_NO, SMELTING_INPUT_SLOT_NO, 1)) dirty = true; + if(transferItems(FIFO_INPUT_1_SLOT_NO, FIFO_INPUT_0_SLOT_NO, 1)) dirty = true; + heater_inserted_ = (ExtItems.IE_EXTERNAL_HEATER==null) // without IE always allow electrical boost + || (stacks_.get(AUX_0_SLOT_NO).getItem()==ExtItems.IE_EXTERNAL_HEATER) + || (stacks_.get(AUX_1_SLOT_NO).getItem()==ExtItems.IE_EXTERNAL_HEATER); + } + ItemStack fuel = stacks_.get(SMELTING_FUEL_SLOT_NO); + if(isBurning() || (!fuel.isEmpty()) && (!(stacks_.get(SMELTING_INPUT_SLOT_NO)).isEmpty())) { + if(!isBurning() && canSmelt()) { + burntime_left_ = (int)MathHelper.clamp((proc_fuel_efficiency_ * getItemBurnTime(fuel)), 0, MAX_BURNTIME); + fuel_burntime_ = (burntime_left_ * proc_speed_interval_) / VANILLA_FURNACE_SPEED_INTERVAL; + if(isBurning()) { + dirty = true; + if(!fuel.isEmpty()) { + Item fuel_item = fuel.getItem(); + fuel.shrink(1); + if(fuel.isEmpty()) stacks_.set(SMELTING_FUEL_SLOT_NO, fuel_item.getContainerItem(fuel)); + } + } + } + if(isBurning() && canSmelt()) { + proc_time_elapsed_ += TICK_INTERVAL; + if(heater_inserted_ && (boost_energy_ >= boost_energy_consumption)) { boost_energy_ = 0; proc_time_elapsed_ += TICK_INTERVAL; } + if(proc_time_elapsed_ >= proc_time_needed_) { + proc_time_elapsed_ = 0; + proc_time_needed_ = getCookTime(stacks_.get(SMELTING_INPUT_SLOT_NO)); + smeltItem(); + dirty = true; + } + } else { + proc_time_elapsed_ = 0; + } + } else if(!isBurning() && (proc_time_elapsed_ > 0)) { + proc_time_elapsed_ = MathHelper.clamp(proc_time_elapsed_-2, 0, proc_time_needed_); + } + if(was_burning != isBurning()) { + dirty = true; + final IBlockState state = world.getBlockState(pos); + if(state.getBlock() instanceof BlockDecorFurnace) { + world.setBlockState(pos, state.withProperty(LIT, isBurning())); + } + } + if(dirty) markDirty(); + } } //-------------------------------------------------------------------------------------------------------------------- diff --git a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorFurnaceElectrical.java b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorFurnaceElectrical.java new file mode 100644 index 0000000..92c9694 --- /dev/null +++ b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorFurnaceElectrical.java @@ -0,0 +1,683 @@ +/* + * @file BlockDecorFurnaceElectrical.java + * @author Stefan Wilhelm (wile) + * @copyright (C) 2019 Stefan Wilhelm + * @license MIT (see https://opensource.org/licenses/MIT) + * + * ED electrical furnace. + */ +package wile.engineersdecor.blocks; + + +import wile.engineersdecor.ModEngineersDecor; + +import net.minecraft.stats.StatList; +import net.minecraft.block.SoundType; +import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; +import net.minecraft.world.World; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.init.Items; +import net.minecraft.item.*; +import net.minecraft.inventory.*; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.MathHelper; +import net.minecraft.util.*; +import net.minecraftforge.common.capabilities.Capability; +import net.minecraftforge.energy.CapabilityEnergy; +import net.minecraftforge.energy.IEnergyStorage; +import net.minecraftforge.items.CapabilityItemHandler; +import net.minecraftforge.items.IItemHandler; +import net.minecraftforge.items.ItemHandlerHelper; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import java.util.Random; + +public class BlockDecorFurnaceElectrical extends BlockDecorFurnace +{ + public BlockDecorFurnaceElectrical(@Nonnull String registryName, long config, @Nullable Material material, float hardness, float resistance, @Nullable SoundType sound, @Nonnull AxisAlignedBB unrotatedAABB) + { + super(registryName, config, material, hardness, resistance, sound, unrotatedAABB); + } + + @Nullable + public TileEntity createTileEntity(World world, IBlockState state) + { return new BlockDecorFurnaceElectrical.BTileEntity(); } + + @Override + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) + { + if(world.isRemote) return true; + player.openGui(ModEngineersDecor.instance, ModEngineersDecor.GuiHandler.GUIID_ELECTRICAL_LAB_FURNACE, world, pos.getX(), pos.getY(), pos.getZ()); + player.addStat(StatList.FURNACE_INTERACTION); + return true; + } + + @Override + @SideOnly(Side.CLIENT) + public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rnd) + {} + + //-------------------------------------------------------------------------------------------------------------------- + // ModEngineersDecor.GuiHandler connectors + //-------------------------------------------------------------------------------------------------------------------- + + public static Object getServerGuiElement(final EntityPlayer player, final World world, final BlockPos pos, final TileEntity te) + { return (te instanceof BTileEntity) ? (new BContainer(player.inventory, world, pos, (BTileEntity)te)) : null; } + + public static Object getClientGuiElement(final EntityPlayer player, final World world, final BlockPos pos, final TileEntity te) + { return (te instanceof BTileEntity) ? (new BGui(player.inventory, world, pos, (BTileEntity)te)) : null; } + + //-------------------------------------------------------------------------------------------------------------------- + // GUI + //-------------------------------------------------------------------------------------------------------------------- + + @SideOnly(Side.CLIENT) + private static class BGui extends GuiContainer + { + private final BTileEntity te; + + public BGui(InventoryPlayer playerInventory, World world, BlockPos pos, BTileEntity te) + { super(new BContainer(playerInventory, world, pos, te)); this.te = te; } + + @Override + public void initGui() + { super.initGui(); } + + @Override + public void drawScreen(int mouseX, int mouseY, float partialTicks) + { + drawDefaultBackground(); + super.drawScreen(mouseX, mouseY, partialTicks); + renderHoveredToolTip(mouseX, mouseY); + } + + @Override + protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) + { + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); + mc.getTextureManager().bindTexture(new ResourceLocation(ModEngineersDecor.MODID, "textures/gui/small_electrical_furnace_gui.png")); + final int x0=(width-xSize)/2, y0=(height-ySize)/2, w=xSize, h=ySize; + drawTexturedModalRect(x0, y0, 0, 0, w, h); + if(BTileEntity.isBurning(te)) { + if(BlockDecorFurnace.BTileEntity.isBurning(te)) { + final int hi = 13; + final int k = heat_px(hi); + drawTexturedModalRect(x0+61, y0+53+hi-k, 177, hi-k, 13, k); + } + } + drawTexturedModalRect(x0+79, y0+30, 176, 15, 1+progress_px(17), 15); + int we = energy_px(32, 8); + if(we>0) drawTexturedModalRect(x0+88, y0+53, 185, 30, we, 13); + } + + private int progress_px(int pixels) + { final int tc=te.getField(2), T=te.getField(3); return ((T>0) && (tc>0)) ? (tc * pixels / T) : (0); } + + private int heat_px(int pixels) + { + int k = ((te.getField(0) * (pixels+1)) / (BlockDecorFurnaceElectrical.BTileEntity.HEAT_CAPACITY)); + return (k < pixels) ? k : pixels; + } + + private int energy_px(int maxwidth, int quantization) + { + int k = ((maxwidth * te.getField(1) * 9) / 8) / (te.getMaxEnergyStored()+1); + k = (k >= maxwidth-2) ? maxwidth : k; + if(quantization > 0) k = ((k+(quantization/2))/quantization) * quantization; + return k; + } + + } + + //-------------------------------------------------------------------------------------------------------------------- + // container + //-------------------------------------------------------------------------------------------------------------------- + + public static class BContainer extends Container + { + private static final int PLAYER_INV_START_SLOTNO = 7; + private final World world; + private final BlockPos pos; + private final EntityPlayer player; + private final BTileEntity te; + private int burntime_left_, energy_stored_, proc_time_elapsed_, proc_time_needed_, speed_; + + public BContainer(InventoryPlayer playerInventory, World world, BlockPos pos, BTileEntity te) + { + this.player = playerInventory.player; + this.world = world; + this.pos = pos; + this.te = te; + addSlotToContainer(new Slot(te, 0, 59, 28)); // smelting input + addSlotToContainer(new Slot(te, 1, 16, 52)); // aux + addSlotToContainer(new BSlotResult(playerInventory.player, te, 2, 101, 28)); // smelting result + addSlotToContainer(new BSlotInpFifo(te, 3, 34, 28)); // input fifo 0 + addSlotToContainer(new BSlotInpFifo(te, 4, 16, 28)); // input fifo 1 + addSlotToContainer(new BSlotOutFifo(playerInventory.player, te, 5, 126, 28)); // out fifo 0 + addSlotToContainer(new BSlotOutFifo(playerInventory.player, te, 6, 144, 28)); // out fifo 1 + for(int x=0; x<9; ++x) { + addSlotToContainer(new Slot(playerInventory, x, 8+x*18, 144)); // player slots: 0..8 + } + for(int y=0; y<3; ++y) { + for(int x=0; x<9; ++x) { + addSlotToContainer(new Slot(playerInventory, x+y*9+9, 8+x*18, 86+y*18)); // player slots: 9..35 + } + } + } + + @Override + public void addListener(IContainerListener listener) + { super.addListener(listener); listener.sendAllWindowProperties(this, te); } + + @Override + public void detectAndSendChanges() + { + super.detectAndSendChanges(); + for(int i=0; i= PLAYER_INV_START_SLOTNO) && (index <= PLAYER_INV_START_SLOTNO+36)) { + // Player inventory + if(!BRecipes.instance().getSmeltingResult(slot_stack).isEmpty()) { + if( + (!mergeItemStack(slot_stack, 0, 1, false)) && // smelting input + (!mergeItemStack(slot_stack, 3, 4, false)) && // fifo0 + (!mergeItemStack(slot_stack, 4, 5, false)) // fifo1 + ) return ItemStack.EMPTY; + } else if((index >= PLAYER_INV_START_SLOTNO) && (index < PLAYER_INV_START_SLOTNO+27)) { + // player inventory --> player hotbar + if(!mergeItemStack(slot_stack, PLAYER_INV_START_SLOTNO+27, PLAYER_INV_START_SLOTNO+36, false)) return ItemStack.EMPTY; + } else if((index >= PLAYER_INV_START_SLOTNO+27) && (index < PLAYER_INV_START_SLOTNO+36) && (!mergeItemStack(slot_stack, PLAYER_INV_START_SLOTNO, PLAYER_INV_START_SLOTNO+27, false))) { + // player hotbar --> player inventory + return ItemStack.EMPTY; + } + } else { + // invalid slot + return ItemStack.EMPTY; + } + if(slot_stack.isEmpty()) { + slot.putStack(ItemStack.EMPTY); + } else { + slot.onSlotChanged(); + } + if(slot_stack.getCount() == transferred.getCount()) return ItemStack.EMPTY; + slot.onTake(player, slot_stack); + return transferred; + } + } + + //-------------------------------------------------------------------------------------------------------------------- + // Tile entity + //-------------------------------------------------------------------------------------------------------------------- + + public static class BTileEntity extends BlockDecorFurnace.BTileEntity implements ITickable, ISidedInventory, IEnergyStorage, IItemHandler + { + public static final int TICK_INTERVAL = 4; + public static final int FIFO_INTERVAL = 20; + public static final int HEAT_CAPACITY = 200; + public static final int HEAT_INCREMENT = 20; + public static final int MAX_ENERGY_TRANSFER = 256; + public static final int MAX_ENERGY_BUFFER = 32000; + public static final int MAX_SPEED_SETTING = 2; + public static final int NUM_OF_SLOTS = 7; + public static final int SMELTING_INPUT_SLOT_NO = 0; + public static final int SMELTING_AUX_SLOT_NO = 1; + public static final int SMELTING_OUTPUT_SLOT_NO = 2; + public static final int FIFO_INPUT_0_SLOT_NO = 3; + public static final int FIFO_INPUT_1_SLOT_NO = 4; + public static final int FIFO_OUTPUT_0_SLOT_NO = 5; + public static final int FIFO_OUTPUT_1_SLOT_NO = 6; + public static final int DEFAULT_SPEED_PERCENT = 200; + public static final int DEFAULT_ENERGY_CONSUMPTION = 16 ; + public static final int DEFAULT_SCALED_ENERGY_CONSUMPTION = DEFAULT_ENERGY_CONSUMPTION * HEAT_INCREMENT * DEFAULT_SPEED_PERCENT/100; + + private static int energy_consumption_ = DEFAULT_SCALED_ENERGY_CONSUMPTION; + private static int transfer_energy_consumption_ = DEFAULT_SCALED_ENERGY_CONSUMPTION/8; + private static int proc_speed_percent_ = DEFAULT_SPEED_PERCENT; + private int burntime_left_; + private int proc_time_elapsed_; + private int proc_time_needed_; + private int energy_stored_; + private int speed_; + private int tick_timer_; + private int fifo_timer_; + + public static void on_config(int speed_percent, int standard_energy_per_tick) + { + proc_speed_percent_ = MathHelper.clamp(speed_percent, 10, 500); + energy_consumption_ = MathHelper.clamp(standard_energy_per_tick, 10, 256) * HEAT_INCREMENT * proc_speed_percent_ / 100; + transfer_energy_consumption_ = MathHelper.clamp(energy_consumption_/8, 8, HEAT_INCREMENT); + ModEngineersDecor.logger.info("Config electrical furnace speed:" + proc_speed_percent_ + ", power consumption:" + energy_consumption_); + } + + public BTileEntity() + { super(); reset(); } + + public void reset() + { + stacks_ = NonNullList.withSize(NUM_OF_SLOTS, ItemStack.EMPTY); + burntime_left_ = 0; + proc_time_elapsed_ = 0; + proc_time_needed_ = 0; + fifo_timer_ = 0; + tick_timer_ = 0; + energy_stored_= 0; + speed_ = 0; + } + + public void readnbt(NBTTagCompound compound) + { + reset(); + ItemStackHelper.loadAllItems(compound, this.stacks_); + while(this.stacks_.size() < NUM_OF_SLOTS) this.stacks_.add(ItemStack.EMPTY); + burntime_left_ = compound.getInteger("BurnTime"); + proc_time_elapsed_ = compound.getInteger("CookTime"); + proc_time_needed_ = compound.getInteger("CookTimeTotal"); + energy_stored_ = compound.getInteger("Energy"); + speed_ = compound.getInteger("SpeedSetting"); + } + + protected void writenbt(NBTTagCompound compound) + { + compound.setInteger("BurnTime", MathHelper.clamp(burntime_left_,0 , HEAT_CAPACITY)); + compound.setInteger("CookTime", MathHelper.clamp(proc_time_elapsed_, 0, MAX_BURNTIME)); + compound.setInteger("CookTimeTotal", MathHelper.clamp(proc_time_needed_, 0, MAX_BURNTIME)); + compound.setInteger("Energy", MathHelper.clamp(energy_stored_,0 , MAX_ENERGY_BUFFER)); + compound.setInteger("SpeedSetting", MathHelper.clamp(speed_, -1, MAX_SPEED_SETTING)); + ItemStackHelper.saveAllItems(compound, stacks_); + } + + // TileEntity ------------------------------------------------------------------------------ + // IWorldNamable --------------------------------------------------------------------------- + // IInventory ------------------------------------------------------------------------------ + + @Override + public boolean isItemValidForSlot(int index, ItemStack stack) + { + switch(index) { + case SMELTING_INPUT_SLOT_NO: + case FIFO_INPUT_0_SLOT_NO: + case FIFO_INPUT_1_SLOT_NO: + return true; + default: + return false; + } + } + + @Override + public int getField(int id) + { + switch (id) { + case 0: return burntime_left_; + case 1: return energy_stored_; + case 2: return proc_time_elapsed_; + case 3: return proc_time_needed_; + case 4: return speed_; + default: return 0; + } + } + + @Override + public void setField(int id, int value) + { + switch(id) { + case 0: burntime_left_ = value; break; + case 1: energy_stored_ = value; break; + case 2: proc_time_elapsed_ = value; break; + case 3: proc_time_needed_ = value; break; + case 4: speed_ = value; break; + } + } + + @Override + public int getFieldCount() + { return 7; } + + public boolean isBurning() + { return burntime_left_ > 0; } + + private boolean transferItems(final int index_from, final int index_to, int count) + { + ItemStack from = stacks_.get(index_from); + if(from.isEmpty()) return false; + ItemStack to = stacks_.get(index_to); + if(from.getCount() < count) count = from.getCount(); + if(count <= 0) return false; + boolean changed = true; + if(to.isEmpty()) { + stacks_.set(index_to, from.splitStack(count)); + } else if(to.getCount() >= to.getMaxStackSize()) { + changed = false; + } else if((!from.isItemEqual(to)) || (!ItemStack.areItemStackTagsEqual(from, to))) { + changed = false; + } else { + if((to.getCount()+count) >= to.getMaxStackSize()) { + from.shrink(to.getMaxStackSize()-to.getCount()); + to.setCount(to.getMaxStackSize()); + } else { + from.shrink(count); + to.grow(count); + } + } + if(from.isEmpty() && from!=ItemStack.EMPTY) { + stacks_.set(index_from, ItemStack.EMPTY); + changed = true; + } + return changed; + } + + // ISidedInventory ---------------------------------------------------------------------------- + + private static final int[] SIDED_INV_SLOTS = new int[] { + SMELTING_INPUT_SLOT_NO, SMELTING_AUX_SLOT_NO, SMELTING_OUTPUT_SLOT_NO, + FIFO_INPUT_0_SLOT_NO, FIFO_INPUT_1_SLOT_NO, FIFO_OUTPUT_0_SLOT_NO, FIFO_OUTPUT_1_SLOT_NO + }; + + @Override + public int[] getSlotsForFace(EnumFacing side) + { return SIDED_INV_SLOTS; } + + @Override + public boolean canInsertItem(int index, ItemStack itemStackIn, EnumFacing direction) + { return isItemValidForSlot(index, itemStackIn); } + + @Override + public boolean canExtractItem(int index, ItemStack stack, EnumFacing direction) + { return ((index!=SMELTING_INPUT_SLOT_NO) && (index!=FIFO_INPUT_0_SLOT_NO) && (index!=FIFO_INPUT_1_SLOT_NO)) || (stack.getItem()==Items.BUCKET); } + + // IEnergyStorage ---------------------------------------------------------------------------- + + public boolean canExtract() + { return false; } + + public boolean canReceive() + { return true; } + + public int getMaxEnergyStored() + { return MAX_ENERGY_BUFFER; } + + public int getEnergyStored() + { return energy_stored_; } + + public int extractEnergy(int maxExtract, boolean simulate) + { return 0; } + + public int receiveEnergy(int maxReceive, boolean simulate) + { + if(energy_stored_ >= MAX_ENERGY_BUFFER) return 0; + int n = Math.min(maxReceive, (MAX_ENERGY_BUFFER - energy_stored_)); + if(n > MAX_ENERGY_TRANSFER) n = MAX_ENERGY_TRANSFER; + if(!simulate) {energy_stored_ += n; markDirty(); } + return n; + } + + // IItemHandler -------------------------------------------------------------------------------- + + @Override + public int getSlots() + { return SIDED_INV_SLOTS.length; } + + @Override + @Nonnull + public ItemStack getStackInSlot(int index) + { return ((index < 0) || (index >= SIDED_INV_SLOTS.length)) ? ItemStack.EMPTY : stacks_.get(SIDED_INV_SLOTS[index]); } + + @Override + public int getSlotLimit(int index) + { return getInventoryStackLimit(); } + + @Override + public boolean isItemValid(int slot, @Nonnull ItemStack stack) + { return true; } + + @Override + @Nonnull + public ItemStack insertItem(int index, @Nonnull ItemStack stack, boolean simulate) + { + if(stack.isEmpty()) return ItemStack.EMPTY; + if((index < 0) || (index >= SIDED_INV_SLOTS.length)) return ItemStack.EMPTY; + int slotno = SIDED_INV_SLOTS[index]; + ItemStack slotstack = getStackInSlot(slotno); + if(!slotstack.isEmpty()) + { + if(slotstack.getCount() >= Math.min(slotstack.getMaxStackSize(), getSlotLimit(index))) return stack; + if(!ItemHandlerHelper.canItemStacksStack(stack, slotstack)) return stack; + if(!canInsertItem(slotno, stack, EnumFacing.UP) || (!isItemValidForSlot(slotno, stack))) return stack; + int n = Math.min(stack.getMaxStackSize(), getSlotLimit(index)) - slotstack.getCount(); + if(stack.getCount() <= n) { + if(!simulate) { + ItemStack copy = stack.copy(); + copy.grow(slotstack.getCount()); + setInventorySlotContents(slotno, copy); + } + return ItemStack.EMPTY; + } else { + stack = stack.copy(); + if(!simulate) { + ItemStack copy = stack.splitStack(n); + copy.grow(slotstack.getCount()); + setInventorySlotContents(slotno, copy); + return stack; + } else { + stack.shrink(n); + return stack; + } + } + } else { + if(!canInsertItem(slotno, stack, EnumFacing.UP) || (!isItemValidForSlot(slotno, stack))) return stack; + int n = Math.min(stack.getMaxStackSize(), getSlotLimit(index)); + if(n < stack.getCount()) { + stack = stack.copy(); + if(!simulate) { + setInventorySlotContents(slotno, stack.splitStack(n)); + return stack; + } else { + stack.shrink(n); + return stack; + } + } else { + if(!simulate) setInventorySlotContents(slotno, stack); + return ItemStack.EMPTY; + } + } + } + + @Override + @Nonnull + public ItemStack extractItem(int index, int amount, boolean simulate) + { + if(amount == 0) return ItemStack.EMPTY; + if((index < 0) || (index >= SIDED_INV_SLOTS.length)) return ItemStack.EMPTY; + int slotno = SIDED_INV_SLOTS[index]; + ItemStack stackInSlot = getStackInSlot(slotno); + if(stackInSlot.isEmpty()) return ItemStack.EMPTY; + if(!canExtractItem(slotno, stackInSlot, EnumFacing.DOWN)) return ItemStack.EMPTY; + if(simulate) { + if(stackInSlot.getCount() < amount) return stackInSlot.copy(); + ItemStack ostack = stackInSlot.copy(); + ostack.setCount(amount); + return ostack; + } else { + ItemStack ostack = decrStackSize(slotno, Math.min(stackInSlot.getCount(), amount)); + markDirty(); + return ostack; + } + } + + // Capability export ---------------------------------------------------------------------------- + + @Override + public boolean hasCapability(Capability cap, EnumFacing facing) + { return ((cap==CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) || (cap==CapabilityEnergy.ENERGY)) || super.hasCapability(cap, facing); } + + @Override + @SuppressWarnings("unchecked") + @Nullable + public T getCapability(Capability capability, @Nullable EnumFacing facing) + { + if((capability == CapabilityEnergy.ENERGY) || (capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY)) { + return ((T)this); + } else { + return super.getCapability(capability, facing); + } + } + + // ITickable ------------------------------------------------------------------------------------ + + private boolean adjacent_inventory_shift(boolean inp, boolean out) + { + boolean dirty = false; + if(energy_stored_ < transfer_energy_consumption_) return false; + final IBlockState state = world.getBlockState(pos); + if(!(state.getBlock() instanceof BlockDecorFurnaceElectrical)) return false; + final EnumFacing out_facing = state.getValue(FACING); + final EnumFacing inp_facing = state.getValue(FACING).getOpposite(); + if(out && (!stacks_.get(FIFO_OUTPUT_1_SLOT_NO).isEmpty())) { + TileEntity te = world.getTileEntity(pos.offset(out_facing)); + if((te!=null) && (te.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, inp_facing))) { + IItemHandler hnd = te.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, inp_facing); + ItemStack remaining = ItemHandlerHelper.insertItemStacked(hnd, stacks_.get(FIFO_OUTPUT_1_SLOT_NO).copy(), false); + stacks_.set(FIFO_OUTPUT_1_SLOT_NO, remaining); + energy_stored_ -= transfer_energy_consumption_; + dirty = true; + } + } + if(inp && (stacks_.get(FIFO_INPUT_1_SLOT_NO).isEmpty())) { + TileEntity te = world.getTileEntity(pos.offset(inp_facing)); + if((te!=null) && (te.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, out_facing))) { + IItemHandler hnd = te.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, out_facing); + for(int i=0; i< hnd.getSlots(); ++i) { + ItemStack adj_stack = hnd.getStackInSlot(i); + if(!adj_stack.isEmpty()) { + ItemStack my_stack = adj_stack.copy(); + if(my_stack.getCount() > getInventoryStackLimit()) my_stack.setCount(getInventoryStackLimit()); + adj_stack.shrink(my_stack.getCount()); + stacks_.set(FIFO_INPUT_1_SLOT_NO, my_stack); + energy_stored_ -= transfer_energy_consumption_; + dirty = true; + break; + } + } + } + } + return dirty; + } + + // returns TE dirty + private boolean heat_up() + { + if(energy_stored_ < (energy_consumption_)) return false; + if(burntime_left_ >= (HEAT_CAPACITY-HEAT_INCREMENT)) return false; + energy_stored_ -= energy_consumption_; + burntime_left_ += HEAT_INCREMENT; + this.markDirty(); + return true; + } + + @Override + public void update() + { + if(--tick_timer_ > 0) return; + tick_timer_ = TICK_INTERVAL; + final boolean was_burning = isBurning(); + if(was_burning) burntime_left_ -= TICK_INTERVAL; + if(burntime_left_ < 0) burntime_left_ = 0; + if(world.isRemote) return; + boolean dirty = false; + boolean shift_in = false; + boolean shift_out = false; + if(--fifo_timer_ <= 0) { + fifo_timer_ = FIFO_INTERVAL/TICK_INTERVAL; + if(transferItems(FIFO_OUTPUT_0_SLOT_NO, FIFO_OUTPUT_1_SLOT_NO, 64)) { dirty = true; } else { shift_out = true; } + if(transferItems(SMELTING_OUTPUT_SLOT_NO, FIFO_OUTPUT_0_SLOT_NO, 64)) dirty = true; + if(transferItems(FIFO_INPUT_0_SLOT_NO, SMELTING_INPUT_SLOT_NO, 64)) dirty = true; + if(transferItems(FIFO_INPUT_1_SLOT_NO, FIFO_INPUT_0_SLOT_NO, 64)) { dirty = true; } else { shift_in = true; } + } + if((!(stacks_.get(SMELTING_INPUT_SLOT_NO)).isEmpty()) && (energy_stored_ >= energy_consumption_)) { + final boolean can_smelt = canSmelt(); + if((!can_smelt) && (BRecipes.instance().getSmeltingResult(stacks_.get(SMELTING_INPUT_SLOT_NO)).isEmpty())) { + // bypass + if(transferItems(SMELTING_INPUT_SLOT_NO, SMELTING_OUTPUT_SLOT_NO, 1)) dirty = true; + } else { + // smelt + if(!isBurning() && can_smelt) { + if(heat_up()) dirty = true; + } + if(isBurning() && can_smelt) { + if(heat_up()) dirty = true; + proc_time_elapsed_ += (TICK_INTERVAL * proc_speed_percent_/100); + if(proc_time_elapsed_ >= proc_time_needed_) { + proc_time_elapsed_ = 0; + proc_time_needed_ = getCookTime(stacks_.get(SMELTING_INPUT_SLOT_NO)); + smeltItem(); + dirty = true; + shift_out = true; + } + } else { + proc_time_elapsed_ = 0; + } + } + } else if(proc_time_elapsed_ > 0) { + proc_time_elapsed_ -= ((stacks_.get(SMELTING_INPUT_SLOT_NO)).isEmpty() ? 20 : 1); + if(proc_time_elapsed_ < 0) { proc_time_elapsed_ = 0; shift_out = true; } + } + if(was_burning != isBurning()) { + dirty = true; + final IBlockState state = world.getBlockState(pos); + if(state.getBlock() instanceof BlockDecorFurnace) { + world.setBlockState(pos, state.withProperty(LIT, isBurning())); + } + } + if(adjacent_inventory_shift(shift_in, shift_out)) dirty = true; + if(dirty) markDirty(); + } + } +} diff --git a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorGlassBlock.java b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorGlassBlock.java index 468f461..62643ab 100644 --- a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorGlassBlock.java +++ b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorGlassBlock.java @@ -39,7 +39,6 @@ public class BlockDecorGlassBlock extends BlockDecor @Override @SideOnly(Side.CLIENT) - @SuppressWarnings("deprecation") public boolean shouldSideBeRendered(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side) { final IBlockState neighbourState = world.getBlockState(pos.offset(side)); @@ -50,25 +49,23 @@ public class BlockDecorGlassBlock extends BlockDecor @SideOnly(Side.CLIENT) @SuppressWarnings("deprecation") public float getAmbientOcclusionLightValue(IBlockState state) - { return 1.0F; } + { return 0.9F; } @Override public boolean isOpaqueCube(IBlockState state) { return false; } @Override - @SuppressWarnings("deprecation") public boolean isFullCube(IBlockState state) - { return false; } + { return true; } @Override - @SuppressWarnings("deprecation") public boolean isNormalCube(IBlockState state) { return false; } @Override public int getLightOpacity(IBlockState state, IBlockAccess world, BlockPos pos) - { return 0; } + { return 2; } @Override public int getLightValue(IBlockState state, IBlockAccess world, BlockPos pos) @@ -79,12 +76,10 @@ public class BlockDecorGlassBlock extends BlockDecor { return false; } @Override - @SuppressWarnings("deprecation") public BlockFaceShape getBlockFaceShape(IBlockAccess world, IBlockState state, BlockPos pos, EnumFacing face) { return BlockFaceShape.SOLID; } @Override - @SuppressWarnings("deprecation") public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) { return FULL_BLOCK_AABB; } diff --git a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorHorizontalSupport.java b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorHorizontalSupport.java new file mode 100644 index 0000000..b86a57f --- /dev/null +++ b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorHorizontalSupport.java @@ -0,0 +1,144 @@ +/* + * @file BlockDecorHorizontalSupport.java + * @author Stefan Wilhelm (wile) + * @copyright (C) 2019 Stefan Wilhelm + * @license MIT (see https://opensource.org/licenses/MIT) + * + * Horizontal ceiling support. Symmetric x axis, fixed in + * xz plane, therefore boolean placement state. + */ +package wile.engineersdecor.blocks; + +import net.minecraft.block.SoundType; +import net.minecraft.block.properties.PropertyBool; +import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.util.EnumHand; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; +import wile.engineersdecor.detail.ModAuxiliaries; +import net.minecraft.block.state.BlockStateContainer; +import net.minecraft.block.material.Material; +import net.minecraft.block.state.BlockFaceShape; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.world.World; +import net.minecraft.world.IBlockAccess; +import net.minecraft.util.Mirror; +import net.minecraft.util.Rotation; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import java.util.ArrayList; +import java.util.Arrays; + + +public class BlockDecorHorizontalSupport extends BlockDecor +{ + public static final PropertyBool EASTWEST = PropertyBool.create("eastwest"); + public static final PropertyBool LEFTBEAM = PropertyBool.create("leftbeam"); + public static final PropertyBool RIGHTBEAM = PropertyBool.create("rightbeam"); + public static final PropertyInteger DOWNCONNECT = PropertyInteger.create("downconnect", 0, 2); + protected final ArrayList AABBs; + + public BlockDecorHorizontalSupport(@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); + final boolean is_horizontal = ((config & CFG_HORIZIONTAL)!=0); + AABBs = new ArrayList(Arrays.asList( + // Effective bounding box + ModAuxiliaries.getRotatedAABB(unrotatedAABB.grow(2.0/16, 0, 0), EnumFacing.NORTH, true), + ModAuxiliaries.getRotatedAABB(unrotatedAABB.grow(2.0/16, 0, 0), EnumFacing.WEST, true), + // Displayed bounding box + ModAuxiliaries.getRotatedAABB(unrotatedAABB, EnumFacing.NORTH, true), + ModAuxiliaries.getRotatedAABB(unrotatedAABB, EnumFacing.WEST, true) + )); + } + + @Override + public boolean isOpaqueCube(IBlockState state) + { return false; } + + @Override + public boolean isFullCube(IBlockState state) + { return false; } + + @Override + public boolean isNormalCube(IBlockState state) + { return false; } + + @Override + public boolean canCreatureSpawn(IBlockState state, IBlockAccess world, BlockPos pos, net.minecraft.entity.EntityLiving.SpawnPlacementType type) + { return false; } + + @Override + public BlockFaceShape getBlockFaceShape(IBlockAccess world, IBlockState state, BlockPos pos, EnumFacing face) + { return BlockFaceShape.UNDEFINED; } + + @SideOnly(Side.CLIENT) + public AxisAlignedBB getSelectedBoundingBox(IBlockState state, World world, BlockPos pos) + { return AABBs.get(state.getValue(EASTWEST) ? 0x3 : 0x2).offset(pos); } + + @Override + public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) + { return AABBs.get(state.getValue(EASTWEST) ? 0x1 : 0x0); } + + @Override + @Nullable + public AxisAlignedBB getCollisionBoundingBox(IBlockState state, IBlockAccess world, BlockPos pos) + { return getBoundingBox(state, world, pos); } + + @Override + public IBlockState getStateFromMeta(int meta) + { return getDefaultState().withProperty(EASTWEST, ((meta & 0x1) != 0)); } + + @Override + public int getMetaFromState(IBlockState state) + { return (state.getValue(EASTWEST) ? 0x1:0x0); } + + @Override + public IBlockState getActualState(IBlockState state, IBlockAccess world, BlockPos pos) + { + boolean ew = state.getValue(EASTWEST); + final IBlockState rstate = world.getBlockState((!ew) ? (pos.east()) : (pos.south()) ); + final IBlockState lstate = world.getBlockState((!ew) ? (pos.west()) : (pos.north()) ); + final IBlockState dstate = world.getBlockState(pos.down()); + int down_connector = 0; + if((dstate.getBlock() instanceof BlockDecorStraightPole)) { + final EnumFacing dfacing = dstate.getValue(BlockDecorStraightPole.FACING); + final BlockDecorStraightPole pole = (BlockDecorStraightPole)dstate.getBlock(); + if((dfacing.getAxis() == EnumFacing.Axis.Y)) { + if((pole==ModBlocks.THICK_STEEL_POLE) || ((pole==ModBlocks.THICK_STEEL_POLE_HEAD) && (dfacing==EnumFacing.UP))) { + down_connector = 2; + } else if((pole==ModBlocks.THIN_STEEL_POLE) || ((pole==ModBlocks.THIN_STEEL_POLE_HEAD) && (dfacing==EnumFacing.UP))) { + down_connector = 1; + } + } + } + return state.withProperty(RIGHTBEAM, (rstate.getBlock()==this) && (rstate.getValue(EASTWEST) != ew)) + .withProperty(LEFTBEAM , (lstate.getBlock()==this) && (lstate.getValue(EASTWEST) != ew)) + .withProperty(DOWNCONNECT , down_connector); + } + + @Override + protected BlockStateContainer createBlockState() + { return new BlockStateContainer(this, EASTWEST, RIGHTBEAM, LEFTBEAM, DOWNCONNECT); } + + @Override + public IBlockState withRotation(IBlockState state, Rotation rot) + { return (rot==Rotation.CLOCKWISE_180) ? state : state.withProperty(EASTWEST, !state.getValue(EASTWEST)); } + + @Override + public IBlockState withMirror(IBlockState state, Mirror mirrorIn) + { return state; } + + @Override + public boolean canPlaceBlockOnSide(World world, BlockPos pos, EnumFacing side) + { return super.canPlaceBlockOnSide(world, pos, side); } + + @Override + public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer, EnumHand hand) + { return getActualState(getDefaultState().withProperty(EASTWEST, (placer.getHorizontalFacing().getAxis()==EnumFacing.Axis.X)), world, pos); } + +} diff --git a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorPassiveFluidAccumulator.java b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorPassiveFluidAccumulator.java new file mode 100644 index 0000000..5bfd95b --- /dev/null +++ b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorPassiveFluidAccumulator.java @@ -0,0 +1,267 @@ +/* + * @file BlockDecorPassiveFluidAccumulator.java + * @author Stefan Wilhelm (wile) + * @copyright (C) 2019 Stefan Wilhelm + * @license MIT (see https://opensource.org/licenses/MIT) + * + * A device that collects fluids from adjacent tank outputs + * when a pump drains on the (only) output side. Shall support + * high flow rates, and a vavuum suction delay. Shall not drain + * high amounts of fluid from the adjacent tanks when no fluid + * is requested at the output port. Shall drain balanced from + * the adjacent input sides. + */ +package wile.engineersdecor.blocks; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.EnumHand; +import net.minecraftforge.fml.common.gameevent.PlayerEvent; +import wile.engineersdecor.ModEngineersDecor; +import wile.engineersdecor.detail.ModAuxiliaries; +import net.minecraft.block.Block; +import net.minecraft.block.SoundType; +import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.math.MathHelper; +import net.minecraft.world.World; +import net.minecraft.util.ITickable; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraftforge.common.capabilities.Capability; +import net.minecraftforge.common.capabilities.ICapabilityProvider; +import net.minecraftforge.fluids.capability.CapabilityFluidHandler; +import net.minecraftforge.fluids.capability.IFluidHandler; +import net.minecraftforge.fluids.capability.IFluidTankProperties; +import net.minecraftforge.fluids.FluidStack; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + + +public class BlockDecorPassiveFluidAccumulator extends BlockDecorDirected implements ModAuxiliaries.IExperimentalFeature +{ + public BlockDecorPassiveFluidAccumulator(@Nonnull String registryName, long config, @Nullable Material material, float hardness, float resistance, @Nullable SoundType sound, @Nonnull AxisAlignedBB unrotatedAABB) + { super(registryName, config, material, hardness, resistance, sound, unrotatedAABB); } + + @Override + public boolean hasTileEntity(IBlockState state) + { return true; } + + @Nullable + public TileEntity createTileEntity(World world, IBlockState state) + { return new BlockDecorPassiveFluidAccumulator.BTileEntity(); } + + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) + { + if(world.isRemote) return true; + TileEntity te = world.getTileEntity(pos); + if(!(te instanceof BTileEntity)) return true; + ((BTileEntity)te).debug_info_dump(player); + return true; + } + + public void neighborChanged(IBlockState state, World world, BlockPos pos, Block block, BlockPos fromPos) + { TileEntity te = world.getTileEntity(pos); if(te instanceof BlockDecorPipeValve.BTileEntity) ((BTileEntity)te).block_changed(); } + + //-------------------------------------------------------------------------------------------------------------------- + // Tile entity + //-------------------------------------------------------------------------------------------------------------------- + + public static class BTileEntity extends TileEntity implements IFluidHandler, IFluidTankProperties, ICapabilityProvider, ITickable, ModAuxiliaries.IExperimentalFeature + { + protected static int tick_idle_interval = 20; // ca 1000ms, simulates suction delay and saves CPU when not drained. + protected static int max_flowrate = 1000; + private final IFluidTankProperties[] fluid_props_ = {this}; + private final InputFillHandler fill_handler_ = new InputFillHandler(this); + private EnumFacing block_facing_ = EnumFacing.NORTH; + private FluidStack tank_ = null; + private int last_drain_request_amount_ = 0; + private int vacuum_ = 0; + private int tick_timer_ = 0; + private int round_robin_ = 0; + private boolean initialized_ = false; + + + private int total_volume_filled_ = 0; + private int total_volume_drained_ = 0; + @Deprecated + public void debug_info_dump(EntityPlayer player) + { + int t_vol = (tank_==null) ? 0 : (tank_.amount); + ModAuxiliaries.playerChatMessage(player,"pfacc I:" + total_volume_filled_ + " O:" + total_volume_drained_ + " B:" + t_vol); + } + + public void block_changed() + { initialized_ = false; tick_timer_ = MathHelper.clamp(tick_timer_ , 0, tick_idle_interval); } + + // Output flow handler --------------------------------------------------------------------- + + private static class InputFillHandler implements IFluidHandler, IFluidTankProperties + { + private final BTileEntity parent_; + private final IFluidTankProperties[] props_ = {this}; + InputFillHandler(BTileEntity parent) { parent_ = parent; } + @Override public int fill(FluidStack resource, boolean doFill) { return 0; } + @Override @Nullable public FluidStack drain(FluidStack resource, boolean doDrain) { return null; } + @Override @Nullable public FluidStack drain(int maxDrain, boolean doDrain) { return null; } + @Override @Nullable public FluidStack getContents() { return null; } + @Override public IFluidTankProperties[] getTankProperties() { return props_; } + @Override public int getCapacity() { return max_flowrate; } + @Override public boolean canFill() { return true; } + @Override public boolean canDrain() { return false; } + @Override public boolean canFillFluidType(FluidStack fluidStack) { return true; } + @Override public boolean canDrainFluidType(FluidStack fluidStack) { return false; } + } + + // TileEntity ------------------------------------------------------------------------------ + + public BTileEntity() + {} + + @Override + public boolean shouldRefresh(World world, BlockPos pos, IBlockState os, IBlockState ns) + { + block_changed(); + return (os.getBlock() != ns.getBlock()) || (!(ns.getBlock() instanceof BlockDecorPipeValve)); + } + + @Override + public void readFromNBT(NBTTagCompound nbt) + { + super.readFromNBT(nbt); + tank_ = (!nbt.hasKey("tank")) ? (null) : (FluidStack.loadFluidStackFromNBT(nbt.getCompoundTag("tank"))); + } + + @Override + public NBTTagCompound writeToNBT(NBTTagCompound nbt) + { + super.writeToNBT(nbt); + if(tank_ != null) nbt.setTag("tank", tank_.writeToNBT(new NBTTagCompound())); + return nbt; + } + + // ICapabilityProvider -------------------------------------------------------------------- + + @Override + public boolean hasCapability(@Nonnull Capability capability, @Nullable EnumFacing facing) + { return (initialized_ && (capability==CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY)) || super.hasCapability(capability, facing); } + + @Override + @Nullable + @SuppressWarnings("unchecked") + public T getCapability(@Nonnull Capability capability, @Nullable EnumFacing facing) + { + if(capability != CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) return super.getCapability(capability, facing); + return (facing==block_facing_) ? (((T)this)) : ((T)fill_handler_); + } + + // IFluidHandler of the output port -------------------------------------------------------- + + @Override + public IFluidTankProperties[] getTankProperties() + { return fluid_props_; } + + @Override + public int fill(FluidStack resource, boolean doFill) + { return 0; } + + @Override + @Nullable + public FluidStack drain(FluidStack resource, boolean doDrain) + { + if((resource==null) || (tank_==null)) return null; + return (!(tank_.isFluidEqual(resource))) ? (null) : drain(resource.amount, doDrain); + } + + @Override + @Nullable + public FluidStack drain(int maxDrain, boolean doDrain) + { + if(!initialized_) return null; + if(doDrain && (maxDrain > 0)) last_drain_request_amount_ = maxDrain; + if(tank_==null) return null; + maxDrain = MathHelper.clamp(maxDrain ,0 , tank_.amount); + if(!doDrain) return tank_.copy(); + FluidStack res = tank_.copy(); + res.amount = maxDrain; + tank_.amount -= maxDrain; + if(tank_.amount <= 0) tank_= null; + total_volume_drained_ += res.amount; + return res; + } + + // IFluidTankProperties -------------------------------------------------------------------- + + @Override @Nullable public FluidStack getContents() { return (tank_==null) ? (null) : (tank_.copy()); } + @Override public int getCapacity() { return max_flowrate; } + @Override public boolean canFill() { return false; } + @Override public boolean canDrain() { return true; } + @Override public boolean canFillFluidType(FluidStack fluidStack) { return false; } + @Override public boolean canDrainFluidType(FluidStack fluidStack) { return true; } + + // ITickable-------------------------------------------------------------------------------- + + public void update() + { + if((world.isRemote) || (--tick_timer_ > 0)) return; + tick_timer_ = tick_idle_interval; + if(!initialized_) { + initialized_ = true; + IBlockState state = world.getBlockState(pos); + if((state==null) || (!(state.getBlock() instanceof BlockDecorPassiveFluidAccumulator))) return; + block_facing_ = state.getValue(FACING); + } + int n_requested = last_drain_request_amount_; + last_drain_request_amount_ = 0; + if(n_requested > 0) { + vacuum_ += 2; + if(vacuum_ > 5) vacuum_ = 5; + } else { + if((--vacuum_) <= 0) { + vacuum_ = 0; + if(tank_!=null) { + return; // nothing to do, noone's draining. + } else { + n_requested = 10; // drip in + } + } + } + boolean has_refilled = false; + n_requested += (vacuum_ * 50); + int tank_buffer_needed = n_requested; + if(tank_buffer_needed > max_flowrate) tank_buffer_needed = max_flowrate; + for(int i=0; i<6; ++i) { + if(++round_robin_ > 5) round_robin_ = 0; + if(n_requested <= 0) break; + if(((tank_!=null) && (tank_.amount >= tank_buffer_needed))) break; + final EnumFacing f = EnumFacing.byIndex(round_robin_); + if(f == block_facing_) continue; + final TileEntity te = world.getTileEntity(pos.offset(f)); + if((te==null) || (te instanceof BTileEntity) || (!te.hasCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, f.getOpposite()))) continue; + final IFluidHandler fh = te.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, f.getOpposite()); + if(fh==null) continue; + if(tank_==null) { + FluidStack res = fh.drain(n_requested, true); + if((res == null) || (res.amount==0)) continue; + total_volume_filled_ += res.amount; + tank_ = res.copy(); + has_refilled = true; + } else { + if((tank_.amount + n_requested) > max_flowrate) n_requested = (max_flowrate - tank_.amount); + FluidStack rq = tank_.copy(); + rq.amount = n_requested; + FluidStack res = fh.drain(rq, true); + if(res == null) continue; + tank_.amount += res.amount; + total_volume_filled_ += res.amount; + has_refilled = true; + if(tank_.amount >= max_flowrate) break; + } + } + if(has_refilled) tick_timer_ = 0; + } + } +} diff --git a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorPipeValve.java b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorPipeValve.java new file mode 100644 index 0000000..d86cb90 --- /dev/null +++ b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorPipeValve.java @@ -0,0 +1,326 @@ +/* + * @file BlockDecorPipeValve.java + * @author Stefan Wilhelm (wile) + * @copyright (C) 2019 Stefan Wilhelm + * @license MIT (see https://opensource.org/licenses/MIT) + * + * Basically a piece of pipe that does not connect to + * pipes on the side, and conducts fluids only in one way. + */ +package wile.engineersdecor.blocks; + +import wile.engineersdecor.ModEngineersDecor; +import blusunrize.immersiveengineering.api.fluid.IFluidPipe; +import net.minecraft.block.state.BlockFaceShape; +import net.minecraft.block.properties.PropertyInteger; +import net.minecraft.block.state.BlockStateContainer; +import net.minecraft.block.Block; +import net.minecraft.block.SoundType; +import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; +import net.minecraft.item.ItemStack; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraft.util.math.MathHelper; +import net.minecraft.util.EnumHand; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraftforge.common.capabilities.Capability; +import net.minecraftforge.common.capabilities.ICapabilityProvider; +import net.minecraftforge.fluids.capability.CapabilityFluidHandler; +import net.minecraftforge.fluids.capability.IFluidHandler; +import net.minecraftforge.fluids.capability.IFluidTankProperties; +import net.minecraftforge.fluids.FluidStack; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + + +public class BlockDecorPipeValve extends BlockDecorDirected +{ + public static final PropertyInteger RS_CONNECTION_DIR = PropertyInteger.create("rsdir", 0,4); + + public static void on_config(int container_size_decl, int redstone_slope) + { + BTileEntity.fluid_maxflow_mb = MathHelper.clamp(container_size_decl, 1, 10000); + BTileEntity.redstone_flow_slope_mb = MathHelper.clamp(redstone_slope, 1, 10000); + ModEngineersDecor.logger.info("Config pipe valve: maxflow:" + BTileEntity.fluid_maxflow_mb + "mb, redstone amp:" + BTileEntity.redstone_flow_slope_mb + "mb/sig"); + } + + public BlockDecorPipeValve(@Nonnull String registryName, long config, @Nullable Material material, float hardness, float resistance, @Nullable SoundType sound, @Nonnull AxisAlignedBB unrotatedAABB) + { super(registryName, config, material, hardness, resistance, sound, unrotatedAABB); } + + @Override + protected BlockStateContainer createBlockState() + { return new BlockStateContainer(this, FACING, RS_CONNECTION_DIR); } + + @Override + public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer, EnumHand hand) + { return super.getStateForPlacement(world, pos, facing, hitX, hitY, hitZ, meta, placer, hand).withProperty(RS_CONNECTION_DIR, 0); } + + // world to model index transformations. [Facing block][Facing neighbour] -> int 0=nothing, 1=top, 2=right, 3=down, 4=left. + private static final int rsconnectors[][] = { + //D U N S W E + {0, 0, 1, 3, 4, 2}, // D + {0, 0, 3, 1, 4, 2}, // U + {3, 1, 0, 0, 4, 2}, // N + {3, 1, 0, 0, 2, 4}, // S + {3, 1, 2, 4, 0, 0}, // W + {3, 1, 4, 2, 0, 0}, // E + }; + + @Override + public IBlockState getActualState(IBlockState state, IBlockAccess world, BlockPos pos) + { + if((config & (CFG_REDSTONE_CONTROLLED))==0) return state; + EnumFacing.Axis bfa = state.getValue(FACING).getAxis(); + int bfi = state.getValue(FACING).getIndex(); + for(EnumFacing f:EnumFacing.VALUES) { + if(f.getAxis() == bfa) continue; + BlockPos nbp = pos.offset(f); + IBlockState nbs = world.getBlockState(nbp); + if(nbs.canProvidePower()) return state.withProperty(RS_CONNECTION_DIR, rsconnectors[state.getValue(FACING).getIndex()][f.getIndex()]); + } + return state.withProperty(RS_CONNECTION_DIR, 0); + } + + @Override + public void neighborChanged(IBlockState state, World world, BlockPos pos, Block block, BlockPos fromPos) + { + EnumFacing fc = state.getValue(FACING); + if(fromPos.equals(pos.offset(fc)) || fromPos.equals(pos.offset(fc.getOpposite()))) update_te(world, state, pos); + } + + @Override + public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) + { + update_te(world, state, pos); + world.notifyNeighborsOfStateChange(pos, this, true); + } + + @Override + public BlockFaceShape getBlockFaceShape(IBlockAccess worldIn, IBlockState state, BlockPos pos, EnumFacing face) + { return BlockFaceShape.SOLID; } + + @Override + public boolean canConnectRedstone(IBlockState state, IBlockAccess world, BlockPos pos, @Nullable EnumFacing side) + { return (side!=null) && (side!=state.getValue(FACING)) && (side!=state.getValue(FACING).getOpposite()); } + + @Override + public boolean hasTileEntity(IBlockState state) + { return true; } + + @Nullable + public TileEntity createTileEntity(World world, IBlockState state) + { return new BlockDecorPipeValve.BTileEntity(); } + + private void update_te(World world, IBlockState state, BlockPos pos) + { + TileEntity te = world.getTileEntity(pos); + if(te instanceof BlockDecorPipeValve.BTileEntity) ((BlockDecorPipeValve.BTileEntity)te).block_reconfigure(state.getValue(FACING), config); + } + + //-------------------------------------------------------------------------------------------------------------------- + // Tile entity + //-------------------------------------------------------------------------------------------------------------------- + + public static class BTileEntity extends TileEntity implements IFluidHandler, IFluidTankProperties, ICapabilityProvider, IFluidPipe + { + private static final BackFlowHandler back_flow_handler_ = new BackFlowHandler(); + protected static int fluid_maxflow_mb = 1000; + protected static int redstone_flow_slope_mb = 1000/15; + private final IFluidTankProperties[] fluid_props_ = {this}; + private EnumFacing block_facing_ = EnumFacing.NORTH; + private boolean filling_ = false; + private boolean getlocked_ = false; + private boolean filling_enabled_ = true; + private long block_config_ = 0; + + public BTileEntity() + {} + + public void block_reconfigure(EnumFacing facing, long block_config) + { + block_facing_ = facing; + block_config_ = block_config; + filling_enabled_ = false; + IFluidHandler fh = forward_fluid_handler(); + if(fh!=null) { + if(fh.getTankProperties().length==0) { + filling_enabled_ = true; // we don't know, so in doubt try filling. + } else { + for(IFluidTankProperties fp:fh.getTankProperties()) { + if((fp!=null) && (fp.canFill())) { filling_enabled_ = true; break; } + } + } + } + } + + // TileEntity ------------------------------------------------------------------------------ + + @Override + public boolean shouldRefresh(World world, BlockPos pos, IBlockState os, IBlockState ns) + { return (os.getBlock() != ns.getBlock()) || (!(ns.getBlock() instanceof BlockDecorPipeValve)); } + + @Override + public void onLoad() + { + if(!hasWorld()) return; + final IBlockState state = world.getBlockState(pos); + if((!(state.getBlock() instanceof BlockDecorPipeValve))) return; + block_reconfigure(state.getValue(FACING), block_config_); + world.notifyNeighborsOfStateChange(pos, state.getBlock(), false); + } + + @Override + public void readFromNBT(NBTTagCompound nbt) + { + super.readFromNBT(nbt); + int i = nbt.getInteger("facing"); + if((i>=0) || (i<6)) block_facing_ = EnumFacing.byIndex(i); + block_config_ = nbt.getLong("conf"); + } + + @Override + public NBTTagCompound writeToNBT(NBTTagCompound nbt) + { + super.writeToNBT(nbt); + nbt.setInteger("facing", block_facing_.getIndex()); + nbt.setLong("conf", block_config_); + return nbt; + } + + // ICapabilityProvider -------------------------------------------------------------------- + + @Override + public boolean hasCapability(@Nonnull Capability capability, @Nullable EnumFacing facing) + { return ((capability==CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) && ((facing==block_facing_) || (facing==block_facing_.getOpposite()))); } + + @Override + @SuppressWarnings("unchecked") + @Nullable + public T getCapability(@Nonnull Capability capability, @Nullable EnumFacing facing) + { + if(capability!=CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) return super.getCapability(capability, facing); + return (facing==block_facing_) ? ((T)back_flow_handler_) : (((T)this)); + } + + // IFluidHandler/IFluidTankProperties --------------------------------------------------------------- + + @Nullable + private IFluidHandler forward_fluid_handler() + { + final TileEntity te = world.getTileEntity(pos.offset(block_facing_)); + if(te == null) return null; + return te.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, block_facing_.getOpposite()); + } + + @Override + public int fill(FluidStack resource, boolean doFill) + { + if((filling_) || (!filling_enabled_)) return 0; + if((block_config_ & CFG_REDSTONE_CONTROLLED) != 0) { + int rs = world.getRedstonePowerFromNeighbors(pos); + if(rs <= 0) return 0; + if(((block_config_ & CFG_ANALOG) != 0) && (rs < 15)) resource.amount = MathHelper.clamp(rs * redstone_flow_slope_mb, 1, resource.amount); + } + FluidStack res = resource.copy(); + if(res.amount > fluid_maxflow_mb) res.amount = fluid_maxflow_mb; + final IFluidHandler fh = forward_fluid_handler(); + if(fh==null) return 0; + filling_ = true; // in case someone does not check the cap, but just "forwards back" what is beeing filled right now. + if(res.amount > 50) { + final TileEntity te = world.getTileEntity(pos.offset(block_facing_)); + if(te instanceof IFluidPipe) { + // forward pressureized tag + if(res.tag == null) res.tag = new NBTTagCompound(); + res.tag.setBoolean("pressurized", true); + } + } + int n_filled = forward_fluid_handler().fill(res, doFill); + filling_ = false; + //if(n_filled > 0) System.out.println("F:" + resource.amount + "->" + n_filled); + return n_filled; + } + + @Override + @Nullable + public FluidStack drain(FluidStack resource, boolean doDrain) + { return null; } + + @Override + @Nullable + public FluidStack drain(int maxDrain, boolean doDrain) + { return null; } + + @Override + public IFluidTankProperties[] getTankProperties() + { return fluid_props_; } + + // IFluidTankProperties -- + + @Override + @Nullable + public FluidStack getContents() + { return null; } + + public int getCapacity() + { return 1000; } + + @Override + public boolean canFill() + { return true; } + + @Override + public boolean canDrain() + { return false; } + + @Override + public boolean canFillFluidType(FluidStack fluidStack) + { return true; } + + @Override + public boolean canDrainFluidType(FluidStack fluidStack) + { return false; } + + // Back flow prevention handler -- + + private static class BackFlowHandler implements IFluidHandler, IFluidTankProperties + { + private final IFluidTankProperties[] props_ = {this}; + @Override public IFluidTankProperties[] getTankProperties() { return props_; } + @Override public int fill(FluidStack resource, boolean doFill) { return 0; } + @Override @Nullable public FluidStack drain(FluidStack resource, boolean doDrain) { return null; } + @Override @Nullable public FluidStack drain(int maxDrain, boolean doDrain) { return null; } + @Override @Nullable public FluidStack getContents() { return null; } + @Override public int getCapacity() { return 0; } + @Override public boolean canFill() { return false; } + @Override public boolean canDrain() { return false; } + @Override public boolean canFillFluidType(FluidStack fluidStack) { return false; } + @Override public boolean canDrainFluidType(FluidStack fluidStack) { return false; } + } + + // IFluidPipe + + @Override + public boolean hasOutputConnection(EnumFacing side) + { return (side == block_facing_); } + + @Override + public boolean canOutputPressurized(boolean consumePower) + { + if(getlocked_ || (!filling_enabled_)) return false; + final TileEntity te = world.getTileEntity(pos.offset(block_facing_)); + if(!(te instanceof IFluidPipe)) return false; + getlocked_ = true; // not sure if IE explicitly pre-detects loops, so let's lock recurion here, too. + boolean r = ((IFluidPipe)te).canOutputPressurized(consumePower); + getlocked_ = false; + return r; + } + + } +} diff --git a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorStairs.java b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorStairs.java index b30705a..b560bd8 100644 --- a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorStairs.java +++ b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorStairs.java @@ -8,12 +8,26 @@ */ package wile.engineersdecor.blocks; +import net.minecraft.block.material.EnumPushReaction; import net.minecraft.block.state.IBlockState; +import net.minecraft.block.BlockStairs; +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.item.ItemStack; +import net.minecraft.util.BlockRenderLayer; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; import wile.engineersdecor.ModEngineersDecor; +import wile.engineersdecor.detail.ModAuxiliaries; + import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import java.util.List; -public class BlockDecorStairs extends net.minecraft.block.BlockStairs +public class BlockDecorStairs extends BlockStairs { public BlockDecorStairs(@Nonnull String registryName, IBlockState modelState) { @@ -21,10 +35,40 @@ public class BlockDecorStairs extends net.minecraft.block.BlockStairs setCreativeTab(ModEngineersDecor.CREATIVE_TAB_ENGINEERSDECOR); setRegistryName(ModEngineersDecor.MODID, registryName); setTranslationKey(ModEngineersDecor.MODID + "." + registryName); + setLightOpacity(0); } + @Override + @SideOnly(Side.CLIENT) + public void addInformation(ItemStack stack, @Nullable World world, List tooltip, ITooltipFlag flag) + { ModAuxiliaries.Tooltip.addInformation(stack, world, tooltip, flag, true); } + + @Override + @SuppressWarnings("deprecation") + public boolean isOpaqueCube(IBlockState state) + { return false; } + + @Override + @SuppressWarnings("deprecation") + public boolean isFullCube(IBlockState state) + { return false; } + + @Override + @SuppressWarnings("deprecation") + public boolean isNormalCube(IBlockState state) + { return false; } + @Override public boolean canSpawnInBlock() { return false; } + @Override + public boolean canCreatureSpawn(IBlockState state, IBlockAccess world, BlockPos pos, net.minecraft.entity.EntityLiving.SpawnPlacementType type) + { return false; } + + @Override + @SuppressWarnings("deprecation") + public EnumPushReaction getPushReaction(IBlockState state) + { return EnumPushReaction.NORMAL; } + } diff --git a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorStraightPole.java b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorStraightPole.java index 7dc7ad7..b774ac6 100644 --- a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorStraightPole.java +++ b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorStraightPole.java @@ -12,6 +12,7 @@ import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; +import net.minecraft.util.EnumHand; import net.minecraft.world.World; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.AxisAlignedBB; @@ -26,10 +27,9 @@ public class BlockDecorStraightPole extends BlockDecorDirected { super(registryName, config, material, hardness, resistance, sound, unrotatedAABB); } @Override - @SuppressWarnings("deprecation") - public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) + public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer, EnumHand hand) { - IBlockState state = super.getStateForPlacement(world, pos, facing, hitX, hitY, hitZ, meta, placer); + IBlockState state = super.getStateForPlacement(world, pos, facing, hitX, hitY, hitZ, meta, placer, hand); if((config & CFG_FLIP_PLACEMENT_IF_SAME) != 0) { if(world.getBlockState(pos.offset(facing.getOpposite())).getBlock() instanceof BlockDecorStraightPole) { state = state.withProperty(FACING, state.getValue(FACING).getOpposite()); diff --git a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorWall.java b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorWall.java index d85a77a..4886d2e 100644 --- a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorWall.java +++ b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorWall.java @@ -12,6 +12,7 @@ import net.minecraft.block.*; import net.minecraft.block.material.Material; import net.minecraft.block.properties.IProperty; import net.minecraft.block.properties.PropertyBool; +import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.BlockFaceShape; import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; @@ -41,6 +42,7 @@ public class BlockDecorWall extends BlockDecor public static final PropertyBool EAST = BlockWall.EAST; public static final PropertyBool SOUTH = BlockWall.SOUTH; 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; @@ -76,7 +78,6 @@ public class BlockDecorWall extends BlockDecor } @Override - @SuppressWarnings("deprecation") public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) { return AABB_BY_INDEX[getAABBIndex(getActualState(state, source, pos))]; } @@ -87,7 +88,6 @@ public class BlockDecorWall extends BlockDecor @Nullable @Override - @SuppressWarnings("deprecation") public AxisAlignedBB getCollisionBoundingBox(IBlockState state, IBlockAccess world, BlockPos pos) { return CLIP_AABB_BY_INDEX[getAABBIndex(getActualState(state, world, pos))]; } @@ -99,22 +99,18 @@ public class BlockDecorWall extends BlockDecor } @Override - @SuppressWarnings("deprecation") public boolean isFullCube(IBlockState state) { return false; } @Override - @SuppressWarnings("deprecation") public boolean isPassable(IBlockAccess world, BlockPos pos) { return false; } @Override - @SuppressWarnings("deprecation") public boolean isOpaqueCube(IBlockState state) { return false; } @Override - @SuppressWarnings("deprecation") public boolean isNormalCube(IBlockState state) { return false; } @@ -141,23 +137,19 @@ public class BlockDecorWall extends BlockDecor { return Block.isExceptBlockForAttachWithPiston(b) || (b==Blocks.BARRIER) || (b==Blocks.MELON_BLOCK) || (b==Blocks.PUMPKIN) || (b==Blocks.LIT_PUMPKIN); } @Override - @SuppressWarnings("deprecation") @SideOnly(Side.CLIENT) public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) { return (side!=EnumFacing.DOWN) || (super.shouldSideBeRendered(blockState, blockAccess, pos, side)); } @Override - @SuppressWarnings("deprecation") public IBlockState getStateFromMeta(int meta) { return getDefaultState(); } @Override - @SuppressWarnings("deprecation") public int getMetaFromState(IBlockState state) { return 0; } @Override - @SuppressWarnings("deprecation") public IBlockState getActualState(IBlockState state, IBlockAccess world, BlockPos pos) { boolean n = canWallConnectTo(world, pos, EnumFacing.NORTH); @@ -165,15 +157,15 @@ public class BlockDecorWall extends BlockDecor 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); + long prnd = pos.toLong(); prnd = (prnd>>29) ^ (prnd>>17) ^ (prnd>>9) ^ (prnd>>4) ^ pos.getX() ^ pos.getY() ^ pos.getZ(); + return state.withProperty(UP,!nopole).withProperty(NORTH, n).withProperty(EAST, e).withProperty(SOUTH, s).withProperty(WEST, w).withProperty(TEXTURE_VARIANT, ((int)prnd) & 0x7); } @Override protected BlockStateContainer createBlockState() - { return new BlockStateContainer(this, new IProperty[] {UP, NORTH, EAST, WEST, SOUTH}); } + { return new BlockStateContainer(this, new IProperty[] {UP, NORTH, EAST, WEST, SOUTH, TEXTURE_VARIANT}); } @Override - @SuppressWarnings("deprecation") public BlockFaceShape getBlockFaceShape(IBlockAccess world, IBlockState state, BlockPos pos, EnumFacing face) { return (face==EnumFacing.UP) ? (BlockFaceShape.SOLID) : ((face!=EnumFacing.DOWN) ? (BlockFaceShape.MIDDLE_POLE_THICK) : (BlockFaceShape.CENTER_BIG)); } diff --git a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorWindow.java b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorWindow.java index 74f31f5..18ddb0c 100644 --- a/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorWindow.java +++ b/1.12/src/main/java/wile/engineersdecor/blocks/BlockDecorWindow.java @@ -35,7 +35,7 @@ public class BlockDecorWindow extends BlockDecorDirected @Override @SideOnly(Side.CLIENT) public boolean canRenderInLayer(IBlockState state, BlockRenderLayer layer) - { return (layer==BlockRenderLayer.CUTOUT) || (layer==BlockRenderLayer.TRANSLUCENT); } + { return (layer==BlockRenderLayer.CUTOUT_MIPPED) || (layer==BlockRenderLayer.TRANSLUCENT); } @Override @SideOnly(Side.CLIENT) diff --git a/1.12/src/main/java/wile/engineersdecor/blocks/ModBlocks.java b/1.12/src/main/java/wile/engineersdecor/blocks/ModBlocks.java index cc64623..ee7d7d8 100644 --- a/1.12/src/main/java/wile/engineersdecor/blocks/ModBlocks.java +++ b/1.12/src/main/java/wile/engineersdecor/blocks/ModBlocks.java @@ -12,6 +12,7 @@ */ package wile.engineersdecor.blocks; +import net.minecraft.tileentity.TileEntity; import wile.engineersdecor.ModEngineersDecor; import wile.engineersdecor.detail.ModAuxiliaries; import wile.engineersdecor.detail.ModConfig; @@ -35,49 +36,81 @@ import javax.annotation.Nonnull; @SuppressWarnings("unused") public class ModBlocks { - public static final BlockDecorFull CLINKER_BRICK_BLOCK = new BlockDecorFull("clinker_brick_block", 0, Material.ROCK, 2f, 50f, SoundType.STONE); + //-------------------------------------------------------------------------------------------------------------------- + //-- Blocks + //-------------------------------------------------------------------------------------------------------------------- + + public static final BlockDecorFull CLINKER_BRICK_BLOCK = new BlockDecorFull("clinker_brick_block", 0, Material.ROCK, 2f, 15f, SoundType.STONE); public static final BlockDecorStairs CLINKER_BRICK_STAIRS = new BlockDecorStairs("clinker_brick_stairs", CLINKER_BRICK_BLOCK.getDefaultState()); - public static final BlockDecorWall CLINKER_BRICK_WALL = new BlockDecorWall("clinker_brick_wall", BlockDecor.CFG_DEFAULT, Material.ROCK, 8f, 50f, SoundType.STONE); + public static final BlockDecorWall CLINKER_BRICK_WALL = new BlockDecorWall("clinker_brick_wall", BlockDecor.CFG_DEFAULT, Material.ROCK, 2f, 20f, SoundType.STONE); - public static final BlockDecorFull SLAG_BRICK_BLOCK = new BlockDecorFull("slag_brick_block", 0, Material.ROCK, 2f, 50f, SoundType.STONE); + public static final BlockDecorFull SLAG_BRICK_BLOCK = new BlockDecorFull("slag_brick_block", 0, Material.ROCK, 2f, 15f, SoundType.STONE); public static final BlockDecorStairs SLAG_BRICK_STAIRS = new BlockDecorStairs("slag_brick_stairs", SLAG_BRICK_BLOCK.getDefaultState()); - public static final BlockDecorWall SLAG_BRICK_WALL = new BlockDecorWall("slag_brick_wall", BlockDecor.CFG_DEFAULT, Material.ROCK, 8f, 50f, SoundType.STONE); + public static final BlockDecorWall SLAG_BRICK_WALL = new BlockDecorWall("slag_brick_wall", BlockDecor.CFG_DEFAULT, Material.ROCK, 2f, 15f, SoundType.STONE); - public static final BlockDecorFull REBAR_CONCRETE_BLOCK = new BlockDecorFull("rebar_concrete", 0, Material.ROCK, 8f, 2000f, SoundType.STONE); + public static final BlockDecorFull REBAR_CONCRETE_BLOCK = new BlockDecorFull("rebar_concrete", 0, Material.ROCK, 5f, 2000f, SoundType.STONE); public static final BlockDecorStairs REBAR_CONCRETE_STAIRS = new BlockDecorStairs("rebar_concrete_stairs", REBAR_CONCRETE_BLOCK.getDefaultState()); - public static final BlockDecorWall REBAR_CONCRETE_WALL = new BlockDecorWall("rebar_concrete_wall", BlockDecor.CFG_DEFAULT, Material.ROCK, 8f, 2000f, SoundType.STONE); - public static final BlockDecorFull REBAR_CONCRETE_TILE = new BlockDecorFull("rebar_concrete_tile", 0, Material.ROCK, 8f, 2000f, SoundType.STONE); + public static final BlockDecorWall REBAR_CONCRETE_WALL = new BlockDecorWall("rebar_concrete_wall", BlockDecor.CFG_DEFAULT, Material.ROCK, 5f, 2000f, SoundType.STONE); + public static final BlockDecorFull REBAR_CONCRETE_TILE = new BlockDecorFull("rebar_concrete_tile", 0, Material.ROCK, 5f, 2000f, SoundType.STONE); public static final BlockDecorStairs REBAR_CONCRETE_TILE_STAIRS = new BlockDecorStairs("rebar_concrete_tile_stairs", REBAR_CONCRETE_TILE.getDefaultState()); - public static final BlockDecorWall CONCRETE_WALL = new BlockDecorWall("concrete_wall", BlockDecor.CFG_DEFAULT, Material.ROCK, 8f, 50f, SoundType.STONE); + public static final BlockDecorWall CONCRETE_WALL = new BlockDecorWall("concrete_wall", BlockDecor.CFG_DEFAULT, Material.ROCK, 5f, 20f, SoundType.STONE); - public static final BlockDecorLadder METAL_RUNG_LADDER = new BlockDecorLadder("metal_rung_ladder", 0, Material.IRON, 1.0f, 25f, SoundType.METAL); - public static final BlockDecorLadder METAL_RUNG_STEPS = new BlockDecorLadder("metal_rung_steps", 0, Material.IRON, 1.0f, 25f, SoundType.METAL); - public static final BlockDecorLadder TREATED_WOOD_LADDER = new BlockDecorLadder("treated_wood_ladder", 0, Material.WOOD, 1.0f, 15f, SoundType.WOOD); + public static final BlockDecorLadder METAL_RUNG_LADDER = new BlockDecorLadder("metal_rung_ladder", 0, Material.IRON, 1.0f, 20f, SoundType.METAL); + public static final BlockDecorLadder METAL_RUNG_STEPS = new BlockDecorLadder("metal_rung_steps", 0, Material.IRON, 1.0f, 20f, SoundType.METAL); + public static final BlockDecorLadder TREATED_WOOD_LADDER = new BlockDecorLadder("treated_wood_ladder", 0, Material.WOOD, 1.0f, 10f, SoundType.WOOD); public static final BlockDecorGlassBlock PANZERGLASS_BLOCK = new BlockDecorGlassBlock("panzerglass_block", 0, Material.GLASS, 0.8f, 2000f, SoundType.GLASS); public static final BlockDecorStraightPole TREATED_WOOD_POLE = new BlockDecorStraightPole( "treated_wood_pole", BlockDecor.CFG_CUTOUT|BlockDecor.CFG_FACING_PLACEMENT, - Material.WOOD, 1.0f, 15f, SoundType.WOOD, + Material.WOOD, 1.0f, 10f, SoundType.WOOD, ModAuxiliaries.getPixeledAABB(5.8,5.8,0, 10.2,10.2,16) ); public static final BlockDecorStraightPole TREATED_WOOD_POLE_HEAD = new BlockDecorStraightPole( "treated_wood_pole_head", BlockDecor.CFG_CUTOUT|BlockDecor.CFG_FACING_PLACEMENT|BlockDecor.CFG_FLIP_PLACEMENT_IF_SAME, - Material.WOOD, 1.0f, 15f, SoundType.WOOD, + Material.WOOD, 1.0f, 10f, SoundType.WOOD, ModAuxiliaries.getPixeledAABB(5.8,5.8,0, 10.2,10.2,16) ); public static final BlockDecorStraightPole TREATED_WOOD_POLE_SUPPORT = new BlockDecorStraightPole( "treated_wood_pole_support", BlockDecor.CFG_CUTOUT|BlockDecor.CFG_FACING_PLACEMENT|BlockDecor.CFG_FLIP_PLACEMENT_IF_SAME, - Material.WOOD, 1.0f, 15f, SoundType.WOOD, + Material.WOOD, 1.0f, 10f, SoundType.WOOD, ModAuxiliaries.getPixeledAABB(5.8,5.8,0, 10.2,10.2,16) ); + public static final BlockDecorStraightPole THIN_STEEL_POLE = new BlockDecorStraightPole( + "thin_steel_pole", + BlockDecor.CFG_CUTOUT|BlockDecor.CFG_FACING_PLACEMENT, + Material.IRON, 1.0f, 15f, SoundType.METAL, + ModAuxiliaries.getPixeledAABB(6,6,0, 10,10,16) + ); + + public static final BlockDecorStraightPole THIN_STEEL_POLE_HEAD = new BlockDecorStraightPole( + "thin_steel_pole_head", + BlockDecor.CFG_CUTOUT|BlockDecor.CFG_FACING_PLACEMENT|BlockDecor.CFG_FLIP_PLACEMENT_IF_SAME, + Material.IRON, 1.0f, 15f, SoundType.METAL, + ModAuxiliaries.getPixeledAABB(6,6,0, 10,10,16) + ); + + public static final BlockDecorStraightPole THICK_STEEL_POLE = new BlockDecorStraightPole( + "thick_steel_pole", + BlockDecor.CFG_CUTOUT|BlockDecor.CFG_FACING_PLACEMENT, + Material.IRON, 1.0f, 15f, SoundType.METAL, + ModAuxiliaries.getPixeledAABB(5,5,0, 11,11,16) + ); + + public static final BlockDecorStraightPole THICK_STEEL_POLE_HEAD = new BlockDecorStraightPole( + "thick_steel_pole_head", + BlockDecor.CFG_CUTOUT|BlockDecor.CFG_FACING_PLACEMENT|BlockDecor.CFG_FLIP_PLACEMENT_IF_SAME, + Material.IRON, 1.0f, 15f, SoundType.METAL, + ModAuxiliaries.getPixeledAABB(5,5,0, 11,11,16) + ); + public static final BlockDecor TREATED_WOOD_TABLE = new BlockDecor( "treated_wood_table", BlockDecor.CFG_CUTOUT|BlockDecor.CFG_HORIZIONTAL|BlockDecor.CFG_LOOK_PLACEMENT, @@ -94,7 +127,7 @@ public class ModBlocks public static final BlockDecorCraftingTable TREATED_WOOD_CRAFTING_TABLE = new BlockDecorCraftingTable( "treated_wood_crafting_table", - BlockDecor.CFG_CUTOUT|BlockDecor.CFG_HORIZIONTAL|BlockDecor.CFG_LOOK_PLACEMENT, + BlockDecor.CFG_CUTOUT|BlockDecor.CFG_HORIZIONTAL|BlockDecor.CFG_LOOK_PLACEMENT|BlockDecor.CFG_OPPOSITE_PLACEMENT, Material.WOOD, 1.0f, 15f, SoundType.WOOD, ModAuxiliaries.getPixeledAABB(1,0,1, 15,15.9,15) ); @@ -109,40 +142,117 @@ public class ModBlocks public static final BlockDecorDirected TREATED_WOOD_WINDOWSILL = new BlockDecorDirected( "treated_wood_windowsill", BlockDecor.CFG_CUTOUT|BlockDecor.CFG_HORIZIONTAL|BlockDecor.CFG_FACING_PLACEMENT, - Material.WOOD, 1.0f, 15f, SoundType.WOOD, + Material.WOOD, 1.0f, 10f, SoundType.WOOD, ModAuxiliaries.getPixeledAABB(0.5,15,10.5, 15.5,16,16) ); public static final BlockDecorWindow TREATED_WOOD_WINDOW = new BlockDecorWindow( "treated_wood_window", BlockDecor.CFG_TRANSLUCENT|BlockDecor.CFG_LOOK_PLACEMENT, - Material.WOOD, 0.5f, 15f, SoundType.GLASS, + Material.WOOD, 0.5f, 10f, SoundType.GLASS, ModAuxiliaries.getPixeledAABB(0,0,7, 16,16,9) ); public static final BlockDecorWindow STEEL_FRAMED_WINDOW = new BlockDecorWindow( "steel_framed_window", BlockDecor.CFG_TRANSLUCENT|BlockDecor.CFG_LOOK_PLACEMENT, - Material.IRON, 0.5f, 30f, SoundType.GLASS, + Material.IRON, 0.5f, 15f, SoundType.GLASS, ModAuxiliaries.getPixeledAABB(0,0,7.5, 16,16,8.5) ); public static final BlockDecorFurnace SMALL_LAB_FURNACE = new BlockDecorFurnace( "small_lab_furnace", + BlockDecor.CFG_CUTOUT|BlockDecor.CFG_HORIZIONTAL|BlockDecor.CFG_LOOK_PLACEMENT|BlockDecor.CFG_OPPOSITE_PLACEMENT, + Material.IRON, 0.35f, 15f, SoundType.METAL, + ModAuxiliaries.getPixeledAABB(1,0,1, 15,15,16) + ); + + public static final BlockDecorFurnaceElectrical SMALL_ELECTRICAL_FURNACE = new BlockDecorFurnaceElectrical( + "small_electrical_furnace", BlockDecor.CFG_CUTOUT|BlockDecor.CFG_HORIZIONTAL|BlockDecor.CFG_LOOK_PLACEMENT, - Material.IRON, 1.0f, 15f, SoundType.METAL, - ModAuxiliaries.getPixeledAABB(1,0,1, 15,15,16.0) + Material.IRON, 0.35f, 15f, SoundType.METAL, + ModAuxiliaries.getPixeledAABB(0,0,0, 16,16,16) ); public static final BlockDecorDirected SIGN_MODLOGO = new BlockDecorDirected( "sign_decor", BlockDecor.CFG_CUTOUT|BlockDecor.CFG_OPPOSITE_PLACEMENT|(1< clazz; + public final ResourceLocation key; + public TileEntityRegistrationData(Class c, String k) { clazz=c; key = new ResourceLocation(ModEngineersDecor.MODID, k); } + } + + private static final TileEntityRegistrationData TREATED_WOOD_CRAFTING_TABLE_TEI = new TileEntityRegistrationData( + BlockDecorCraftingTable.BTileEntity.class, "te_crafting_table" + ); + private static final TileEntityRegistrationData SMALL_LAB_FURNACE_TEI = new TileEntityRegistrationData( + BlockDecorFurnace.BTileEntity.class, "te_small_lab_furnace" + ); + private static final TileEntityRegistrationData SMALL_ELECTRICAL_FURNACE_TEI = new TileEntityRegistrationData( + BlockDecorFurnaceElectrical.BTileEntity.class, "te_electrical_lab_furnace" + ); + private static final TileEntityRegistrationData STRAIGHT_PIPE_VALVE_TEI = new TileEntityRegistrationData( + BlockDecorPipeValve.BTileEntity.class, "te_pipe_valve" + ); + private static final TileEntityRegistrationData PASSIVE_FLUID_ACCUMULATOR_TEI = new TileEntityRegistrationData( + BlockDecorPassiveFluidAccumulator.BTileEntity.class, "te_passive_fluid_accumulator" + ); + + //-------------------------------------------------------------------------------------------------------------------- + //-- Registration list + //-------------------------------------------------------------------------------------------------------------------- + + private static final Object content[] = { + TREATED_WOOD_CRAFTING_TABLE, TREATED_WOOD_CRAFTING_TABLE_TEI, CLINKER_BRICK_BLOCK, CLINKER_BRICK_STAIRS, CLINKER_BRICK_WALL, @@ -165,17 +275,30 @@ public class ModBlocks TREATED_WOOD_WINDOW, TREATED_WOOD_WINDOWSILL, INSET_LIGHT_IRON, - SMALL_LAB_FURNACE, + SMALL_LAB_FURNACE, SMALL_LAB_FURNACE_TEI, STEEL_FRAMED_WINDOW, TREATED_WOOD_POLE_SUPPORT, TREATED_WOOD_POLE_HEAD, - SIGN_MODLOGO + SIGN_MODLOGO, + THIN_STEEL_POLE, + THICK_STEEL_POLE, + THIN_STEEL_POLE_HEAD, + THICK_STEEL_POLE_HEAD, + STEEL_DOUBLE_T_SUPPORT, + STRAIGHT_CHECK_VALVE, STRAIGHT_REDSTONE_VALVE, STRAIGHT_REDSTONE_ANALOG_VALVE, STRAIGHT_PIPE_VALVE_TEI }; - private static final Block devBlocks[] = { + private static final Object dev_content[] = { + PASSIVE_FLUID_ACCUMULATOR, PASSIVE_FLUID_ACCUMULATOR_TEI, + SMALL_ELECTRICAL_FURNACE, SMALL_ELECTRICAL_FURNACE_TEI }; + //-------------------------------------------------------------------------------------------------------------------- + //-- Init + //-------------------------------------------------------------------------------------------------------------------- + private static ArrayList registeredBlocks = new ArrayList<>(); + private static ArrayList registeredTileEntityInits = new ArrayList<>(); @Nonnull public static List getRegisteredBlocks() @@ -185,28 +308,33 @@ public class ModBlocks public static final void registerBlocks(RegistryEvent.Register event) { // Config based registry selection - int num_registrations_skipped = 0; - ArrayList allBlocks = new ArrayList<>(); - Collections.addAll(allBlocks, modBlocks); - //if(Loader.isModLoaded("immersiveengineering")){} - if(ModConfig.zmisc.with_experimental) Collections.addAll(allBlocks, devBlocks); + int num_block_registrations_skipped = 0; final boolean woor = ModConfig.isWithoutOptOutRegistration(); - for(Block e:allBlocks) { - if((!woor) || (!ModConfig.isOptedOut(e))) { - registeredBlocks.add(e); - } else { - ++num_registrations_skipped; + for(Object e:content) { + if(e instanceof Block) { + if((!woor) || (!ModConfig.isOptedOut((Block)e))) { + registeredBlocks.add((Block) e); + } else { + ++num_block_registrations_skipped; + } + } else if(e instanceof TileEntityRegistrationData) { + registeredTileEntityInits.add((TileEntityRegistrationData)e); + } + } + if(ModConfig.zmisc.with_experimental) { + for(Object e:dev_content) { + if(e instanceof Block) { + registeredBlocks.add((Block) e); + } else if(e instanceof TileEntityRegistrationData) { + registeredTileEntityInits.add((TileEntityRegistrationData) e); + } } } for(Block e:registeredBlocks) event.getRegistry().register(e); ModEngineersDecor.logger.info("Registered " + Integer.toString(registeredBlocks.size()) + " blocks."); - if(num_registrations_skipped > 0) { - ModEngineersDecor.logger.info("Skipped registration of " + num_registrations_skipped + " blocks due to no-register-opt-out config."); - } - - // TEs - GameRegistry.registerTileEntity(BlockDecorCraftingTable.BTileEntity.class, new ResourceLocation(ModEngineersDecor.MODID, "te_crafting_table")); - GameRegistry.registerTileEntity(BlockDecorFurnace.BTileEntity.class, new ResourceLocation(ModEngineersDecor.MODID, "te_small_lab_furnace")); + if(num_block_registrations_skipped > 0) ModEngineersDecor.logger.info("Skipped registration of " + num_block_registrations_skipped + " blocks."); + for(TileEntityRegistrationData e:registeredTileEntityInits) GameRegistry.registerTileEntity(e.clazz, e.key); + ModEngineersDecor.logger.info("Registered " + Integer.toString(registeredTileEntityInits.size()) + " tile entities."); } // Invoked from ClientProxy.registerModels() diff --git a/1.12/src/main/java/wile/engineersdecor/detail/ModAuxiliaries.java b/1.12/src/main/java/wile/engineersdecor/detail/ModAuxiliaries.java index 9728bd2..ba97651 100644 --- a/1.12/src/main/java/wile/engineersdecor/detail/ModAuxiliaries.java +++ b/1.12/src/main/java/wile/engineersdecor/detail/ModAuxiliaries.java @@ -8,6 +8,7 @@ */ package wile.engineersdecor.detail; +import net.minecraft.entity.player.EntityPlayer; import wile.engineersdecor.ModEngineersDecor; import net.minecraft.world.World; import net.minecraft.item.ItemStack; @@ -144,4 +145,14 @@ public class ModAuxiliaries } return bb; } + + @SuppressWarnings("unused") + public static void playerChatMessage(EntityPlayer player, final String message) + { + String s = message.trim(); + if(!s.isEmpty()) player.sendMessage(new TextComponentTranslation(s)); + } + + @SuppressWarnings("unused") + public interface IExperimentalFeature{} } diff --git a/1.12/src/main/java/wile/engineersdecor/detail/ModConfig.java b/1.12/src/main/java/wile/engineersdecor/detail/ModConfig.java index 280dd24..d892d79 100644 --- a/1.12/src/main/java/wile/engineersdecor/detail/ModConfig.java +++ b/1.12/src/main/java/wile/engineersdecor/detail/ModConfig.java @@ -14,11 +14,11 @@ import wile.engineersdecor.blocks.*; import net.minecraftforge.common.config.Config; import net.minecraftforge.common.config.ConfigManager; import net.minecraft.block.Block; +import net.minecraft.item.Item; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.client.event.ConfigChangedEvent; - import javax.annotation.Nullable; @Config(modid = ModEngineersDecor.MODID) @@ -107,6 +107,9 @@ public class ModConfig @Config.Name("Without ladder speed boost") public boolean without_ladder_speed_boost = false; + @Config.Comment({"Disable history refabrication feature of the treated wood crafting table."}) + @Config.Name("Without crafting table history") + public boolean without_crafting_table_history = false; } @Config.Comment({ @@ -192,6 +195,51 @@ public class ModConfig @Config.Name("Chairs: Stand up chance %") @Config.RangeDouble(min=0.001, max=10) public double chair_mob_standup_probability_percent = 1; + + @Config.Comment({"Enables small quick-move arrows from/to player/block storage. " + + "Makes the UI a bit too busy, therefore disabled by default." + }) + @Config.Name("Crafting table: Move buttons") + public boolean with_crafting_quickmove_buttons = false; + + @Config.Comment({ + "Defines how many millibuckets can be transferred (per tick) through the valves. " + + "That is technically the 'storage size' specified for blocks that want to fill " + + "fluids into the valve (the valve has no container and forward that to the output " + + "block), The value can be changed on-the-fly for tuning. " + }) + @Config.Name("Valves: Max flow rate") + @Config.RangeInt(min=1, max=10000) + public int pipevalve_max_flowrate = 1000; + + @Config.Comment({ + "Defines how many millibuckets per redstone signal strength can be transferred per tick " + + "through the analog redstone controlled valves. Note: power 0 is always off, power 15 is always " + + "the max flow rate. Between power 1 and 14 this scaler will result in a flow = 'redstone slope' * 'current redstone power'. " + + "The value can be changed on-the-fly for tuning. " + }) + @Config.Name("Valves: Redstone slope") + @Config.RangeInt(min=1, max=10000) + public int pipevalve_redstone_slope = 20; + + @Config.Comment({ + "Defines, in percent, how fast the electrical furnace smelts compared to " + + "a vanilla furnace. 100% means vanilla furnace speed, 150% means the " + + "electrical furnace is faster. The value can be changed on-the-fly for tuning." + }) + @Config.Name("E-furnace: Smelting speed %") + @Config.RangeInt(min=50, max=500) + public int e_furnace_speed_percent = BlockDecorFurnaceElectrical.BTileEntity.DEFAULT_SPEED_PERCENT; + + @Config.Comment({ + "Defines how much RF per tick the the electrical furnace consumed (average) for smelting. " + + "The feeders transferring items from/to adjacent have this consumption/8 for each stack transaction. " + + "The default value is only slightly higher than a furnace with an IE external heater (and no burning fuel inside)." + + "The config value can be changed on-the-fly for tuning." + }) + @Config.Name("E-furnace: Power consumption") + @Config.RangeInt(min=10, max=256) + public int e_furnace_power_consumption = BlockDecorFurnaceElectrical.BTileEntity.DEFAULT_ENERGY_CONSUMPTION; } @SuppressWarnings("unused") @@ -220,6 +268,7 @@ public class ModConfig { if((block == null) || (optout==null)) return true; if(block == ModBlocks.SIGN_MODLOGO) return true; + if((!zmisc.with_experimental) && (block instanceof ModAuxiliaries.IExperimentalFeature)) return true; final String rn = block.getRegistryName().getPath(); if(optout.without_clinker_bricks && rn.startsWith("clinker_brick_")) return true; if(optout.without_slag_bricks && rn.startsWith("slag_brick_")) return true; @@ -244,6 +293,12 @@ public class ModConfig return false; } + public static final boolean isOptedOut(final @Nullable Item item) + { + if((item == null) || (optout == null)) return true; + return false; + } + public static final void apply() { BlockDecorFurnace.BTileEntity.on_config(tweaks.furnace_smelting_speed_percent, tweaks.furnace_fuel_efficiency_percent, tweaks.furnace_boost_energy_consumption); @@ -251,7 +306,9 @@ public class ModConfig if(tweaks.furnace_smelts_nuggets) ModRecipes.furnaceRecipeOverrideSmeltsOresToNuggets(); BlockDecorChair.on_config(optout.without_chair_sitting, optout.without_mob_chair_sitting, tweaks.chair_mob_sitting_probability_percent, tweaks.chair_mob_standup_probability_percent); BlockDecorLadder.on_config(optout.without_ladder_speed_boost); - BlockDecorCraftingTable.on_config(!zmisc.with_experimental); + BlockDecorCraftingTable.on_config(optout.without_crafting_table_history, false, tweaks.with_crafting_quickmove_buttons); + BlockDecorPipeValve.on_config(tweaks.pipevalve_max_flowrate, tweaks.pipevalve_redstone_slope); + BlockDecorFurnaceElectrical.BTileEntity.on_config(tweaks.e_furnace_speed_percent, tweaks.e_furnace_power_consumption); } } diff --git a/1.12/src/main/java/wile/engineersdecor/detail/ModRecipes.java b/1.12/src/main/java/wile/engineersdecor/detail/ModRecipes.java index b51524a..5ad2b8e 100644 --- a/1.12/src/main/java/wile/engineersdecor/detail/ModRecipes.java +++ b/1.12/src/main/java/wile/engineersdecor/detail/ModRecipes.java @@ -5,23 +5,43 @@ * @license MIT (see https://opensource.org/licenses/MIT) * * General handling auxiliaries for mod recipes. + * + * Credits/references: + * + * - Looked up how blusunrise did the ore-to-grit recipes in `blusunrize.immersiveengineering.common.IERecipes`. */ package wile.engineersdecor.detail; import wile.engineersdecor.ModEngineersDecor; import wile.engineersdecor.blocks.BlockDecorFurnace; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipe; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.util.NonNullList; +import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.oredict.OreDictionary; -import net.minecraft.item.ItemStack; + import java.util.*; public class ModRecipes { + public static final void registerRecipes(RegistryEvent.Register event) + {} + + //-------------------------------------------------------------------------------------------------------------------- + // Furnace + //-------------------------------------------------------------------------------------------------------------------- + + /** + * Not a standard recipe, on-the-fly changable behaviour of the furnace. + */ public static final void furnaceRecipeOverrideReset() { BlockDecorFurnace.BRecipes.instance().reset(); } + /** + * Not a standard recipe, on-the-fly changable behaviour of the furnace. + */ public static final void furnaceRecipeOverrideSmeltsOresToNuggets() { try { diff --git a/1.12/src/main/java/wile/engineersdecor/eapi/jei/JEIPlugin.java b/1.12/src/main/java/wile/engineersdecor/eapi/jei/JEIPlugin.java index 36262a5..8c1d110 100644 --- a/1.12/src/main/java/wile/engineersdecor/eapi/jei/JEIPlugin.java +++ b/1.12/src/main/java/wile/engineersdecor/eapi/jei/JEIPlugin.java @@ -8,12 +8,13 @@ */ package wile.engineersdecor.eapi.jei; +import wile.engineersdecor.ModEngineersDecor; +import wile.engineersdecor.blocks.BlockDecorCraftingTable; +import wile.engineersdecor.blocks.ModBlocks; +import wile.engineersdecor.detail.ModConfig; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import wile.engineersdecor.ModEngineersDecor; -import wile.engineersdecor.blocks.ModBlocks; -import wile.engineersdecor.detail.ModConfig; @mezz.jei.api.JEIPlugin public class JEIPlugin implements mezz.jei.api.IModPlugin @@ -22,6 +23,7 @@ public class JEIPlugin implements mezz.jei.api.IModPlugin @SuppressWarnings("deprecation") public void register(mezz.jei.api.IModRegistry registry) { + // Block/item hiding try { for(Block e:ModBlocks.getRegisteredBlocks()) { if(ModConfig.isOptedOut(e)) { @@ -37,7 +39,20 @@ public class JEIPlugin implements mezz.jei.api.IModPlugin } } } catch(Throwable e) { - ModEngineersDecor.logger.warn("Exception in JEI opt-out processing: '" + e.getMessage() + "', skipping further JEI processing."); + ModEngineersDecor.logger.warn("Exception in JEI opt-out processing: '" + e.getMessage() + "', skipping further JEI optout processing."); + } + // Crafting table registration + if(!ModConfig.optout.without_crafting_table) { + try { + mezz.jei.api.recipe.transfer.IRecipeTransferRegistry recipeTranferRegistry = registry.getRecipeTransferRegistry(); + recipeTranferRegistry.addRecipeTransferHandler( + BlockDecorCraftingTable.BContainer.class, + mezz.jei.api.recipe.VanillaRecipeCategoryUid.CRAFTING, + 1, 9, 10, 44 + ); + } catch(Throwable e) { + ModEngineersDecor.logger.warn("Exception in JEI crafting table handler registration: '" + e.getMessage() + "'."); + } } } } diff --git a/1.12/src/main/java/wile/engineersdecor/items/ItemDecor.java b/1.12/src/main/java/wile/engineersdecor/items/ItemDecor.java new file mode 100644 index 0000000..5b4c08a --- /dev/null +++ b/1.12/src/main/java/wile/engineersdecor/items/ItemDecor.java @@ -0,0 +1,51 @@ +/* + * @file ItemDecor.java + * @author Stefan Wilhelm (wile) + * @copyright (C) 2018 Stefan Wilhelm + * @license MIT (see https://opensource.org/licenses/MIT) + * + * Basic item functionality for mod items. + */ +package wile.engineersdecor.items; + +import net.minecraft.client.renderer.block.model.ModelBakery; +import net.minecraft.client.renderer.block.model.ModelResourceLocation; +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; +import wile.engineersdecor.ModEngineersDecor; +import wile.engineersdecor.detail.ModAuxiliaries; + +import javax.annotation.Nullable; +import java.util.List; + +public class ItemDecor extends Item +{ + ItemDecor(String registryName) + { + super(); + setRegistryName(ModEngineersDecor.MODID, registryName); + setTranslationKey(ModEngineersDecor.MODID + "." + registryName); + setMaxStackSize(64); + setCreativeTab(ModEngineersDecor.CREATIVE_TAB_ENGINEERSDECOR); + setHasSubtypes(false); + } + + @SideOnly(Side.CLIENT) + public void initModel() + { + ModelResourceLocation rc = new ModelResourceLocation(getRegistryName(),"inventory"); + ModelBakery.registerItemVariants(this, rc); + ModelLoader.setCustomMeshDefinition(this, stack->rc); + } + + @Override + @SideOnly(Side.CLIENT) + public void addInformation(ItemStack stack, @Nullable World world, List tooltip, ITooltipFlag flag) + { ModAuxiliaries.Tooltip.addInformation(stack, world, tooltip, flag, true); } + +} diff --git a/1.12/src/main/java/wile/engineersdecor/items/ModItems.java b/1.12/src/main/java/wile/engineersdecor/items/ModItems.java new file mode 100644 index 0000000..4e416c2 --- /dev/null +++ b/1.12/src/main/java/wile/engineersdecor/items/ModItems.java @@ -0,0 +1,63 @@ +/* + * @file ModItems.java + * @author Stefan Wilhelm (wile) + * @copyright (C) 2018 Stefan Wilhelm + * @license MIT (see https://opensource.org/licenses/MIT) + * + * Definition and initialisation of items of this module. + */ +package wile.engineersdecor.items; + +import wile.engineersdecor.ModEngineersDecor; +import wile.engineersdecor.detail.ModConfig; +import net.minecraft.item.Item; +import net.minecraftforge.event.RegistryEvent; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; +import java.util.ArrayList; +import java.util.List; +import java.util.Collections; +import javax.annotation.Nonnull; + +@SuppressWarnings("unused") +public class ModItems +{ + + private static final Item[] modItems = { + }; + + private static final ArrayList registeredItems = new ArrayList<>(); + + @Nonnull + public static List getRegisteredItems() + { return Collections.unmodifiableList(registeredItems); } + + public static final void registerItems(RegistryEvent.Register event) + { + // Config based registry selection + int num_registrations_skipped = 0; + ArrayList allItems = new ArrayList<>(); + Collections.addAll(allItems, modItems); + final boolean woor = ModConfig.isWithoutOptOutRegistration(); + for(Item e:allItems) { + if((!woor) || (!ModConfig.isOptedOut(e))) { + registeredItems.add(e); + } else { + ++num_registrations_skipped; + } + } + for(Item e:registeredItems) event.getRegistry().register(e); + ModEngineersDecor.logger.info("Registered " + Integer.toString(registeredItems.size()) + " items."); + if(num_registrations_skipped > 0) { + ModEngineersDecor.logger.info("Skipped registration of " + num_registrations_skipped + " items."); + } + } + + @SideOnly(Side.CLIENT) + public static final void initModels() + { + for(Item e:registeredItems) { + if(e instanceof ItemDecor) ((ItemDecor)e).initModel(); + } + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/blockstates/clinker_brick_block.json b/1.12/src/main/resources/assets/engineersdecor/blockstates/clinker_brick_block.json index 04aa8d2..e65c11b 100644 --- a/1.12/src/main/resources/assets/engineersdecor/blockstates/clinker_brick_block.json +++ b/1.12/src/main/resources/assets/engineersdecor/blockstates/clinker_brick_block.json @@ -1,7 +1,7 @@ { "forge_marker": 1, "defaults": { - "model": "engineersdecor:decor_full_block_model", + "model": "engineersdecor:std/decor_full_block_model", "textures": { "all": "engineersdecor:blocks/clinker_brick/clinker_brick_texture0" } }, "variants": { diff --git a/1.12/src/main/resources/assets/engineersdecor/blockstates/clinker_brick_wall.json b/1.12/src/main/resources/assets/engineersdecor/blockstates/clinker_brick_wall.json index ee36212..10334d4 100644 --- a/1.12/src/main/resources/assets/engineersdecor/blockstates/clinker_brick_wall.json +++ b/1.12/src/main/resources/assets/engineersdecor/blockstates/clinker_brick_wall.json @@ -3,7 +3,7 @@ "defaults": { "model": "engineersdecor:wall/clinker_brick_wall_default", "textures": { - "wall": "engineersdecor:blocks/clinker_brick/clinker_brick_wall", + "wall": "engineersdecor:blocks/clinker_brick/clinker_brick_wall0", "postside": "engineersdecor:blocks/clinker_brick/clinker_brick_pole_side", "top": "engineersdecor:blocks/clinker_brick/clinker_brick_top", "particle": "engineersdecor:blocks/clinker_brick/clinker_brick_top" @@ -15,6 +15,16 @@ "north": { "false":{}, "true": {"submodel": {"clinker_wall_north" : {"model": "engineersdecor:wall/clinker_brick_wall_side", "uvlock": true, "y": 0 }}} }, "east" : { "false":{}, "true": {"submodel": {"clinker_wall_east" : {"model": "engineersdecor:wall/clinker_brick_wall_side", "uvlock": true, "y": 90 }}} }, "south": { "false":{}, "true": {"submodel": {"clinker_wall_south" : {"model": "engineersdecor:wall/clinker_brick_wall_side", "uvlock": true, "y": 180 }}} }, - "west" : { "false":{}, "true": {"submodel": {"clinker_wall_west" : {"model": "engineersdecor:wall/clinker_brick_wall_side", "uvlock": true, "y": 270 }}} } + "west" : { "false":{}, "true": {"submodel": {"clinker_wall_west" : {"model": "engineersdecor:wall/clinker_brick_wall_side", "uvlock": true, "y": 270 }}} }, + "tvariant": { + "0":{"textures":{"wall": "engineersdecor:blocks/clinker_brick/clinker_brick_wall0"}}, + "1":{"textures":{"wall": "engineersdecor:blocks/clinker_brick/clinker_brick_wall1"}}, + "2":{"textures":{"wall": "engineersdecor:blocks/clinker_brick/clinker_brick_wall2"}}, + "3":{"textures":{"wall": "engineersdecor:blocks/clinker_brick/clinker_brick_wall3"}}, + "4":{"textures":{"wall": "engineersdecor:blocks/clinker_brick/clinker_brick_wall4"}}, + "5":{"textures":{"wall": "engineersdecor:blocks/clinker_brick/clinker_brick_wall5"}}, + "6":{"textures":{"wall": "engineersdecor:blocks/clinker_brick/clinker_brick_wall6"}}, + "7":{"textures":{"wall": "engineersdecor:blocks/clinker_brick/clinker_brick_wall7"}} + } } } diff --git a/1.12/src/main/resources/assets/engineersdecor/blockstates/concrete_wall.json b/1.12/src/main/resources/assets/engineersdecor/blockstates/concrete_wall.json index 6801e12..d771b22 100644 --- a/1.12/src/main/resources/assets/engineersdecor/blockstates/concrete_wall.json +++ b/1.12/src/main/resources/assets/engineersdecor/blockstates/concrete_wall.json @@ -13,6 +13,7 @@ "north": { "false":{}, "true": {"submodel": {"concrete_wall_north" : {"model": "engineersdecor:wall/concrete_wall_side", "uvlock": true, "y": 0 }}} }, "east" : { "false":{}, "true": {"submodel": {"concrete_wall_east" : {"model": "engineersdecor:wall/concrete_wall_side", "uvlock": true, "y": 90 }}} }, "south": { "false":{}, "true": {"submodel": {"concrete_wall_south" : {"model": "engineersdecor:wall/concrete_wall_side", "uvlock": true, "y": 180 }}} }, - "west" : { "false":{}, "true": {"submodel": {"concrete_wall_west" : {"model": "engineersdecor:wall/concrete_wall_side", "uvlock": true, "y": 270 }}} } + "west" : { "false":{}, "true": {"submodel": {"concrete_wall_west" : {"model": "engineersdecor:wall/concrete_wall_side", "uvlock": true, "y": 270 }}} }, + "tvariant": { "0":{},"1":{},"2":{},"3":{},"4":{},"5":{},"6":{},"7":{} } } } diff --git a/1.12/src/main/resources/assets/engineersdecor/blockstates/passive_fluid_accumulator.json b/1.12/src/main/resources/assets/engineersdecor/blockstates/passive_fluid_accumulator.json new file mode 100644 index 0000000..19953da --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/blockstates/passive_fluid_accumulator.json @@ -0,0 +1,11 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "engineersdecor:pipe/passive_fluid_accumulator_model" + }, + "variants": { + "normal": [{}], + "inventory": [{}], + "facing": { "north":{"y":0}, "south":{"y":180}, "west":{"y":270}, "east":{"y":90}, "up": {"x":-90}, "down": {"x":90} } + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/blockstates/rebar_concrete.json b/1.12/src/main/resources/assets/engineersdecor/blockstates/rebar_concrete.json index cbeaeeb..f636bd8 100644 --- a/1.12/src/main/resources/assets/engineersdecor/blockstates/rebar_concrete.json +++ b/1.12/src/main/resources/assets/engineersdecor/blockstates/rebar_concrete.json @@ -1,7 +1,7 @@ { "forge_marker": 1, "defaults": { - "model": "engineersdecor:decor_full_block_model", + "model": "engineersdecor:std/decor_full_block_model", "textures": { "all": "engineersdecor:blocks/concrete/rebar_concrete_texture0" } }, "variants": { diff --git a/1.12/src/main/resources/assets/engineersdecor/blockstates/rebar_concrete_tile.json b/1.12/src/main/resources/assets/engineersdecor/blockstates/rebar_concrete_tile.json index 037468a..4b1f865 100644 --- a/1.12/src/main/resources/assets/engineersdecor/blockstates/rebar_concrete_tile.json +++ b/1.12/src/main/resources/assets/engineersdecor/blockstates/rebar_concrete_tile.json @@ -1,7 +1,7 @@ { "forge_marker": 1, "defaults": { - "model": "engineersdecor:decor_full_block_model", + "model": "engineersdecor:std/decor_full_block_model", "textures": { "all": "engineersdecor:blocks/concrete/rebar_concrete_tile_texture0" } }, "variants": { diff --git a/1.12/src/main/resources/assets/engineersdecor/blockstates/rebar_concrete_wall.json b/1.12/src/main/resources/assets/engineersdecor/blockstates/rebar_concrete_wall.json index 9590325..e83c0af 100644 --- a/1.12/src/main/resources/assets/engineersdecor/blockstates/rebar_concrete_wall.json +++ b/1.12/src/main/resources/assets/engineersdecor/blockstates/rebar_concrete_wall.json @@ -13,6 +13,16 @@ "north": { "false":{}, "true": {"submodel": {"concrete_wall_north" : {"model": "engineersdecor:wall/concrete_wall_side", "uvlock": true, "y": 0 }}} }, "east" : { "false":{}, "true": {"submodel": {"concrete_wall_east" : {"model": "engineersdecor:wall/concrete_wall_side", "uvlock": true, "y": 90 }}} }, "south": { "false":{}, "true": {"submodel": {"concrete_wall_south" : {"model": "engineersdecor:wall/concrete_wall_side", "uvlock": true, "y": 180 }}} }, - "west" : { "false":{}, "true": {"submodel": {"concrete_wall_west" : {"model": "engineersdecor:wall/concrete_wall_side", "uvlock": true, "y": 270 }}} } + "west" : { "false":{}, "true": {"submodel": {"concrete_wall_west" : {"model": "engineersdecor:wall/concrete_wall_side", "uvlock": true, "y": 270 }}} }, + "tvariant": { + "0":{"textures":{ "wall": "engineersdecor:blocks/concrete/rebar_concrete_texture0" }}, + "1":{"textures":{ "wall": "engineersdecor:blocks/concrete/rebar_concrete_texture1" }}, + "2":{"textures":{ "wall": "engineersdecor:blocks/concrete/rebar_concrete_texture2" }}, + "3":{"textures":{ "wall": "engineersdecor:blocks/concrete/rebar_concrete_texture3" }}, + "4":{"textures":{ "wall": "engineersdecor:blocks/concrete/rebar_concrete_texture4" }}, + "5":{"textures":{ "wall": "engineersdecor:blocks/concrete/rebar_concrete_texture5" }}, + "6":{"textures":{ "wall": "engineersdecor:blocks/concrete/rebar_concrete_texture6" }}, + "7":{"textures":{ "wall": "engineersdecor:blocks/concrete/rebar_concrete_texture7" }} + } } } diff --git a/1.12/src/main/resources/assets/engineersdecor/blockstates/slag_brick_block.json b/1.12/src/main/resources/assets/engineersdecor/blockstates/slag_brick_block.json index 23fc1ef..8384070 100644 --- a/1.12/src/main/resources/assets/engineersdecor/blockstates/slag_brick_block.json +++ b/1.12/src/main/resources/assets/engineersdecor/blockstates/slag_brick_block.json @@ -1,7 +1,7 @@ { "forge_marker": 1, "defaults": { - "model": "engineersdecor:decor_full_block_model", + "model": "engineersdecor:std/decor_full_block_model", "textures": { "all": "engineersdecor:blocks/slag_brick/slag_brick_texture0" } }, "variants": { diff --git a/1.12/src/main/resources/assets/engineersdecor/blockstates/slag_brick_wall.json b/1.12/src/main/resources/assets/engineersdecor/blockstates/slag_brick_wall.json index 1c10bc2..039f350 100644 --- a/1.12/src/main/resources/assets/engineersdecor/blockstates/slag_brick_wall.json +++ b/1.12/src/main/resources/assets/engineersdecor/blockstates/slag_brick_wall.json @@ -3,7 +3,7 @@ "defaults": { "model": "engineersdecor:wall/slag_brick_wall_default", "textures": { - "wall": "engineersdecor:blocks/slag_brick/slag_brick_wall", + "wall": "engineersdecor:blocks/slag_brick/slag_brick_wall0", "postside": "engineersdecor:blocks/slag_brick/slag_brick_pole_side", "top": "engineersdecor:blocks/slag_brick/slag_brick_top", "particle": "engineersdecor:blocks/slag_brick/slag_brick_top" @@ -15,6 +15,16 @@ "north": { "false":{}, "true": {"submodel": {"clinker_wall_north" : {"model": "engineersdecor:wall/slag_brick_wall_side", "uvlock": true, "y": 0 }}} }, "east" : { "false":{}, "true": {"submodel": {"clinker_wall_east" : {"model": "engineersdecor:wall/slag_brick_wall_side", "uvlock": true, "y": 90 }}} }, "south": { "false":{}, "true": {"submodel": {"clinker_wall_south" : {"model": "engineersdecor:wall/slag_brick_wall_side", "uvlock": true, "y": 180 }}} }, - "west" : { "false":{}, "true": {"submodel": {"clinker_wall_west" : {"model": "engineersdecor:wall/slag_brick_wall_side", "uvlock": true, "y": 270 }}} } + "west" : { "false":{}, "true": {"submodel": {"clinker_wall_west" : {"model": "engineersdecor:wall/slag_brick_wall_side", "uvlock": true, "y": 270 }}} }, + "tvariant": { + "0":{"textures":{ "wall": "engineersdecor:blocks/slag_brick/slag_brick_wall0" }}, + "1":{"textures":{ "wall": "engineersdecor:blocks/slag_brick/slag_brick_wall1" }}, + "2":{"textures":{ "wall": "engineersdecor:blocks/slag_brick/slag_brick_wall2" }}, + "3":{"textures":{ "wall": "engineersdecor:blocks/slag_brick/slag_brick_wall3" }}, + "4":{"textures":{ "wall": "engineersdecor:blocks/slag_brick/slag_brick_wall4" }}, + "5":{"textures":{ "wall": "engineersdecor:blocks/slag_brick/slag_brick_wall5" }}, + "6":{"textures":{ "wall": "engineersdecor:blocks/slag_brick/slag_brick_wall6" }}, + "7":{"textures":{ "wall": "engineersdecor:blocks/slag_brick/slag_brick_wall7" }} + } } } diff --git a/1.12/src/main/resources/assets/engineersdecor/blockstates/small_electrical_furnace.json b/1.12/src/main/resources/assets/engineersdecor/blockstates/small_electrical_furnace.json new file mode 100644 index 0000000..75fc6ec --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/blockstates/small_electrical_furnace.json @@ -0,0 +1,12 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "engineersdecor:furnace/small_electrical_furnace_model" + }, + "variants": { + "normal": [{}], + "inventory": [{}], + "facing": { "north": {"y":0}, "south": {"y":180}, "west": {"y":-90}, "east": {"y":90}, "up":{}, "down":{} }, + "lit": { "false":{ "textures":{ "gloom": "engineersdecor:blocks/furnace/small_electrical_furnace_gloom_off" } }, "true":{}} + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/blockstates/steel_double_t_support.json b/1.12/src/main/resources/assets/engineersdecor/blockstates/steel_double_t_support.json new file mode 100644 index 0000000..f6ecc79 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/blockstates/steel_double_t_support.json @@ -0,0 +1,28 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "engineersdecor:hsupport/steel_double_t_support_model", + "textures": { + "particle": "engineersdecor:blocks/hsupport/steel_double_t_support_side_texture", + "side": "engineersdecor:blocks/hsupport/steel_double_t_support_side_texture", + "top": "engineersdecor:blocks/hsupport/steel_double_t_support_top_texture", + "end": "engineersdecor:blocks/hsupport/steel_double_t_support_end_texture" + } + }, + "variants": { + "normal": [{}], + "inventory": [{}], + "eastwest": { "false":{"y":0}, "true": {"y":90}}, + "rightbeam": { "false":{}, "true": { + "submodel": {"rsteelsupport": { "model": "engineersdecor:hsupport/steel_double_t_support_xconnect_model", "y": 0 }} + }}, + "leftbeam": { "false":{}, "true": { + "submodel": {"lsteelsupport": { "model": "engineersdecor:hsupport/steel_double_t_support_xconnect_model", "y": 180 }} + }}, + "downconnect": { + "0": {}, + "1": { "submodel": {"dthinpole": { "model": "engineersdecor:hsupport/steel_double_t_support_xconnect_thin_pole_model"}} }, + "2": { "submodel": {"dthickpole": { "model": "engineersdecor:hsupport/steel_double_t_support_xconnect_thick_pole_model"}} } + } + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/blockstates/steel_framed_window.json b/1.12/src/main/resources/assets/engineersdecor/blockstates/steel_framed_window.json index f8d2f86..6b4f0ab 100644 --- a/1.12/src/main/resources/assets/engineersdecor/blockstates/steel_framed_window.json +++ b/1.12/src/main/resources/assets/engineersdecor/blockstates/steel_framed_window.json @@ -5,7 +5,7 @@ "transform": "forge:default-block", "custom": { "base": "engineersdecor:steel_framed_window#frame", - "Cutout": "engineersdecor:steel_framed_window#frame", + "Mipped Cutout": "engineersdecor:steel_framed_window#frame", "Translucent": "engineersdecor:steel_framed_window#pane" } }, diff --git a/1.12/src/main/resources/assets/engineersdecor/blockstates/straight_pipe_valve.json b/1.12/src/main/resources/assets/engineersdecor/blockstates/straight_pipe_valve.json new file mode 100644 index 0000000..83d92f0 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/blockstates/straight_pipe_valve.json @@ -0,0 +1,10 @@ +{ + "forge_marker": 1, + "defaults": { "model": "engineersdecor:pipe/straight_pipe_valve_model" }, + "variants": { + "normal": [{}], + "inventory": [{}], + "facing": { "north":{"y":0}, "south":{"y":180}, "west":{"y":270}, "east":{"y":90}, "up": {"x":-90}, "down": {"x":90} }, + "rsdir": { "0":{},"1":{},"2":{},"3":{},"4":{} } + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/blockstates/straight_pipe_valve_redstone.json b/1.12/src/main/resources/assets/engineersdecor/blockstates/straight_pipe_valve_redstone.json new file mode 100644 index 0000000..1ff17b3 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/blockstates/straight_pipe_valve_redstone.json @@ -0,0 +1,19 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "engineersdecor:pipe/straight_pipe_valve_model", + "textures": { "side" : "engineersdecor:blocks/pipe/straight_pipe_valve_side_redstone_texture" } + }, + "variants": { + "normal": [{}], + "inventory": [{}], + "facing": { "north":{"y":0}, "south":{"y":180}, "west":{"y":270}, "east":{"y":90}, "up": {"x":-90}, "down": {"x":90} }, + "rsdir": { + "0":{}, + "1":{ "submodel": {"rsdiru": { "model": "engineersdecor:pipe/straight_pipe_valve_rs_connector_submodel", "x": -90 }} }, + "2":{ "submodel": {"rsdirr": { "model": "engineersdecor:pipe/straight_pipe_valve_rs_connector_submodel", "y": 90 }} }, + "3":{ "submodel": {"rsdird": { "model": "engineersdecor:pipe/straight_pipe_valve_rs_connector_submodel", "x": 90 }} }, + "4":{ "submodel": {"rsdirl": { "model": "engineersdecor:pipe/straight_pipe_valve_rs_connector_submodel", "y": -90 }} } + } + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/blockstates/straight_pipe_valve_redstone_analog.json b/1.12/src/main/resources/assets/engineersdecor/blockstates/straight_pipe_valve_redstone_analog.json new file mode 100644 index 0000000..21f4069 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/blockstates/straight_pipe_valve_redstone_analog.json @@ -0,0 +1,19 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "engineersdecor:pipe/straight_pipe_valve_model", + "textures": { "side" : "engineersdecor:blocks/pipe/straight_pipe_valve_side_redstone_analog_texture" } + }, + "variants": { + "normal": [{}], + "inventory": [{}], + "facing": { "north":{"y":0}, "south":{"y":180}, "west":{"y":270}, "east":{"y":90}, "up": {"x":-90}, "down": {"x":90} }, + "rsdir": { + "0":{}, + "1":{ "submodel": {"rsdiru": { "model": "engineersdecor:pipe/straight_pipe_valve_rs_connector_submodel", "x": -90 }} }, + "2":{ "submodel": {"rsdirr": { "model": "engineersdecor:pipe/straight_pipe_valve_rs_connector_submodel", "y": 90 }} }, + "3":{ "submodel": {"rsdird": { "model": "engineersdecor:pipe/straight_pipe_valve_rs_connector_submodel", "x": 90 }} }, + "4":{ "submodel": {"rsdirl": { "model": "engineersdecor:pipe/straight_pipe_valve_rs_connector_submodel", "y": -90 }} } + } + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/blockstates/thick_steel_pole.json b/1.12/src/main/resources/assets/engineersdecor/blockstates/thick_steel_pole.json new file mode 100644 index 0000000..a000062 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/blockstates/thick_steel_pole.json @@ -0,0 +1,17 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "engineersdecor:pole/straight_thick_metal_pole_model", + "x":-90, + "textures": { + "particle": "engineersdecor:blocks/pole/thick_steel_pole_side_texture", + "side": "engineersdecor:blocks/pole/thick_steel_pole_side_texture", + "top": "engineersdecor:blocks/pole/thick_steel_pole_top_texture" + } + }, + "variants": { + "normal": [{}], + "facing": { "north": {"y":0}, "south": {"y":0}, "west": {"y":90}, "east": {"y":90}, "up": {"x":90}, "down": {"x":90} }, + "inventory": [{}] + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/blockstates/thick_steel_pole_head.json b/1.12/src/main/resources/assets/engineersdecor/blockstates/thick_steel_pole_head.json new file mode 100644 index 0000000..3391774 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/blockstates/thick_steel_pole_head.json @@ -0,0 +1,17 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "engineersdecor:pole/straight_thick_metal_pole_head_model", + "x":-90, + "textures": { + "particle": "engineersdecor:blocks/pole/thick_steel_pole_side_texture", + "side": "engineersdecor:blocks/pole/thick_steel_pole_side_texture", + "top": "engineersdecor:blocks/pole/thick_steel_pole_top_texture" + } + }, + "variants": { + "normal": [{}], + "facing": { "north":{"y":0}, "south":{"y":180}, "west":{"y":270}, "east":{"y":90}, "up": {"x":-90}, "down": {"x":90} }, + "inventory": [{}] + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/blockstates/thin_steel_pole.json b/1.12/src/main/resources/assets/engineersdecor/blockstates/thin_steel_pole.json new file mode 100644 index 0000000..66b63ad --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/blockstates/thin_steel_pole.json @@ -0,0 +1,17 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "engineersdecor:pole/straight_thin_metal_pole_model", + "x":-90, + "textures": { + "particle": "engineersdecor:blocks/pole/thin_steel_pole_side_texture", + "side": "engineersdecor:blocks/pole/thin_steel_pole_side_texture", + "top": "engineersdecor:blocks/pole/thin_steel_pole_top_texture" + } + }, + "variants": { + "normal": [{}], + "facing": { "north": {"y":0}, "south": {"y":0}, "west": {"y":90}, "east": {"y":90}, "up": {"x":90}, "down": {"x":90} }, + "inventory": [{}] + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/blockstates/thin_steel_pole_head.json b/1.12/src/main/resources/assets/engineersdecor/blockstates/thin_steel_pole_head.json new file mode 100644 index 0000000..8f6bfae --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/blockstates/thin_steel_pole_head.json @@ -0,0 +1,17 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "engineersdecor:pole/straight_thin_metal_pole_head_model", + "x":-90, + "textures": { + "particle": "engineersdecor:blocks/pole/thin_steel_pole_side_texture", + "side": "engineersdecor:blocks/pole/thin_steel_pole_side_texture", + "top": "engineersdecor:blocks/pole/thin_steel_pole_top_texture" + } + }, + "variants": { + "normal": [{}], + "facing": { "north":{"y":0}, "south":{"y":180}, "west":{"y":270}, "east":{"y":90}, "up": {"x":-90}, "down": {"x":90} }, + "inventory": [{}] + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/blockstates/treated_wood_window.json b/1.12/src/main/resources/assets/engineersdecor/blockstates/treated_wood_window.json index 9be1120..65d2ea8 100644 --- a/1.12/src/main/resources/assets/engineersdecor/blockstates/treated_wood_window.json +++ b/1.12/src/main/resources/assets/engineersdecor/blockstates/treated_wood_window.json @@ -5,7 +5,7 @@ "transform": "forge:default-block", "custom": { "base": "engineersdecor:treated_wood_window#frame", - "Cutout": "engineersdecor:treated_wood_window#frame", + "Mipped Cutout": "engineersdecor:treated_wood_window#frame", "Translucent": "engineersdecor:treated_wood_window#pane" } }, diff --git a/1.12/src/main/resources/assets/engineersdecor/lang/en_us.lang b/1.12/src/main/resources/assets/engineersdecor/lang/en_us.lang index 3da8f77..338ff77 100644 --- a/1.12/src/main/resources/assets/engineersdecor/lang/en_us.lang +++ b/1.12/src/main/resources/assets/engineersdecor/lang/en_us.lang @@ -12,13 +12,13 @@ engineersdecor.tooltip.hint.help=§6[§9CTRL-SHIFT§r Help§6]§r #----------------------------------------------------------------------------------------------------------- # Stone/"ceramic material" based blocks #----------------------------------------------------------------------------------------------------------- -tile.engineersdecor.clinker_brick_block.name=Clinker brick +tile.engineersdecor.clinker_brick_block.name=Clinker brick block tile.engineersdecor.clinker_brick_block.help=§6A brick block with position dependent texture variations.§r\nLooks slightly darker and more color intensive than the vanilla brick block. -tile.engineersdecor.slag_brick_block.name=Slag brick +tile.engineersdecor.slag_brick_block.name=Slag brick block tile.engineersdecor.slag_brick_block.help=§6A gray-brown brick block with position dependent texture variations. -tile.engineersdecor.rebar_concrete.name=Rebar concrete +tile.engineersdecor.rebar_concrete.name=Rebar concrete block tile.engineersdecor.rebar_concrete.help=§6Steel reinforced concrete block.§r Expensive but Creeper-proof like obsidian. -tile.engineersdecor.panzerglass_block.name=Panzer glass +tile.engineersdecor.panzerglass_block.name=Panzer glass block tile.engineersdecor.panzerglass_block.help=§6Reinforced glass block.§r Expensive, explosion-proof. Dark gray tint, faint structural lines visible, multi texture for seemless look. tile.engineersdecor.rebar_concrete_tile.name=Rebar concrete tile tile.engineersdecor.rebar_concrete_tile.help=§6Steel reinforced concrete tile.§r Expensive but Creeper-proof like obsidian. @@ -49,20 +49,33 @@ tile.engineersdecor.rebar_concrete_tile_stairs.name=Rebar concrete tile stairs tile.engineersdecor.rebar_concrete_tile_stairs.help=§6Steel reinforced concrete tile stairs.§r Expensive but Creeper-proof like obsidian. #----------------------------------------------------------------------------------------------------------- tile.engineersdecor.treated_wood_pole.name=Straight treated wood pole -tile.engineersdecor.treated_wood_pole.help=§6Straight pole fragment with the diameter of a wire relay.§r\n\ +tile.engineersdecor.treated_wood_pole.help=§6Straight pole fragment with a diameter of a wire relay.§r\n\ Can be useful as alternative to the wire posts if special special lengths are needed, \ or as support for structures. tile.engineersdecor.treated_wood_pole_head.name=Straight treated wood pole head/foot tile.engineersdecor.treated_wood_pole_head.help=§6Wooden part fitting as foot or head of straight poles. tile.engineersdecor.treated_wood_pole_support.name=Straight treated wood pole support tile.engineersdecor.treated_wood_pole_support.help=§6Heavy duty wooden support part fitting as foot or head of straight poles. +tile.engineersdecor.thick_steel_pole.name=Straight thick steel pole +tile.engineersdecor.thick_steel_pole.help=§6Straight hollow pole fragment (6x6x16) for structural support purposes. +tile.engineersdecor.thin_steel_pole.name=Straight thin steel pole +tile.engineersdecor.thin_steel_pole.help=§6Straight hollow pole fragment (4x4x16) for structural support purposes. +tile.engineersdecor.thin_steel_pole_head.name=Straight thin steel pole head/foot +tile.engineersdecor.thin_steel_pole_head.help=§6Steel part fitting as foot or head of the thin steel pole (4x4x16). +tile.engineersdecor.thick_steel_pole_head.name=Straight thick steel pole head/foot +tile.engineersdecor.thick_steel_pole_head.help=§6Steel part fitting as foot or head of the thick steel pole (6x6x16). +tile.engineersdecor.steel_double_t_support.name=Steel double T support +tile.engineersdecor.steel_double_t_support.help=§6Horizontal ceiling support bream fragment. #----------------------------------------------------------------------------------------------------------- tile.engineersdecor.treated_wood_table.name=Treated wood table tile.engineersdecor.treated_wood_table.help=§6Robust four-legged wood table.§r Indoor and outdoor use. tile.engineersdecor.treated_wood_stool.name=Treated wood stool tile.engineersdecor.treated_wood_stool.help=§6Robust wood stool.§r Indoor and outdoor use. tile.engineersdecor.treated_wood_crafting_table.name=Treated wood crafting table -tile.engineersdecor.treated_wood_crafting_table.help=§6Robust and weather-proof. Eight storage slots. Keeps inventory. +tile.engineersdecor.treated_wood_crafting_table.help=§6Robust and weather-proof.§r Eight storage slots, keeps inventory, no vanilla recipe book.\n\ + Click up/down arrow buttons for crafting history selection, output slot for item placement, X-button \ + to clear crafting grid and history. Shift-click stack: player-to-storage stack transfer when crafting \ + grid empty, otherwise player-to-grid stack transfer. Automatically distributes the clicked stack. tile.engineersdecor.iron_inset_light.name=Inset light tile.engineersdecor.iron_inset_light.help=§6Small glowstone light source, sunk into the floor, ceiling or wall.§r\n\ Useful to light up places where electrical light installations are problematic.\ @@ -80,8 +93,30 @@ tile.engineersdecor.small_lab_furnace.help=§6Small metal cased lab kiln.§r Sol Two auxiliary slots e.g. for storage. Two stack internal hopper fifos for input, output, \ and fuel. Place an external heater into a aux slot and connect power for electrical \ smelting speed boost. +tile.engineersdecor.small_electrical_furnace.name=Small electrical furnace +tile.engineersdecor.small_electrical_furnace.help=§6Small metal cased pass-through furnace.§r \ + Automatically draws items from the input side and puts items into the inventory at the output side. \ + Items can be inserted or drawn from all sides using hoppers. Implicitly bypasses items that cannot be \ + smelted or cooked to the output. Slightly more energy efficient and faster than a heated cobblestone \ + furnace. Fifos and feeders transfer whole stacks. Feeders require a bit of power. #----------------------------------------------------------------------------------------------------------- -tile.engineersdecor.sign_decor.name=Sign plate (Engineer's decor logo) +tile.engineersdecor.straight_pipe_valve.name=Fluid pipe check valve +tile.engineersdecor.straight_pipe_valve.help=§6Straight fluid pipe fragment.§r Conducts fluids only in one direction. \ + Does not connect to the sides. Reduces flow rate. Sneak to place in reverse direction. +tile.engineersdecor.straight_pipe_valve_redstone.name=Redstone controlled fluid valve +tile.engineersdecor.straight_pipe_valve_redstone.help=§6Straight fluid pipe fragment.§r Conducts fluids only in one direction. \ + Does not connect to the sides. Sneak to place in reverse direction. \ + Blocks if not redstone powered. +tile.engineersdecor.straight_pipe_valve_redstone_analog.name=Redstone analog fluid valve +tile.engineersdecor.straight_pipe_valve_redstone_analog.help=§6Straight fluid pipe fragment.§r Conducts fluids only in one direction. \ + Does not connect to the sides. Sneak to place in reverse direction. \ + Blocks if not redstone powered, reduces the flow rate linear from power 1 to 14, \ + opens to maximum possible valve flow rate for power 15. +tile.engineersdecor.passive_fluid_accumulator.name=Passive fluid accumulator +tile.engineersdecor.passive_fluid_accumulator.help=§6Vacuum suction based fluid collector.§r Has one output, all other sides are input. \ + Drains fluids from adjacent tanks when being drained from the output port by a pump. +#----------------------------------------------------------------------------------------------------------- +tile.engineersdecor.sign_decor.name=Sign plate (Engineer's decor) tile.engineersdecor.sign_decor.help=§6This should not be craftable or visible in JEI. Used for creative tab and screenshots. #----------------------------------------------------------------------------------------------------------- # EOF diff --git a/1.12/src/main/resources/assets/engineersdecor/lang/ru_ru.lang b/1.12/src/main/resources/assets/engineersdecor/lang/ru_ru.lang index 5b301b2..78142f3 100644 --- a/1.12/src/main/resources/assets/engineersdecor/lang/ru_ru.lang +++ b/1.12/src/main/resources/assets/engineersdecor/lang/ru_ru.lang @@ -56,6 +56,16 @@ tile.engineersdecor.treated_wood_pole_head.name=Прямой обработан #tile.engineersdecor.treated_wood_pole_head.help=§6Wooden part fitting as foot or head of straight poles. tile.engineersdecor.treated_wood_pole_support.name=Прямой обработанный деревянный столб #tile.engineersdecor.treated_wood_pole_support.help=§6Heavy duty wooden support part fitting as foot or head of straight poles. +tile.engineersdecor.thick_steel_pole.name=Straight thick steel pole +#tile.engineersdecor.thick_steel_pole.help=§6Straight hollow pole fragment (6x6x16) for structural support purposes. +tile.engineersdecor.thin_steel_pole.name=Straight thin steel pole +#tile.engineersdecor.thin_steel_pole.help=§6Straight hollow pole fragment (4x4x16) for structural support purposes. +tile.engineersdecor.thin_steel_pole_head.name=Straight thin steel pole head/foot +#tile.engineersdecor.thin_steel_pole_head.help=§6Steel part fitting as foot or head of the thin steel pole (4x4x16). +tile.engineersdecor.thick_steel_pole_head.name=Straight thick steel pole head/foot +#tile.engineersdecor.thick_steel_pole_head.help=§6Steel part fitting as foot or head of the thick steel pole (6x6x16). +tile.engineersdecor.steel_double_t_support.name=Steel double T support +#tile.engineersdecor.steel_double_t_support.help=§6Horizontal ceiling support bream fragment. #----------------------------------------------------------------------------------------------------------- tile.engineersdecor.treated_wood_table.name=Стол из обработанного дерева tile.engineersdecor.treated_wood_table.help=§6Прочный деревянный стол с четырьмя ножками .§r Для использования в помещении и на улице. @@ -76,6 +86,28 @@ tile.engineersdecor.steel_framed_window.name=Окно со стальной ра #----------------------------------------------------------------------------------------------------------- tile.engineersdecor.small_lab_furnace.name=Компактная лабораторная печь tile.engineersdecor.small_lab_furnace.help=§6Лабораторная печь в металлическом корпусе.§r Подача твёрдого топлива - сверху. Немного горячее чем каменная, поэтому быстрее. Два внутренних слота для ввода, выхода и топлива. +tile.engineersdecor.small_electrical_furnace.name=Small electrical furnace +#tile.engineersdecor.small_electrical_furnace.help=§6Small metal cased pass-through furnace.§r \ + Automatically draws items from the input side and puts items into the inventory at the output side. \ + Items can be inserted or drawn from all sides using hoppers. Implicitly bypasses items that cannot be \ + smelted or cooked to the output. Slightly more energy efficient and faster than a heated cobblestone \ + furnace. Fifos and feeders transfer whole stacks. Feeders require a bit of power. +#----------------------------------------------------------------------------------------------------------- +tile.engineersdecor.straight_pipe_valve.name=Straight fluid valve +#tile.engineersdecor.straight_pipe_valve.help=§6Straight fluid pipe fragment.§r Conducts fluids only in one direction. \ + Does not connect to the sides. Reduces flow rate. Sneak to place in reverse direction. +tile.engineersdecor.straight_pipe_valve_redstone.name=Redstone controlled fluid valve +#tile.engineersdecor.straight_pipe_valve_redstone.help=§6Straight fluid pipe fragment.§r Conducts fluids only in one direction. \ + Does not connect to the sides. Sneak to place in reverse direction. \ + Blocks if not redstone powered. +tile.engineersdecor.straight_pipe_valve_redstone_analog.name=Redstone analog fluid valve +#tile.engineersdecor.straight_pipe_valve_redstone_analog.help=§6Straight fluid pipe fragment.§r Conducts fluids only in one direction. \ + Does not connect to the sides. Sneak to place in reverse direction. \ + Blocks if not redstone powered, reduces the flow rate linear from power 1 to 14, \ + opens to maximum possible valve flow rate for power 15. +tile.engineersdecor.passive_fluid_accumulator.name=Passive fluid accumulator +#tile.engineersdecor.passive_fluid_accumulator.help=§6Vacuum suction based fluid collector.§r Has one output, all other sides are input. \ + Drains fluids from adjacent tanks when being drained from the output port by a pump. #----------------------------------------------------------------------------------------------------------- tile.engineersdecor.sign_decor.name=Sign plate (Engineer's decor logo) #tile.engineersdecor.sign_decor.help=§6This should not be craftable or visible in JEI. Used for creative tab and screenshots. diff --git a/1.12/src/main/resources/assets/engineersdecor/models/block/decor_full_block_model.json b/1.12/src/main/resources/assets/engineersdecor/models/block/decor_full_block_model.json deleted file mode 100644 index f7aee27..0000000 --- a/1.12/src/main/resources/assets/engineersdecor/models/block/decor_full_block_model.json +++ /dev/null @@ -1 +0,0 @@ -{ "parent": "block/cube_all", "textures": { "all": "engineersdecor:blocks/clinker_brick/clinker_brick_texture0" } } \ No newline at end of file diff --git a/1.12/src/main/resources/assets/engineersdecor/models/block/furnace/small_electrical_furnace_model.json b/1.12/src/main/resources/assets/engineersdecor/models/block/furnace/small_electrical_furnace_model.json new file mode 100644 index 0000000..f28842c --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/models/block/furnace/small_electrical_furnace_model.json @@ -0,0 +1,106 @@ +{ + "parent": "block/cube", + "textures": { + "top": "engineersdecor:blocks/furnace/small_electrical_furnace_top", + "particle": "engineersdecor:blocks/furnace/small_electrical_furnace_top", + "bottom": "engineersdecor:blocks/furnace/small_electrical_furnace_bottom", + "left": "engineersdecor:blocks/furnace/small_electrical_furnace_left", + "right": "engineersdecor:blocks/furnace/small_electrical_furnace_right", + "front": "engineersdecor:blocks/furnace/small_electrical_furnace_front", + "back": "engineersdecor:blocks/furnace/small_electrical_furnace_back" + }, + "elements": [ + { + "from": [12.75, 11.5, 1], + "to": [13.75, 17, 15], + "rotation": {"angle": 45, "axis": "z", "origin": [15.5, 13.5, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 5.5], "texture": "#front"}, + "east": {"uv": [0, 1, 5, 15], "rotation": 90, "texture": "#top"}, + "south": {"uv": [0, 0, 1, 5.5], "texture": "#back"} + } + }, + { + "from": [2.25, 11.5, 1], + "to": [3.25, 17, 15], + "rotation": {"angle": -45, "axis": "z", "origin": [0.5, 13.5, 8]}, + "faces": { + "north": {"uv": [0, 0, 1, 5.5], "texture": "#front"}, + "south": {"uv": [0, 0, 1, 5.5], "texture": "#back"}, + "west": {"uv": [0, 1, 5, 15], "rotation": 270, "texture": "#top"} + } + }, + { + "from": [4, 14, 0], + "to": [12, 16, 16], + "faces": { + "north": {"uv": [4, 0, 12, 2], "texture": "#front"}, + "east": {"uv": [0, 0, 16, 2], "texture": "#left"}, + "south": {"uv": [4, 0, 12, 2], "texture": "#back"}, + "west": {"uv": [0, 0, 16, 2], "texture": "#right"}, + "up": {"uv": [4, 0, 12, 16], "texture": "#top"}, + "down": {"uv": [4, 0, 12, 16], "texture": "#bottom"} + } + }, + { + "from": [2, 12, 0], + "to": [14, 13, 16], + "faces": { + "north": {"uv": [2, 3, 14, 4], "texture": "#front"}, + "east": {"uv": [0, 3, 16, 4], "texture": "#left"}, + "south": {"uv": [2, 3, 14, 4], "texture": "#back"}, + "west": {"uv": [0, 3, 16, 4], "texture": "#right"}, + "up": {"uv": [2, 0, 14, 16], "texture": "#top"}, + "down": {"uv": [2, 0, 14, 16], "texture": "#bottom"} + } + }, + { + "from": [1, 11, 0], + "to": [15, 12, 16], + "faces": { + "north": {"uv": [1, 4, 15, 5], "texture": "#front"}, + "east": {"uv": [0, 4, 16, 5], "texture": "#left"}, + "south": {"uv": [1, 4, 15, 5], "texture": "#back"}, + "west": {"uv": [0, 4, 16, 5], "texture": "#right"}, + "up": {"uv": [1, 0, 15, 16], "texture": "#top"}, + "down": {"uv": [1, 0, 15, 16], "texture": "#bottom"} + } + }, + { + "from": [3, 13, 0], + "to": [13, 14, 16], + "faces": { + "north": {"uv": [3, 2, 13, 3], "texture": "#front"}, + "east": {"uv": [0, 2, 16, 3], "texture": "#left"}, + "south": {"uv": [3, 2, 13, 3], "texture": "#back"}, + "west": {"uv": [0, 2, 16, 3], "texture": "#right"}, + "up": {"uv": [3, 0, 13, 16], "texture": "#top"}, + "down": {"uv": [3, 0, 13, 16], "texture": "#bottom"} + } + }, + { + "from": [0, 0, 0], + "to": [16, 11, 16], + "faces": { + "north": {"uv": [0, 5, 16, 16], "texture": "#front"}, + "east": {"uv": [0, 5, 16, 16], "texture": "#right"}, + "south": {"uv": [0, 5, 16, 16], "texture": "#back"}, + "west": {"uv": [0, 5, 16, 16], "texture": "#left"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#top"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#bottom"} + } + } + ], + "display": { + "ground": { + "scale": [0.2, 0.2, 0.2] + }, + "gui": { + "rotation": [30, 225, 0], + "scale": [0.625, 0.625, 0.625] + }, + "fixed": { + "scale": [0.5, 0.5, 0.5] + } + } +} \ No newline at end of file diff --git a/1.12/src/main/resources/assets/engineersdecor/models/block/furniture/steel_framed_window_submodel.json b/1.12/src/main/resources/assets/engineersdecor/models/block/furniture/steel_framed_window_submodel.json index 96a9cc4..1f22774 100644 --- a/1.12/src/main/resources/assets/engineersdecor/models/block/furniture/steel_framed_window_submodel.json +++ b/1.12/src/main/resources/assets/engineersdecor/models/block/furniture/steel_framed_window_submodel.json @@ -1,6 +1,5 @@ { "parent": "block/cube", - "ambientocclusion": false, "textures": { "frame": "engineersdecor:blocks/iestyle/steel_texture", "particle": "engineersdecor:blocks/iestyle/steel_texture" diff --git a/1.12/src/main/resources/assets/engineersdecor/models/block/furniture/treated_wood_window_submodel.json b/1.12/src/main/resources/assets/engineersdecor/models/block/furniture/treated_wood_window_submodel.json index e591e0e..6efae70 100644 --- a/1.12/src/main/resources/assets/engineersdecor/models/block/furniture/treated_wood_window_submodel.json +++ b/1.12/src/main/resources/assets/engineersdecor/models/block/furniture/treated_wood_window_submodel.json @@ -1,6 +1,5 @@ { "parent": "block/cube", - "ambientocclusion": false, "textures": { "frame": "engineersdecor:blocks/iestyle/treated_wood_rough_texture", "particle": "engineersdecor:blocks/iestyle/treated_wood_rough_texture" diff --git a/1.12/src/main/resources/assets/engineersdecor/models/block/hsupport/steel_double_t_support_model.json b/1.12/src/main/resources/assets/engineersdecor/models/block/hsupport/steel_double_t_support_model.json new file mode 100644 index 0000000..02308cb --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/models/block/hsupport/steel_double_t_support_model.json @@ -0,0 +1,77 @@ +{ + "parent": "block/cube", + "textures": { + "end": "engineersdecor:blocks/hsupport/steel_double_t_support_end_texture", + "particle": "engineersdecor:blocks/hsupport/steel_double_t_support_end_texture", + "side": "engineersdecor:blocks/hsupport/steel_double_t_support_side_texture", + "top": "engineersdecor:blocks/hsupport/steel_double_t_support_top_texture" + }, + "elements": [ + { + "from": [5, 15, 0], + "to": [11, 16, 16], + "faces": { + "north": {"uv": [5, 0, 11, 1], "texture": "#end"}, + "east": {"uv": [0, 0, 16, 1], "texture": "#side"}, + "south": {"uv": [5, 0, 11, 1], "texture": "#end"}, + "west": {"uv": [0, 0, 16, 1], "texture": "#side"}, + "up": {"uv": [5, 0, 11, 16], "texture": "#top"}, + "down": {"uv": [5, 0, 11, 16], "texture": "#top"} + } + }, + { + "from": [9, 12, 0], + "to": [10, 15, 16], + "faces": { + "north": {"uv": [6, 1, 7, 4], "texture": "#end"}, + "east": {"uv": [0, 1, 16, 4], "texture": "#side"}, + "south": {"uv": [9, 1, 10, 4], "texture": "#end"}, + "west": {"uv": [0, 1, 16, 4], "texture": "#side"} + } + }, + { + "from": [6, 12, 0], + "to": [7, 15, 16], + "faces": { + "north": {"uv": [9, 1, 10, 4], "texture": "#end"}, + "east": {"uv": [0, 1, 16, 4], "texture": "#side"}, + "south": {"uv": [6, 1, 7, 4], "texture": "#end"}, + "west": {"uv": [0, 1, 16, 4], "texture": "#side"} + } + }, + { + "from": [5, 11, 0], + "to": [11, 12, 16], + "faces": { + "north": {"uv": [5, 4, 11, 5], "texture": "#end"}, + "east": {"uv": [0, 4, 16, 5], "texture": "#side"}, + "south": {"uv": [5, 4, 11, 5], "texture": "#end"}, + "west": {"uv": [0, 4, 16, 5], "texture": "#side"}, + "up": {"uv": [5, 0, 11, 16], "texture": "#top"}, + "down": {"uv": [5, 0, 11, 16], "texture": "#top"} + } + } + ], + "display": { + "ground": { + "scale": [0.2, 0.2, 0.2] + }, + "gui": { + "rotation": [30, 225, 0], + "scale": [0.625, 0.625, 0.625] + }, + "fixed": { + "scale": [0.5, 0.5, 0.5] + }, + "firstperson_righthand": { + "scale": [0.5, 0.5, 0.5], + "rotation": [120, 30, 0], + "translation": [2, 3, 0] + }, + "thirdperson_righthand": { + "scale": [0.5, 0.5, 0.5], + "rotation": [120, 15, 0], + "translation": [-1, -1, -2] + } + } +} \ No newline at end of file diff --git a/1.12/src/main/resources/assets/engineersdecor/models/block/hsupport/steel_double_t_support_xconnect_model.json b/1.12/src/main/resources/assets/engineersdecor/models/block/hsupport/steel_double_t_support_xconnect_model.json new file mode 100644 index 0000000..2aed74d --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/models/block/hsupport/steel_double_t_support_xconnect_model.json @@ -0,0 +1,63 @@ +{ + "parent": "block/cube", + "textures": { + "end": "engineersdecor:blocks/hsupport/steel_double_t_support_end_texture", + "particle": "engineersdecor:blocks/hsupport/steel_double_t_support_end_texture", + "side": "engineersdecor:blocks/hsupport/steel_double_t_support_side_texture", + "top": "engineersdecor:blocks/hsupport/steel_double_t_support_top_texture" + }, + "elements": [ + { + "from": [11, 15, 5], + "to": [16, 16, 11], + "faces": { + "north": {"uv": [0, 0, 5, 1], "texture": "#side"}, + "east": {"uv": [5, 0, 11, 1], "texture": "#end"}, + "south": {"uv": [11, 0, 16, 1], "texture": "#side"}, + "up": {"uv": [5, 10, 11, 16], "rotation": 270, "texture": "#top"}, + "down": {"uv": [11, 5, 16, 11], "rotation": 90, "texture": "#top"} + } + }, + { + "from": [11, 11, 5], + "to": [16, 12, 11], + "faces": { + "north": {"uv": [0, 4, 5, 5], "texture": "#side"}, + "east": {"uv": [5, 4, 11, 5], "texture": "#end"}, + "south": {"uv": [11, 4, 16, 5], "texture": "#side"}, + "up": {"uv": [11, 5, 16, 11], "rotation": 270, "texture": "#top"}, + "down": {"uv": [5, 10, 11, 16], "rotation": 90, "texture": "#top"} + } + }, + { + "from": [10, 12, 9], + "to": [16, 15, 10], + "faces": { + "north": {"uv": [0, 1, 6, 4], "texture": "#side"}, + "east": {"uv": [6, 1, 7, 4], "texture": "#end"}, + "south": {"uv": [10, 1, 16, 4], "texture": "#side"} + } + }, + { + "from": [10, 12, 6], + "to": [16, 15, 7], + "faces": { + "north": {"uv": [0, 1, 6, 4], "texture": "#side"}, + "east": {"uv": [9, 1, 10, 4], "texture": "#end"}, + "south": {"uv": [10, 1, 16, 4], "texture": "#side"} + } + } + ], + "display": { + "ground": { + "scale": [0.2, 0.2, 0.2] + }, + "gui": { + "rotation": [30, 225, 0], + "scale": [0.625, 0.625, 0.625] + }, + "fixed": { + "scale": [0.5, 0.5, 0.5] + } + } +} \ No newline at end of file diff --git a/1.12/src/main/resources/assets/engineersdecor/models/block/hsupport/steel_double_t_support_xconnect_thick_pole_model.json b/1.12/src/main/resources/assets/engineersdecor/models/block/hsupport/steel_double_t_support_xconnect_thick_pole_model.json new file mode 100644 index 0000000..668f4d3 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/models/block/hsupport/steel_double_t_support_xconnect_thick_pole_model.json @@ -0,0 +1,62 @@ +{ + "parent": "block/cube", + "textures": { + "pside": "engineersdecor:blocks/pole/thick_steel_pole_side_texture", + "particle": "engineersdecor:blocks/pole/thick_steel_pole_side_texture", + "ptop": "engineersdecor:blocks/pole/thick_steel_pole_top_texture" + }, + "elements": [ + { + "from": [6, 0, 10], + "to": [10, 11, 11], + "faces": { + "north": {"uv": [6, 5, 10, 16], "texture": "#pside"}, + "south": {"uv": [6, 5, 10, 16], "texture": "#pside"}, + "down": {"uv": [6, 5, 10, 6], "texture": "#ptop"} + } + }, + { + "from": [10, 0, 5], + "to": [11, 11, 11], + "faces": { + "north": {"uv": [5, 5, 6, 16], "texture": "#pside"}, + "east": {"uv": [5, 5, 11, 16], "texture": "#pside"}, + "south": {"uv": [10, 5, 11, 16], "texture": "#pside"}, + "west": {"uv": [5, 5, 11, 16], "texture": "#pside"}, + "down": {"uv": [10, 5, 11, 11], "texture": "#ptop"} + } + }, + { + "from": [5, 0, 5], + "to": [6, 11, 11], + "faces": { + "north": {"uv": [10, 5, 11, 16], "texture": "#pside"}, + "east": {"uv": [5, 5, 11, 16], "texture": "#pside"}, + "south": {"uv": [5, 5, 6, 16], "texture": "#pside"}, + "west": {"uv": [5, 5, 11, 16], "texture": "#pside"}, + "down": {"uv": [5, 5, 6, 11], "texture": "#ptop"} + } + }, + { + "from": [6, 0, 5], + "to": [10, 11, 6], + "faces": { + "north": {"uv": [6, 5, 10, 16], "texture": "#pside"}, + "south": {"uv": [6, 5, 10, 16], "texture": "#pside"}, + "down": {"uv": [6, 10, 10, 11], "texture": "#ptop"} + } + } + ], + "display": { + "ground": { + "scale": [0.2, 0.2, 0.2] + }, + "gui": { + "rotation": [30, 225, 0], + "scale": [0.625, 0.625, 0.625] + }, + "fixed": { + "scale": [0.5, 0.5, 0.5] + } + } +} \ No newline at end of file diff --git a/1.12/src/main/resources/assets/engineersdecor/models/block/hsupport/steel_double_t_support_xconnect_thin_pole_model.json b/1.12/src/main/resources/assets/engineersdecor/models/block/hsupport/steel_double_t_support_xconnect_thin_pole_model.json new file mode 100644 index 0000000..4c0bf1b --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/models/block/hsupport/steel_double_t_support_xconnect_thin_pole_model.json @@ -0,0 +1,62 @@ +{ + "parent": "block/cube", + "textures": { + "pside": "engineersdecor:blocks/pole/thin_steel_pole_side_texture", + "particle": "engineersdecor:blocks/pole/thin_steel_pole_side_texture", + "ptop": "engineersdecor:blocks/pole/thin_steel_pole_top_texture" + }, + "elements": [ + { + "from": [7, 0, 9], + "to": [9, 11, 10], + "faces": { + "north": {"uv": [7, 5, 9, 16], "texture": "#pside"}, + "south": {"uv": [7, 5, 9, 16], "texture": "#pside"}, + "down": {"uv": [7, 6, 9, 7], "texture": "#ptop"} + } + }, + { + "from": [9, 0, 6], + "to": [10, 11, 10], + "faces": { + "north": {"uv": [6, 5, 7, 16], "texture": "#pside"}, + "east": {"uv": [6, 5, 10, 16], "texture": "#pside"}, + "south": {"uv": [9, 5, 10, 16], "texture": "#pside"}, + "west": {"uv": [6, 5, 10, 16], "texture": "#pside"}, + "down": {"uv": [9, 6, 10, 10], "texture": "#ptop"} + } + }, + { + "from": [6, 0, 6], + "to": [7, 11, 10], + "faces": { + "north": {"uv": [9, 5, 10, 16], "texture": "#pside"}, + "east": {"uv": [6, 5, 10, 16], "texture": "#pside"}, + "south": {"uv": [6, 5, 7, 16], "texture": "#pside"}, + "west": {"uv": [6, 5, 10, 16], "texture": "#pside"}, + "down": {"uv": [6, 6, 7, 10], "texture": "#ptop"} + } + }, + { + "from": [7, 0, 6], + "to": [9, 11, 7], + "faces": { + "north": {"uv": [7, 5, 9, 16], "texture": "#pside"}, + "south": {"uv": [7, 5, 9, 16], "texture": "#pside"}, + "down": {"uv": [7, 9, 9, 10], "texture": "#ptop"} + } + } + ], + "display": { + "ground": { + "scale": [0.2, 0.2, 0.2] + }, + "gui": { + "rotation": [30, 225, 0], + "scale": [0.625, 0.625, 0.625] + }, + "fixed": { + "scale": [0.5, 0.5, 0.5] + } + } +} \ No newline at end of file diff --git a/1.12/src/main/resources/assets/engineersdecor/models/block/pipe/passive_fluid_accumulator_model.json b/1.12/src/main/resources/assets/engineersdecor/models/block/pipe/passive_fluid_accumulator_model.json new file mode 100644 index 0000000..b99b703 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/models/block/pipe/passive_fluid_accumulator_model.json @@ -0,0 +1,55 @@ +{ + "textures": { + "end": "engineersdecor:blocks/pipe/passive_fluid_accumulator_front_texture", + "particle": "engineersdecor:blocks/pipe/passive_fluid_accumulator_front_texture", + "side": "engineersdecor:blocks/pipe/passive_fluid_accumulator_side_texture", + "back": "engineersdecor:blocks/pipe/passive_fluid_accumulator_back_texture" + }, + "elements": [ + { + "from": [3, 3, 0], + "to": [13, 13, 1], + "faces": { + "north": {"uv": [3, 3, 13, 13], "texture": "#end"}, + "east": {"uv": [15, 4, 16, 16], "texture": "#side"}, + "west": {"uv": [0, 4, 1, 16], "texture": "#side"}, + "up": {"uv": [4, 0, 16, 1], "texture": "#side"}, + "down": {"uv": [0, 15, 12, 16], "texture": "#side"} + } + }, + { + "from": [0, 0, 1], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#end"}, + "east": {"uv": [0, 0, 15, 16], "texture": "#side"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#back"}, + "west": {"uv": [1, 0, 16, 16], "texture": "#side"}, + "up": {"uv": [0, 0, 16, 15], "texture": "#side"}, + "down": {"uv": [0, 0, 16, 15], "rotation": 180, "texture": "#side"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [120, 15, 0], + "translation": [-1, -1, -2], + "scale": [0.4, 0.4, 0.4] + }, + "firstperson_righthand": { + "rotation": [120, 30, 0], + "translation": [2, 3, 0], + "scale": [0.4, 0.4, 0.4] + }, + "ground": { + "scale": [0.2, 0.2, 0.2] + }, + "gui": { + "rotation": [30, 225, 0], + "scale": [0.625, 0.625, 0.625] + }, + "fixed": { + "scale": [0.5, 0.5, 0.5] + } + } +} \ No newline at end of file diff --git a/1.12/src/main/resources/assets/engineersdecor/models/block/pipe/straight_pipe_valve_model.json b/1.12/src/main/resources/assets/engineersdecor/models/block/pipe/straight_pipe_valve_model.json new file mode 100644 index 0000000..92e2061 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/models/block/pipe/straight_pipe_valve_model.json @@ -0,0 +1,87 @@ +{ + "textures": { + "end": "engineersdecor:blocks/pipe/straight_pipe_valve_end_texture", + "particle": "engineersdecor:blocks/pipe/straight_pipe_valve_end_texture", + "side": "engineersdecor:blocks/pipe/straight_pipe_valve_side_texture" + }, + "elements": [ + { + "from": [2, 2, 0], + "to": [14, 14, 2], + "faces": { + "north": {"uv": [2, 2, 14, 14], "texture": "#end"}, + "east": {"uv": [2, 0, 14, 2], "rotation": 90, "texture": "#side"}, + "south": {"uv": [2, 2, 14, 14], "texture": "#end"}, + "west": {"uv": [2, 0, 14, 2], "rotation": 270, "texture": "#side"}, + "up": {"uv": [2, 0, 14, 2], "texture": "#side"}, + "down": {"uv": [2, 14, 14, 16], "texture": "#side"} + } + }, + { + "from": [2, 2, 14], + "to": [14, 14, 16], + "faces": { + "north": {"uv": [2, 2, 14, 14], "texture": "#end"}, + "east": {"uv": [2, 14, 14, 16], "rotation": 90, "texture": "#side"}, + "south": {"uv": [2, 2, 14, 14], "texture": "#end"}, + "west": {"uv": [2, 0, 14, 2], "rotation": 90, "texture": "#side"}, + "up": {"uv": [2, 14, 14, 16], "texture": "#side"}, + "down": {"uv": [2, 0, 14, 2], "texture": "#side"} + } + }, + { + "from": [4, 4, 11], + "to": [12, 12, 14], + "faces": { + "east": {"uv": [4, 11, 12, 14], "rotation": 90, "texture": "#side"}, + "west": {"uv": [4, 11, 12, 14], "rotation": 270, "texture": "#side"}, + "up": {"uv": [4, 11, 12, 14], "texture": "#side"}, + "down": {"uv": [4, 11, 12, 14], "rotation": 180, "texture": "#side"} + } + }, + { + "from": [4, 4, 2], + "to": [12, 12, 5], + "faces": { + "east": {"uv": [4, 11, 12, 14], "rotation": 90, "texture": "#side"}, + "west": {"uv": [4, 11, 12, 14], "rotation": 270, "texture": "#side"}, + "up": {"uv": [4, 2, 12, 5], "texture": "#side"}, + "down": {"uv": [4, 2, 12, 5], "rotation": 180, "texture": "#side"} + } + }, + { + "from": [3, 3, 5], + "to": [13, 13, 11], + "faces": { + "north": {"uv": [4, 4, 12, 12], "texture": "#end"}, + "east": {"uv": [3, 5, 13, 11], "rotation": 90, "texture": "#side"}, + "south": {"uv": [4, 4, 12, 12], "texture": "#end"}, + "west": {"uv": [3, 5, 13, 11], "rotation": 270, "texture": "#side"}, + "up": {"uv": [3, 5, 13, 11], "texture": "#side"}, + "down": {"uv": [3, 5, 13, 11], "rotation": 180, "texture": "#side"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [120, 15, 0], + "translation": [-1, -1, -2], + "scale": [0.4, 0.4, 0.4] + }, + "firstperson_righthand": { + "rotation": [120, 30, 0], + "translation": [2, 3, 0], + "scale": [0.4, 0.4, 0.4] + }, + "ground": { + "scale": [0.2, 0.2, 0.2] + }, + "gui": { + "rotation": [30, 225, 0], + "scale": [0.625, 0.625, 0.625] + }, + "fixed": { + "scale": [0.5, 0.5, 0.5] + } + } +} \ No newline at end of file diff --git a/1.12/src/main/resources/assets/engineersdecor/models/block/pipe/straight_pipe_valve_rs_connector_submodel.json b/1.12/src/main/resources/assets/engineersdecor/models/block/pipe/straight_pipe_valve_rs_connector_submodel.json new file mode 100644 index 0000000..ca077a3 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/models/block/pipe/straight_pipe_valve_rs_connector_submodel.json @@ -0,0 +1,54 @@ +{ + "textures": { + "rsside": "engineersdecor:blocks/pipe/straight_pipe_valve_side_redstone_texture", + "particle": "engineersdecor:blocks/pipe/straight_pipe_valve_side_redstone_texture", + "rsend": "engineersdecor:blocks/pipe/straight_pipe_valve_side_redstone_cn_texture" + }, + "elements": [ + { + "from": [5, 5, 2], + "to": [11, 11, 3], + "faces": { + "north": {"uv": [5, 5, 11, 11], "rotation": 90, "texture": "#rsend"}, + "east": {"uv": [13, 5, 14, 11], "texture": "#rsside"}, + "west": {"uv": [13, 5, 14, 11], "rotation": 180, "texture": "#rsside"}, + "up": {"uv": [13, 5, 14, 11], "rotation": 270, "texture": "#rsside"}, + "down": {"uv": [13, 5, 14, 11], "rotation": 90, "texture": "#rsside"} + } + }, + { + "from": [4, 4, 0], + "to": [12, 12, 2], + "faces": { + "north": {"uv": [4, 4, 12, 12], "rotation": 90, "texture": "#rsend"}, + "east": {"uv": [13, 4, 16, 12], "texture": "#rsside"}, + "south": {"uv": [4, 4, 12, 12], "texture": "#rsend"}, + "west": {"uv": [13, 4, 16, 12], "rotation": 180, "texture": "#rsside"}, + "up": {"uv": [13, 4, 16, 12], "rotation": 270, "texture": "#rsside"}, + "down": {"uv": [13, 4, 16, 12], "rotation": 90, "texture": "#rsside"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [120, 15, 0], + "translation": [-1, -1, -2], + "scale": [0.4, 0.4, 0.4] + }, + "firstperson_righthand": { + "rotation": [120, 30, 0], + "translation": [2, 3, 0], + "scale": [0.4, 0.4, 0.4] + }, + "ground": { + "scale": [0.2, 0.2, 0.2] + }, + "gui": { + "rotation": [30, 225, 0], + "scale": [0.625, 0.625, 0.625] + }, + "fixed": { + "scale": [0.5, 0.5, 0.5] + } + } +} \ No newline at end of file diff --git a/1.12/src/main/resources/assets/engineersdecor/models/block/pole/straight_thick_metal_pole_head_model.json b/1.12/src/main/resources/assets/engineersdecor/models/block/pole/straight_thick_metal_pole_head_model.json new file mode 100644 index 0000000..aeccde5 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/models/block/pole/straight_thick_metal_pole_head_model.json @@ -0,0 +1,114 @@ +{ + "parent": "block/cube", + "textures": { + "side": "engineersdecor:blocks/pole/thick_steel_pole_side_texture", + "particle": "engineersdecor:blocks/pole/thick_steel_pole_side_texture", + "top": "engineersdecor:blocks/pole/thick_steel_pole_top_texture" + }, + "elements": [ + { + "from": [6, 10, 0], + "to": [10, 11, 14], + "faces": { + "north": {"uv": [6, 5, 10, 6], "texture": "#top"}, + "up": {"uv": [6, 0, 10, 16], "texture": "#side"}, + "down": {"uv": [6, 0, 10, 16], "texture": "#side"} + } + }, + { + "from": [10, 5, 0], + "to": [11, 11, 14], + "faces": { + "north": {"uv": [5, 5, 6, 11], "texture": "#top", "cullface": "north"}, + "east": {"uv": [5, 0, 11, 16], "rotation": 90, "texture": "#side"}, + "west": {"uv": [5, 0, 11, 16], "rotation": 90, "texture": "#side"}, + "up": {"uv": [10, 0, 11, 16], "texture": "#side"}, + "down": {"uv": [10, 0, 11, 16], "texture": "#side"} + } + }, + { + "from": [5, 5, 0], + "to": [6, 11, 14], + "faces": { + "north": {"uv": [10, 5, 11, 11], "texture": "#top", "cullface": "north"}, + "east": {"uv": [5, 0, 11, 16], "rotation": 90, "texture": "#side"}, + "west": {"uv": [5, 0, 11, 16], "rotation": 90, "texture": "#side"}, + "up": {"uv": [5, 0, 6, 16], "texture": "#side"}, + "down": {"uv": [5, 0, 6, 16], "texture": "#side"} + } + }, + { + "from": [6, 5, 0], + "to": [10, 6, 14], + "faces": { + "north": {"uv": [6, 10, 10, 11], "texture": "#top"}, + "up": {"uv": [6, 0, 10, 16], "texture": "#side"}, + "down": {"uv": [6, 0, 10, 16], "texture": "#side"} + } + }, + { + "from": [3, 3, 14], + "to": [13, 13, 16], + "faces": { + "north": {"uv": [4, 4, 12, 12], "texture": "#top", "cullface": "north"}, + "east": {"uv": [4, 5, 6, 13], "texture": "#side"}, + "south": {"uv": [3, 3, 13, 13], "texture": "#top", "cullface": "south"}, + "west": {"uv": [14, 4, 16, 12], "texture": "#side"}, + "up": {"uv": [12, 4, 14, 12], "rotation": 90, "texture": "#side"}, + "down": {"uv": [10, 1, 12, 10], "rotation": 90, "texture": "#side"} + } + }, + { + "from": [6, 11, 13], + "to": [10, 11.5, 15], + "rotation": {"angle": -45, "axis": "x", "origin": [8, 11.25, 14]}, + "faces": { + "east": {"uv": [2, 5.5, 4, 6], "texture": "#top"}, + "west": {"uv": [12, 5.5, 14, 6], "texture": "#top"}, + "up": {"uv": [6, 13, 10, 15], "texture": "#top"} + } + }, + { + "from": [6, 4.5, 13], + "to": [10, 5, 15], + "rotation": {"angle": 45, "axis": "x", "origin": [8, 4.75, 14]}, + "faces": { + "east": {"uv": [2, 5.5, 4, 6], "texture": "#top"}, + "west": {"uv": [12, 5.5, 14, 6], "texture": "#top"}, + "down": {"uv": [6, 1, 10, 3], "texture": "#top"} + } + }, + { + "from": [4.5, 6, 13], + "to": [5, 10, 15], + "rotation": {"angle": -45, "axis": "y", "origin": [4.75, 8, 14]}, + "faces": { + "west": {"uv": [6, 1, 10, 3], "rotation": 270, "texture": "#top"}, + "up": {"uv": [12, 5.5, 14, 6], "rotation": 90, "texture": "#top"}, + "down": {"uv": [2, 5.5, 4, 6], "rotation": 270, "texture": "#top"} + } + }, + { + "from": [11, 6, 13], + "to": [11.5, 10, 15], + "rotation": {"angle": 45, "axis": "y", "origin": [11.25, 8, 14]}, + "faces": { + "east": {"uv": [6, 13, 10, 15], "rotation": 270, "texture": "#top"}, + "up": {"uv": [12, 5.5, 14, 6], "rotation": 90, "texture": "#top"}, + "down": {"uv": [2, 5.5, 4, 6], "rotation": 270, "texture": "#top"} + } + } + ], + "display": { + "ground": { + "scale": [0.2, 0.2, 0.2] + }, + "gui": { + "rotation": [30, 225, 0], + "scale": [0.625, 0.625, 0.625] + }, + "fixed": { + "scale": [0.5, 0.5, 0.5] + } + } +} \ No newline at end of file diff --git a/1.12/src/main/resources/assets/engineersdecor/models/block/pole/straight_thick_metal_pole_model.json b/1.12/src/main/resources/assets/engineersdecor/models/block/pole/straight_thick_metal_pole_model.json new file mode 100644 index 0000000..db77562 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/models/block/pole/straight_thick_metal_pole_model.json @@ -0,0 +1,66 @@ +{ + "parent": "block/cube", + "textures": { + "side": "engineersdecor:blocks/pole/thick_steel_pole_side_texture", + "particle": "engineersdecor:blocks/pole/thick_steel_pole_side_texture", + "top": "engineersdecor:blocks/pole/thick_steel_pole_top_texture" + }, + "elements": [ + { + "from": [6, 10, 0], + "to": [10, 11, 16], + "faces": { + "north": {"uv": [6, 5, 9.5, 5.75], "texture": "#top"}, + "south": {"uv": [6, 6, 9.5, 6.75], "texture": "#top"}, + "up": {"uv": [6.25, 0, 9.75, 16], "texture": "#side"}, + "down": {"uv": [6.25, 0, 9.75, 16], "texture": "#side"} + } + }, + { + "from": [10, 5, 0], + "to": [11, 11, 16], + "faces": { + "north": {"uv": [5, 5, 5.75, 10], "texture": "#top", "cullface": "north"}, + "east": {"uv": [5, 0, 11, 16], "rotation": 90, "texture": "#side"}, + "south": {"uv": [10, 5, 10.75, 10], "texture": "#top", "cullface": "south"}, + "west": {"uv": [5, 0, 11, 16], "rotation": 90, "texture": "#side"}, + "up": {"uv": [10, 0, 11, 16], "texture": "#side"}, + "down": {"uv": [10, 0, 10.75, 16], "texture": "#side"} + } + }, + { + "from": [5, 5, 0], + "to": [6, 11, 16], + "faces": { + "north": {"uv": [10, 6, 10.75, 11], "texture": "#top", "cullface": "north"}, + "east": {"uv": [5, 0, 11, 16], "rotation": 90, "texture": "#side"}, + "south": {"uv": [5, 6, 5.75, 11], "texture": "#top", "cullface": "south"}, + "west": {"uv": [5, 0, 11, 16], "rotation": 90, "texture": "#side"}, + "up": {"uv": [5, 0, 6, 16], "texture": "#side"}, + "down": {"uv": [5, 0, 5.75, 16], "texture": "#side"} + } + }, + { + "from": [6, 5, 0], + "to": [10, 6, 16], + "faces": { + "north": {"uv": [6, 10, 9.5, 10.75], "texture": "#top"}, + "south": {"uv": [6, 10, 9.5, 10.75], "texture": "#top"}, + "up": {"uv": [6.25, 0, 9.75, 16], "texture": "#side"}, + "down": {"uv": [6.25, 0, 9.75, 16], "texture": "#side"} + } + } + ], + "display": { + "ground": { + "scale": [0.2, 0.2, 0.2] + }, + "gui": { + "rotation": [30, 225, 0], + "scale": [0.625, 0.625, 0.625] + }, + "fixed": { + "scale": [0.5, 0.5, 0.5] + } + } +} \ No newline at end of file diff --git a/1.12/src/main/resources/assets/engineersdecor/models/block/pole/straight_thin_metal_pole_head_model.json b/1.12/src/main/resources/assets/engineersdecor/models/block/pole/straight_thin_metal_pole_head_model.json new file mode 100644 index 0000000..ae017f8 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/models/block/pole/straight_thin_metal_pole_head_model.json @@ -0,0 +1,122 @@ +{ + "parent": "block/cube", + "textures": { + "side": "engineersdecor:blocks/pole/thin_steel_pole_side_texture", + "particle": "engineersdecor:blocks/pole/thin_steel_pole_side_texture", + "top": "engineersdecor:blocks/pole/thin_steel_pole_top_texture" + }, + "elements": [ + { + "from": [7, 9, 0], + "to": [9, 10, 14], + "faces": { + "north": {"uv": [7, 6, 9, 7], "texture": "#top"}, + "south": {"uv": [7, 6, 9, 7], "texture": "#top"}, + "up": {"uv": [7, 0, 9, 16], "texture": "#side"}, + "down": {"uv": [7, 0, 9, 16], "texture": "#side"} + } + }, + { + "from": [9, 6, 0], + "to": [10, 10, 14], + "faces": { + "north": {"uv": [6, 6, 7, 10], "texture": "#top", "cullface": "north"}, + "east": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#side"}, + "south": {"uv": [9, 6, 10, 10], "texture": "#top", "cullface": "south"}, + "west": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#side"}, + "up": {"uv": [9, 0, 10, 16], "texture": "#side"}, + "down": {"uv": [9, 0, 10, 16], "texture": "#side"} + } + }, + { + "from": [6, 6, 0], + "to": [7, 10, 14], + "faces": { + "north": {"uv": [9, 6, 10, 10], "texture": "#top", "cullface": "north"}, + "east": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#side"}, + "south": {"uv": [6, 6, 7, 10], "texture": "#top", "cullface": "south"}, + "west": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#side"}, + "up": {"uv": [6, 0, 7, 16], "texture": "#side"}, + "down": {"uv": [6, 0, 7, 16], "texture": "#side"} + } + }, + { + "from": [7, 6, 0], + "to": [9, 7, 14], + "faces": { + "north": {"uv": [7, 9, 9, 10], "texture": "#top"}, + "south": {"uv": [7, 9, 9, 10], "texture": "#top"}, + "up": {"uv": [7, 0, 9, 16], "texture": "#side"}, + "down": {"uv": [7, 0, 9, 16], "texture": "#side"} + } + }, + { + "from": [4, 4, 14], + "to": [12, 12, 16], + "faces": { + "north": {"uv": [4, 4, 12, 12], "texture": "#top", "cullface": "north"}, + "east": {"uv": [5, 5, 7, 13], "texture": "#side"}, + "south": {"uv": [4, 4, 12, 12], "texture": "#top", "cullface": "south"}, + "west": {"uv": [14, 4, 16, 12], "texture": "#side"}, + "up": {"uv": [12, 4, 14, 12], "rotation": 90, "texture": "#side"}, + "down": {"uv": [10, 1, 12, 10], "rotation": 90, "texture": "#side"} + } + }, + { + "from": [7, 10, 13], + "to": [9, 10.5, 15], + "rotation": {"angle": -45, "axis": "x", "origin": [8, 10.25, 14]}, + "faces": { + "east": {"uv": [2, 5.5, 4, 6], "texture": "#top"}, + "west": {"uv": [12, 5.5, 14, 6], "texture": "#top"}, + "up": {"uv": [7, 13, 9, 15], "texture": "#top"}, + "down": {"uv": [7, 2, 9, 4], "texture": "#top"} + } + }, + { + "from": [7, 5.5, 13], + "to": [9, 6, 15], + "rotation": {"angle": 45, "axis": "x", "origin": [8, 5.75, 14]}, + "faces": { + "east": {"uv": [2, 5.5, 4, 6], "texture": "#top"}, + "west": {"uv": [12, 5.5, 14, 6], "texture": "#top"}, + "up": {"uv": [7, 12, 9, 14], "texture": "#top"}, + "down": {"uv": [7, 1, 9, 3], "texture": "#top"} + } + }, + { + "from": [5.5, 7, 13], + "to": [6, 9, 15], + "rotation": {"angle": -45, "axis": "y", "origin": [5.75, 8, 14]}, + "faces": { + "east": {"uv": [7, 12, 9, 14], "rotation": 270, "texture": "#top"}, + "west": {"uv": [7, 1, 9, 3], "rotation": 270, "texture": "#top"}, + "up": {"uv": [12, 5.5, 14, 6], "rotation": 90, "texture": "#top"}, + "down": {"uv": [2, 5.5, 4, 6], "rotation": 270, "texture": "#top"} + } + }, + { + "from": [10, 7, 13], + "to": [10.5, 9, 15], + "rotation": {"angle": 45, "axis": "y", "origin": [10.25, 8, 14]}, + "faces": { + "east": {"uv": [7, 13, 9, 15], "rotation": 270, "texture": "#top"}, + "west": {"uv": [7, 2, 9, 4], "rotation": 270, "texture": "#top"}, + "up": {"uv": [12, 5.5, 14, 6], "rotation": 90, "texture": "#top"}, + "down": {"uv": [2, 5.5, 4, 6], "rotation": 270, "texture": "#top"} + } + } + ], + "display": { + "ground": { + "scale": [0.2, 0.2, 0.2] + }, + "gui": { + "rotation": [30, 225, 0], + "scale": [0.625, 0.625, 0.625] + }, + "fixed": { + "scale": [0.5, 0.5, 0.5] + } + } +} \ No newline at end of file diff --git a/1.12/src/main/resources/assets/engineersdecor/models/block/pole/straight_thin_metal_pole_model.json b/1.12/src/main/resources/assets/engineersdecor/models/block/pole/straight_thin_metal_pole_model.json new file mode 100644 index 0000000..398cc19 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/models/block/pole/straight_thin_metal_pole_model.json @@ -0,0 +1,66 @@ +{ + "parent": "block/cube", + "textures": { + "side": "engineersdecor:blocks/pole/thin_steel_pole_side_texture", + "particle": "engineersdecor:blocks/pole/thin_steel_pole_side_texture", + "top": "engineersdecor:blocks/pole/thin_steel_pole_top_texture" + }, + "elements": [ + { + "from": [7, 9, 0], + "to": [9, 10, 16], + "faces": { + "north": {"uv": [7, 6, 9, 7], "texture": "#top"}, + "south": {"uv": [7, 6, 9, 7], "texture": "#top"}, + "up": {"uv": [7, 0, 9, 16], "texture": "#side"}, + "down": {"uv": [7, 0, 9, 16], "texture": "#side"} + } + }, + { + "from": [9, 6, 0], + "to": [10, 10, 16], + "faces": { + "north": {"uv": [6, 6, 7, 10], "texture": "#top", "cullface": "north"}, + "east": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#side"}, + "south": {"uv": [9, 6, 10, 10], "texture": "#top", "cullface": "south"}, + "west": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#side"}, + "up": {"uv": [9, 0, 10, 16], "texture": "#side"}, + "down": {"uv": [9, 0, 10, 16], "texture": "#side"} + } + }, + { + "from": [6, 6, 0], + "to": [7, 10, 16], + "faces": { + "north": {"uv": [9, 6, 10, 10], "texture": "#top", "cullface": "north"}, + "east": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#side"}, + "south": {"uv": [6, 6, 7, 10], "texture": "#top", "cullface": "south"}, + "west": {"uv": [6, 0, 10, 16], "rotation": 90, "texture": "#side"}, + "up": {"uv": [6, 0, 7, 16], "texture": "#side"}, + "down": {"uv": [6, 0, 7, 16], "texture": "#side"} + } + }, + { + "from": [7, 6, 0], + "to": [9, 7, 16], + "faces": { + "north": {"uv": [7, 9, 9, 10], "texture": "#top"}, + "south": {"uv": [7, 9, 9, 10], "texture": "#top"}, + "up": {"uv": [7, 0, 9, 16], "texture": "#side"}, + "down": {"uv": [7, 0, 9, 16], "texture": "#side"} + } + } + ], + "display": { + "ground": { + "scale": [0.2, 0.2, 0.2] + }, + "gui": { + "rotation": [30, 225, 0], + "scale": [0.625, 0.625, 0.625] + }, + "fixed": { + "scale": [0.5, 0.5, 0.5] + } + } +} \ No newline at end of file diff --git a/1.12/src/main/resources/assets/engineersdecor/models/block/std/decor_full_block_model.json b/1.12/src/main/resources/assets/engineersdecor/models/block/std/decor_full_block_model.json new file mode 100644 index 0000000..f3c37b1 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/models/block/std/decor_full_block_model.json @@ -0,0 +1,4 @@ +{ + "parent": "block/cube_all", + "textures": { "all": "engineersdecor:blocks/clinker_brick/clinker_brick_texture0" } +} \ No newline at end of file diff --git a/1.12/src/main/resources/assets/engineersdecor/models/block/wall/clinker_brick_wall_inventory.json b/1.12/src/main/resources/assets/engineersdecor/models/block/wall/clinker_brick_wall_inventory.json index c9c5869..a0783a4 100644 --- a/1.12/src/main/resources/assets/engineersdecor/models/block/wall/clinker_brick_wall_inventory.json +++ b/1.12/src/main/resources/assets/engineersdecor/models/block/wall/clinker_brick_wall_inventory.json @@ -2,8 +2,8 @@ "parent": "block/block", "ambientocclusion": false, "textures": { - "wall": "engineersdecor:blocks/clinker_brick/clinker_brick_wall", - "particle": "engineersdecor:blocks/clinker_brick/clinker_brick_wall", + "wall": "engineersdecor:blocks/clinker_brick/clinker_brick_wall0", + "particle": "engineersdecor:blocks/clinker_brick/clinker_brick_wall0", "top": "engineersdecor:blocks/clinker_brick/clinker_brick_top" }, "elements": [ diff --git a/1.12/src/main/resources/assets/engineersdecor/models/block/wall/clinker_brick_wall_side.json b/1.12/src/main/resources/assets/engineersdecor/models/block/wall/clinker_brick_wall_side.json index bb3657b..a32a7bc 100644 --- a/1.12/src/main/resources/assets/engineersdecor/models/block/wall/clinker_brick_wall_side.json +++ b/1.12/src/main/resources/assets/engineersdecor/models/block/wall/clinker_brick_wall_side.json @@ -1,7 +1,7 @@ { "credit": "I made this with the Blockbench", "textures": { - "wall": "engineersdecor:blocks/clinker_brick/clinker_brick_wall", + "wall": "engineersdecor:blocks/clinker_brick/clinker_brick_wall0", "top": "engineersdecor:blocks/clinker_brick/clinker_brick_top", "particle": "engineersdecor:blocks/clinker_brick/clinker_brick_top" }, @@ -10,7 +10,7 @@ "from": [4.125, 0, 0], "to": [11.875, 15.98, 8], "faces": { - "north": {"texture": "#wall", "cullface": "north"}, + "north": {"texture": "#wall"}, "east": {"texture": "#wall"}, "west": {"texture": "#wall"}, "up": {"texture": "#top"}, diff --git a/1.12/src/main/resources/assets/engineersdecor/models/block/wall/concrete_wall_post.json b/1.12/src/main/resources/assets/engineersdecor/models/block/wall/concrete_wall_post.json index d88fb8a..6a5d732 100644 --- a/1.12/src/main/resources/assets/engineersdecor/models/block/wall/concrete_wall_post.json +++ b/1.12/src/main/resources/assets/engineersdecor/models/block/wall/concrete_wall_post.json @@ -1,5 +1,4 @@ { - "credit": "I made this with the Blockbench", "textures": { "wall": "engineersdecor:blocks/concrete/rebar_concrete_texture0", "particle": "engineersdecor:blocks/concrete/rebar_concrete_texture0" diff --git a/1.12/src/main/resources/assets/engineersdecor/models/block/wall/concrete_wall_side.json b/1.12/src/main/resources/assets/engineersdecor/models/block/wall/concrete_wall_side.json index de382a6..495ac64 100644 --- a/1.12/src/main/resources/assets/engineersdecor/models/block/wall/concrete_wall_side.json +++ b/1.12/src/main/resources/assets/engineersdecor/models/block/wall/concrete_wall_side.json @@ -1,5 +1,4 @@ { - "credit": "I made this with the Blockbench", "textures": { "wall": "engineersdecor:blocks/concrete/rebar_concrete_texture0", "particle": "engineersdecor:blocks/concrete/rebar_concrete_texture0" diff --git a/1.12/src/main/resources/assets/engineersdecor/models/block/wall/slag_brick_wall_inventory.json b/1.12/src/main/resources/assets/engineersdecor/models/block/wall/slag_brick_wall_inventory.json index 3a0dd3f..88bc8b8 100644 --- a/1.12/src/main/resources/assets/engineersdecor/models/block/wall/slag_brick_wall_inventory.json +++ b/1.12/src/main/resources/assets/engineersdecor/models/block/wall/slag_brick_wall_inventory.json @@ -2,8 +2,8 @@ "parent": "block/block", "ambientocclusion": false, "textures": { - "wall": "engineersdecor:blocks/slag_brick/slag_brick_wall", - "particle": "engineersdecor:blocks/slag_brick/slag_brick_wall", + "wall": "engineersdecor:blocks/slag_brick/slag_brick_wall0", + "particle": "engineersdecor:blocks/slag_brick/slag_brick_wall0", "top": "engineersdecor:blocks/slag_brick/slag_brick_top" }, "elements": [ diff --git a/1.12/src/main/resources/assets/engineersdecor/models/block/wall/slag_brick_wall_post.json b/1.12/src/main/resources/assets/engineersdecor/models/block/wall/slag_brick_wall_post.json index a3309be..78cfbde 100644 --- a/1.12/src/main/resources/assets/engineersdecor/models/block/wall/slag_brick_wall_post.json +++ b/1.12/src/main/resources/assets/engineersdecor/models/block/wall/slag_brick_wall_post.json @@ -1,5 +1,4 @@ { - "credit": "I made this with the Blockbench", "textures": { "postside": "engineersdecor:blocks/slag_brick/slag_brick_pole_side", "top": "engineersdecor:blocks/slag_brick/slag_brick_top", diff --git a/1.12/src/main/resources/assets/engineersdecor/models/block/wall/slag_brick_wall_side.json b/1.12/src/main/resources/assets/engineersdecor/models/block/wall/slag_brick_wall_side.json index 127af1c..67c0eac 100644 --- a/1.12/src/main/resources/assets/engineersdecor/models/block/wall/slag_brick_wall_side.json +++ b/1.12/src/main/resources/assets/engineersdecor/models/block/wall/slag_brick_wall_side.json @@ -1,7 +1,6 @@ { - "credit": "I made this with the Blockbench", "textures": { - "wall": "engineersdecor:blocks/slag_brick/slag_brick_wall", + "wall": "engineersdecor:blocks/slag_brick/slag_brick_wall0", "top": "engineersdecor:blocks/slag_brick/slag_brick_top", "particle": "engineersdecor:blocks/slag_brick/slag_brick_top" }, diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/_constants.json b/1.12/src/main/resources/assets/engineersdecor/recipes/_constants.json index 12f9f28..d6801df 100644 --- a/1.12/src/main/resources/assets/engineersdecor/recipes/_constants.json +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/_constants.json @@ -19,10 +19,18 @@ "ingredient": { "type": "forge:ore_dict", "ore": "ingotIron" }, "name": "ingotIron" }, + { + "ingredient": { "type": "forge:ore_dict", "ore": "blockIron" }, + "name": "blockIron" + }, { "ingredient": { "type": "forge:ore_dict", "ore": "plateIron" }, "name": "plateIron" }, + { + "ingredient": { "type": "forge:ore_dict", "ore": "ingotSteel" }, + "name": "ingotSteel" + }, { "ingredient": { "type": "forge:ore_dict", "ore": "plateSteel" }, "name": "plateSteel" @@ -47,6 +55,10 @@ "ingredient": { "type": "forge:ore_dict", "ore": "plankWood" }, "name": "plankWood" }, + { + "ingredient": { "type": "forge:ore_dict", "ore": "slabWood" }, + "name": "slabWood" + }, { "ingredient": { "type": "forge:ore_dict", "ore": "stickWood" }, "name": "stickWood" @@ -94,6 +106,37 @@ ], "name": "plateAnyMetal" }, + { + "conditions": [ + { "type": "minecraft:item_exists", "item": "immersiveengineering:material" } + ], + "ingredient": [ + { "item": "immersiveengineering:material", "data": 8 }, + { "item": "immersiveengineering:material", "data": 9 } + ], + "name": "anyMechanicalComponent" + }, + { + "conditions": [ + { "type": "minecraft:item_exists", "item": "immersiveengineering:connector" } + ], + "ingredient": [ + { "item": "immersiveengineering:connector", "data": 12 }, + { "item": "immersiveengineering:connector", "data": 13 } + ], + "name": "anyDirectedRedstoneConnector" + }, + { + "conditions": [ + { "type": "minecraft:item_exists", "item": "immersiveengineering:connector" } + ], + "ingredient": [ + { "item": "immersiveengineering:connector", "data": 0 }, + { "item": "immersiveengineering:connector", "data": 2 }, + { "item": "immersiveengineering:connector", "data": 4 } + ], + "name": "electricalConnector" + }, { "ingredient": [ { "type": "forge:ore_dict", "ore": "ingotBrick" }, @@ -117,6 +160,10 @@ "ingredient": { "type": "forge:ore_dict", "ore": "blockGlass" }, "name": "blockGlass" }, + { + "ingredient": { "type": "forge:ore_dict", "ore": "dustRedstone" }, + "name": "dustRedstone" + }, { "ingredient": { "item": "minecraft:diamond", "data": 0 }, "name": "itemDiamond" @@ -150,6 +197,13 @@ "ingredient": { "item": "immersiveengineering:wooden_device0", "data": 0 }, "name": "crateTreatedWood" }, + { + "conditions": [ + { "type": "minecraft:item_exists", "item": "immersiveengineering:metal_device1" } + ], + "ingredient": { "item": "immersiveengineering:metal_device1", "data": 6 }, + "name": "itemFluidPipe" + }, { "conditions": [ { "type": "engineersdecor:grc", "missing": ["immersiveengineering:stone_decoration"] } diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/clinker_brick_recipe.json b/1.12/src/main/resources/assets/engineersdecor/recipes/clinker_brick_block_recipe.json similarity index 100% rename from 1.12/src/main/resources/assets/engineersdecor/recipes/clinker_brick_recipe.json rename to 1.12/src/main/resources/assets/engineersdecor/recipes/clinker_brick_block_recipe.json diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/clinker_brick_wall_recipe.json b/1.12/src/main/resources/assets/engineersdecor/recipes/clinker_brick_wall_recipe.json index 89aae07..6a3be11 100644 --- a/1.12/src/main/resources/assets/engineersdecor/recipes/clinker_brick_wall_recipe.json +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/clinker_brick_wall_recipe.json @@ -7,7 +7,6 @@ ], "type": "minecraft:crafting_shaped", "pattern": [ - " ", "BBB", "BBB" ], diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/concrete_wall_recipe_with_ie_installed.json b/1.12/src/main/resources/assets/engineersdecor/recipes/concrete_wall_recipe_ie_required.json similarity index 97% rename from 1.12/src/main/resources/assets/engineersdecor/recipes/concrete_wall_recipe_with_ie_installed.json rename to 1.12/src/main/resources/assets/engineersdecor/recipes/concrete_wall_recipe_ie_required.json index 87a9306..1a94e64 100644 --- a/1.12/src/main/resources/assets/engineersdecor/recipes/concrete_wall_recipe_with_ie_installed.json +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/concrete_wall_recipe_ie_required.json @@ -8,7 +8,6 @@ ], "type": "minecraft:crafting_shaped", "pattern": [ - " ", "CCC", "CCC" ], diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/iron_inset_light_recipe.json b/1.12/src/main/resources/assets/engineersdecor/recipes/iron_inset_light_recipe.json index 9fec78e..c7cce26 100644 --- a/1.12/src/main/resources/assets/engineersdecor/recipes/iron_inset_light_recipe.json +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/iron_inset_light_recipe.json @@ -2,12 +2,12 @@ "conditions": [ { "type": "engineersdecor:grc", - "result": "engineersdecor:iron_inset_light" + "result": "engineersdecor:iron_inset_light", + "required": ["immersiveengineering:material"] } ], "type": "minecraft:crafting_shaped", "pattern": [ - " ", "GGG", "PLP" ], diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/metal_rung_ladder_recipe.json b/1.12/src/main/resources/assets/engineersdecor/recipes/metal_rung_ladder_recipe.json index 9fdde71..2f51f83 100644 --- a/1.12/src/main/resources/assets/engineersdecor/recipes/metal_rung_ladder_recipe.json +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/metal_rung_ladder_recipe.json @@ -9,8 +9,7 @@ "type": "minecraft:crafting_shaped", "pattern": [ "S S", - "SSS", - " " + "SSS" ], "key": { "S": { diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/passive_fluid_accumulator_recipe.json b/1.12/src/main/resources/assets/engineersdecor/recipes/passive_fluid_accumulator_recipe.json new file mode 100644 index 0000000..0c6b0b6 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/passive_fluid_accumulator_recipe.json @@ -0,0 +1,30 @@ +{ + "conditions": [ + { + "type": "engineersdecor:grc", + "result": "engineersdecor:passive_fluid_accumulator", + "required": ["immersiveengineering:material"] + } + ], + "type": "minecraft:crafting_shaped", + "pattern": [ + "SPS", + "PMP", + "SPS" + ], + "key": { + "P": { + "item": "#itemFluidPipe" + }, + "M": { + "item": "#anyMechanicalComponent" + }, + "S": { + "item": "#slabSheetmetalIron" + } + }, + "result": { + "item": "engineersdecor:passive_fluid_accumulator", + "count": 1 + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/rebar_concrete_recipe.json b/1.12/src/main/resources/assets/engineersdecor/recipes/rebar_concrete_block_recipe.json similarity index 100% rename from 1.12/src/main/resources/assets/engineersdecor/recipes/rebar_concrete_recipe.json rename to 1.12/src/main/resources/assets/engineersdecor/recipes/rebar_concrete_block_recipe.json diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/rebar_concrete_wall_recipe.json b/1.12/src/main/resources/assets/engineersdecor/recipes/rebar_concrete_wall_recipe.json index 4ec19fa..61baf76 100644 --- a/1.12/src/main/resources/assets/engineersdecor/recipes/rebar_concrete_wall_recipe.json +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/rebar_concrete_wall_recipe.json @@ -7,7 +7,6 @@ ], "type": "minecraft:crafting_shaped", "pattern": [ - " ", "CCC", "CCC" ], diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/slag_brick_recipe_with_slag.json b/1.12/src/main/resources/assets/engineersdecor/recipes/slag_brick_block_recipe.json similarity index 100% rename from 1.12/src/main/resources/assets/engineersdecor/recipes/slag_brick_recipe_with_slag.json rename to 1.12/src/main/resources/assets/engineersdecor/recipes/slag_brick_block_recipe.json diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/slag_brick_wall_recipe.json b/1.12/src/main/resources/assets/engineersdecor/recipes/slag_brick_wall_recipe.json index d5f3e25..a140b2a 100644 --- a/1.12/src/main/resources/assets/engineersdecor/recipes/slag_brick_wall_recipe.json +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/slag_brick_wall_recipe.json @@ -7,7 +7,6 @@ ], "type": "minecraft:crafting_shaped", "pattern": [ - " ", "BBB", "BBB" ], diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/small_electrical_furnace_recipe.json b/1.12/src/main/resources/assets/engineersdecor/recipes/small_electrical_furnace_recipe.json new file mode 100644 index 0000000..7782f48 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/small_electrical_furnace_recipe.json @@ -0,0 +1,32 @@ +{ + "conditions": [ + { + "type": "engineersdecor:grc", + "result": "engineersdecor:small_electrical_furnace", + "required": ["immersiveengineering:material", "engineersdecor:small_lab_furnace"] + } + ], + "type": "minecraft:crafting_shaped", + "pattern": [ + " C ", + "HFH" + ], + "key": { + "F": { + "item": "engineersdecor:small_lab_furnace", + "data": 0 + }, + "C": { + "item": "#electricalConnector", + "data": 0 + }, + "H": { + "item": "#anyHopper", + "data": 0 + } + }, + "result": { + "item": "engineersdecor:small_electrical_furnace", + "count": 1 + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/iron_inset_light_recipe_standalone.json b/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/iron_inset_light_recipe_standalone.json new file mode 100644 index 0000000..c344c33 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/iron_inset_light_recipe_standalone.json @@ -0,0 +1,32 @@ +{ + "conditions": [ + { + "type": "engineersdecor:grc", + "result": "engineersdecor:iron_inset_light", + "missing": ["immersiveengineering:material"] + } + ], + "type": "minecraft:crafting_shaped", + "pattern": [ + "GGG", + "PLP" + ], + "key": { + "P": { + "item": "#ingotIron", + "data": 0 + }, + "L": { + "item": "#luminescentBlock", + "data": 0 + }, + "G": { + "item": "#paneGlass", + "data": 0 + } + }, + "result": { + "item": "engineersdecor:iron_inset_light", + "count": 8 + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/metal_rung_ladder_recipe_standalone.json b/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/metal_rung_ladder_recipe_standalone.json new file mode 100644 index 0000000..2748ac9 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/metal_rung_ladder_recipe_standalone.json @@ -0,0 +1,25 @@ +{ + "conditions": [ + { + "type": "engineersdecor:grc", + "result": "engineersdecor:metal_rung_ladder", + "missing": ["immersiveengineering:material"] + } + ], + "type": "minecraft:crafting_shaped", + "pattern": [ + "S S", + "SSS", + " " + ], + "key": { + "S": { + "item": "#ingotIron", + "data": 0 + } + }, + "result": { + "item": "engineersdecor:metal_rung_ladder", + "count": 4 + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/metal_rung_steps_recipe_standalone.json b/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/metal_rung_steps_recipe_standalone.json new file mode 100644 index 0000000..1f8b73b --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/metal_rung_steps_recipe_standalone.json @@ -0,0 +1,25 @@ +{ + "conditions": [ + { + "type": "engineersdecor:grc", + "result": "engineersdecor:metal_rung_steps", + "missing": ["immersiveengineering:material"] + } + ], + "type": "minecraft:crafting_shaped", + "pattern": [ + " SS", + "SS ", + " SS" + ], + "key": { + "S": { + "item": "#ingotIron", + "data": 0 + } + }, + "result": { + "item": "engineersdecor:metal_rung_steps", + "count": 4 + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/panzerglass_block_recipe_standalone.json b/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/panzerglass_block_recipe_standalone.json new file mode 100644 index 0000000..4f09ade --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/panzerglass_block_recipe_standalone.json @@ -0,0 +1,33 @@ +{ + "conditions": [ + { + "type": "engineersdecor:grc", + "result": "engineersdecor:panzerglass_block", + "missing": ["immersiveengineering:stone_decoration"] + } + ], + "type": "minecraft:crafting_shaped", + "pattern": [ + "SGS", + "GDG", + "SGS" + ], + "key": { + "G": { + "item": "#blockGlass", + "data": 0 + }, + "S": { + "item": "#ingotIron", + "data": 0 + }, + "D": { + "item": "#itemDiamond", + "data": 0 + } + }, + "result": { + "item": "engineersdecor:panzerglass_block", + "count": 8 + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/rebar_concrete_recipe_standalone.json b/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/rebar_concrete_block_recipe_standalone.json similarity index 100% rename from 1.12/src/main/resources/assets/engineersdecor/recipes/rebar_concrete_recipe_standalone.json rename to 1.12/src/main/resources/assets/engineersdecor/recipes/standalone/rebar_concrete_block_recipe_standalone.json diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/slag_brick_recipe_without_slag.json b/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/slag_brick_block_recipe_standalone.json similarity index 100% rename from 1.12/src/main/resources/assets/engineersdecor/recipes/slag_brick_recipe_without_slag.json rename to 1.12/src/main/resources/assets/engineersdecor/recipes/standalone/slag_brick_block_recipe_standalone.json diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/small_lab_furnace_recipe_standalone.json b/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/small_lab_furnace_recipe_standalone.json similarity index 100% rename from 1.12/src/main/resources/assets/engineersdecor/recipes/small_lab_furnace_recipe_standalone.json rename to 1.12/src/main/resources/assets/engineersdecor/recipes/standalone/small_lab_furnace_recipe_standalone.json diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/steel_framed_window_recipe_standalone.json b/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/steel_framed_window_recipe_standalone.json new file mode 100644 index 0000000..53b7e07 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/steel_framed_window_recipe_standalone.json @@ -0,0 +1,29 @@ +{ + "conditions": [ + { + "type": "engineersdecor:grc", + "result": "engineersdecor:steel_framed_window", + "missing": ["immersiveengineering:material"] + } + ], + "type": "minecraft:crafting_shaped", + "pattern": [ + "WGW", + "GGG", + "WGW" + ], + "key": { + "W": { + "item": "#ingotIron", + "data": 0 + }, + "G": { + "item": "#paneGlass", + "data": 0 + } + }, + "result": { + "item": "engineersdecor:steel_framed_window", + "count": 9 + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/thin_steel_pole_recipe_standalone.json b/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/thin_steel_pole_recipe_standalone.json new file mode 100644 index 0000000..67409b4 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/thin_steel_pole_recipe_standalone.json @@ -0,0 +1,25 @@ +{ + "conditions": [ + { + "type": "engineersdecor:grc", + "result": "engineersdecor:thin_steel_pole", + "missing": ["immersiveengineering:material"] + } + ], + "type": "minecraft:crafting_shaped", + "pattern": [ + " S", + " S ", + "S " + ], + "key": { + "S": { + "item": "#ingotIron", + "data": 0 + } + }, + "result": { + "item": "engineersdecor:thin_steel_pole", + "count": 12 + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/treated_wood_crafting_table_recipe_standalone.json b/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/treated_wood_crafting_table_recipe_standalone.json similarity index 100% rename from 1.12/src/main/resources/assets/engineersdecor/recipes/treated_wood_crafting_table_recipe_standalone.json rename to 1.12/src/main/resources/assets/engineersdecor/recipes/standalone/treated_wood_crafting_table_recipe_standalone.json diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/treated_wood_ladder_recipe_standalone.json b/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/treated_wood_ladder_recipe_standalone.json new file mode 100644 index 0000000..69cf9c6 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/treated_wood_ladder_recipe_standalone.json @@ -0,0 +1,25 @@ +{ + "conditions": [ + { + "type": "engineersdecor:grc", + "result": "engineersdecor:treated_wood_ladder", + "missing": ["immersiveengineering:material"] + } + ], + "type": "minecraft:crafting_shaped", + "pattern": [ + "LL", + "LL", + "LL" + ], + "key": { + "L": { + "item": "minecraft:ladder", + "data": 0 + } + }, + "result": { + "item": "engineersdecor:treated_wood_ladder", + "count": 6 + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/treated_wood_pole_recipe_standalone.json b/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/treated_wood_pole_recipe_standalone.json new file mode 100644 index 0000000..074058b --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/treated_wood_pole_recipe_standalone.json @@ -0,0 +1,29 @@ +{ + "conditions": [ + { + "type": "engineersdecor:grc", + "result": "engineersdecor:treated_wood_pole", + "missing": ["immersiveengineering:material"] + } + ], + "type": "minecraft:crafting_shaped", + "pattern": [ + "S", + "W", + "W" + ], + "key": { + "W": { + "item": "#plankWood", + "data": 0 + }, + "S": { + "item": "#slabWood", + "data": 0 + } + }, + "result": { + "item": "engineersdecor:treated_wood_pole", + "count": 6 + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/treated_wood_stool_recipe_standalone.json b/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/treated_wood_stool_recipe_standalone.json new file mode 100644 index 0000000..3a3c78c --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/treated_wood_stool_recipe_standalone.json @@ -0,0 +1,28 @@ +{ + "conditions": [ + { + "type": "engineersdecor:grc", + "result": "engineersdecor:treated_wood_stool", + "missing": ["immersiveengineering:material"] + } + ], + "type": "minecraft:crafting_shaped", + "pattern": [ + "WWW", + " S " + ], + "key": { + "W": { + "item": "#slabWood", + "data": 0 + }, + "S": { + "item": "engineersdecor:treated_wood_pole", + "data": 0 + } + }, + "result": { + "item": "engineersdecor:treated_wood_stool", + "count": 1 + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/treated_wood_table_recipe_standalone.json b/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/treated_wood_table_recipe_standalone.json new file mode 100644 index 0000000..b9e954b --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/treated_wood_table_recipe_standalone.json @@ -0,0 +1,29 @@ +{ + "conditions": [ + { + "type": "engineersdecor:grc", + "result": "engineersdecor:treated_wood_table", + "missing": ["immersiveengineering:material"] + } + ], + "type": "minecraft:crafting_shaped", + "pattern": [ + "WWW", + "S S", + "S S" + ], + "key": { + "W": { + "item": "#slabWood", + "data": 0 + }, + "S": { + "item": "engineersdecor:treated_wood_pole", + "data": 0 + } + }, + "result": { + "item": "engineersdecor:treated_wood_table", + "count": 1 + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/treated_wood_window_recipe_standalone.json b/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/treated_wood_window_recipe_standalone.json new file mode 100644 index 0000000..05948b1 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/treated_wood_window_recipe_standalone.json @@ -0,0 +1,29 @@ +{ + "conditions": [ + { + "type": "engineersdecor:grc", + "result": "engineersdecor:treated_wood_window", + "missing": ["immersiveengineering:material"] + } + ], + "type": "minecraft:crafting_shaped", + "pattern": [ + "WGW", + "GGG", + "WGW" + ], + "key": { + "W": { + "item": "#slabWood", + "data": 0 + }, + "G": { + "item": "#paneGlass", + "data": 0 + } + }, + "result": { + "item": "engineersdecor:treated_wood_window", + "count": 9 + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/treated_wood_windowsill_recipe_standalone.json b/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/treated_wood_windowsill_recipe_standalone.json new file mode 100644 index 0000000..4d3c63b --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/standalone/treated_wood_windowsill_recipe_standalone.json @@ -0,0 +1,26 @@ +{ + "conditions": [ + { + "type": "engineersdecor:grc", + "result": "engineersdecor:treated_wood_windowsill", + "missing": ["immersiveengineering:material"] + } + ], + "type": "minecraft:crafting_shaped", + "pattern": [ + "WWW", + "S S" + ], + "key": { + "W": { + "item": "#slabWood" + }, + "S": { + "item": "engineersdecor:treated_wood_pole" + } + }, + "result": { + "item": "engineersdecor:treated_wood_windowsill", + "count": 4 + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/steel_double_t_support_recipe.json b/1.12/src/main/resources/assets/engineersdecor/recipes/steel_double_t_support_recipe.json new file mode 100644 index 0000000..64741fa --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/steel_double_t_support_recipe.json @@ -0,0 +1,24 @@ +{ + "conditions": [ + { + "type": "engineersdecor:grc", + "result": "engineersdecor:steel_double_t_support", + "required": ["engineersdecor:thin_steel_pole"] + } + ], + "type": "minecraft:crafting_shaped", + "pattern": [ + "PPP", + " P ", + "PPP" + ], + "key": { + "P": { + "item": "engineersdecor:thin_steel_pole" + } + }, + "result": { + "item": "engineersdecor:steel_double_t_support", + "count": 6 + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/straight_pipe_valve_recipe.json b/1.12/src/main/resources/assets/engineersdecor/recipes/straight_pipe_valve_recipe.json new file mode 100644 index 0000000..8562a52 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/straight_pipe_valve_recipe.json @@ -0,0 +1,25 @@ +{ + "conditions": [ + { + "type": "engineersdecor:grc", + "result": "engineersdecor:straight_pipe_valve", + "required": ["immersiveengineering:material"] + } + ], + "type": "minecraft:crafting_shaped", + "pattern": [ + "PMP" + ], + "key": { + "P": { + "item": "#itemFluidPipe" + }, + "M": { + "item": "#anyMechanicalComponent" + } + }, + "result": { + "item": "engineersdecor:straight_pipe_valve", + "count": 3 + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/straight_pipe_valve_redstone_analog_recipe.json b/1.12/src/main/resources/assets/engineersdecor/recipes/straight_pipe_valve_redstone_analog_recipe.json new file mode 100644 index 0000000..9c1c82b --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/straight_pipe_valve_redstone_analog_recipe.json @@ -0,0 +1,16 @@ +{ + "conditions": [ + { + "type": "engineersdecor:grc", + "result": "engineersdecor:straight_pipe_valve_redstone_analog", + "required": ["engineersdecor:straight_pipe_valve_redstone"] + } + ], + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { "item": "engineersdecor:straight_pipe_valve_redstone" } + ], + "result": { + "item": "engineersdecor:straight_pipe_valve_redstone_analog" + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/straight_pipe_valve_redstone_recipe.json b/1.12/src/main/resources/assets/engineersdecor/recipes/straight_pipe_valve_redstone_recipe.json new file mode 100644 index 0000000..5931be4 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/straight_pipe_valve_redstone_recipe.json @@ -0,0 +1,17 @@ +{ + "conditions": [ + { + "type": "engineersdecor:grc", + "result": "engineersdecor:straight_pipe_valve_redstone", + "required": ["engineersdecor:straight_pipe_valve"] + } + ], + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { "item": "engineersdecor:straight_pipe_valve" }, + { "item": "#anyDirectedRedstoneConnector" } + ], + "result": { + "item": "engineersdecor:straight_pipe_valve_redstone" + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/straight_pipe_valve_redstone_recipe_backcycle.json b/1.12/src/main/resources/assets/engineersdecor/recipes/straight_pipe_valve_redstone_recipe_backcycle.json new file mode 100644 index 0000000..bda3489 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/straight_pipe_valve_redstone_recipe_backcycle.json @@ -0,0 +1,16 @@ +{ + "conditions": [ + { + "type": "engineersdecor:grc", + "result": "engineersdecor:straight_pipe_valve_redstone", + "required": ["engineersdecor:straight_pipe_valve_redstone_analog"] + } + ], + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { "item": "engineersdecor:straight_pipe_valve_redstone_analog" } + ], + "result": { + "item": "engineersdecor:straight_pipe_valve_redstone" + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/thick_steel_pole_head_recipe.json b/1.12/src/main/resources/assets/engineersdecor/recipes/thick_steel_pole_head_recipe.json new file mode 100644 index 0000000..e2efd5d --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/thick_steel_pole_head_recipe.json @@ -0,0 +1,17 @@ +{ + "conditions": [ + { + "type": "engineersdecor:grc", + "result": "engineersdecor:thick_steel_pole_head" + } + ], + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "item": "engineersdecor:thick_steel_pole" + } + ], + "result": { + "item": "engineersdecor:thick_steel_pole_head" + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/thick_steel_pole_recipe.json b/1.12/src/main/resources/assets/engineersdecor/recipes/thick_steel_pole_recipe.json new file mode 100644 index 0000000..3c14d5b --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/thick_steel_pole_recipe.json @@ -0,0 +1,25 @@ +{ + "conditions": [ + { + "type": "engineersdecor:grc", + "result": "engineersdecor:thin_steel_pole", + "required": ["engineersdecor:thin_steel_pole"] + } + ], + "type": "minecraft:crafting_shaped", + "pattern": [ + "PP", + "PP", + "PP" + ], + "key": { + "P": { + "item": "engineersdecor:thin_steel_pole", + "data": 0 + } + }, + "result": { + "item": "engineersdecor:thick_steel_pole", + "count": 4 + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/thick_steel_pole_recipe_backcycle.json b/1.12/src/main/resources/assets/engineersdecor/recipes/thick_steel_pole_recipe_backcycle.json new file mode 100644 index 0000000..8d4bc27 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/thick_steel_pole_recipe_backcycle.json @@ -0,0 +1,17 @@ +{ + "conditions": [ + { + "type": "engineersdecor:grc", + "result": "engineersdecor:thick_steel_pole" + } + ], + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "item": "engineersdecor:thick_steel_pole_head" + } + ], + "result": { + "item": "engineersdecor:thick_steel_pole" + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/thin_steel_pole_head_recipe.json b/1.12/src/main/resources/assets/engineersdecor/recipes/thin_steel_pole_head_recipe.json new file mode 100644 index 0000000..88613a9 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/thin_steel_pole_head_recipe.json @@ -0,0 +1,17 @@ +{ + "conditions": [ + { + "type": "engineersdecor:grc", + "result": "engineersdecor:thin_steel_pole_head" + } + ], + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "item": "engineersdecor:thin_steel_pole" + } + ], + "result": { + "item": "engineersdecor:thin_steel_pole_head" + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/thin_steel_pole_recipe.json b/1.12/src/main/resources/assets/engineersdecor/recipes/thin_steel_pole_recipe.json new file mode 100644 index 0000000..163ebd6 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/thin_steel_pole_recipe.json @@ -0,0 +1,25 @@ +{ + "conditions": [ + { + "type": "engineersdecor:grc", + "result": "engineersdecor:thin_steel_pole", + "required": ["immersiveengineering:material"] + } + ], + "type": "minecraft:crafting_shaped", + "pattern": [ + " S", + " S ", + "S " + ], + "key": { + "S": { + "item": "#ingotSteel", + "data": 0 + } + }, + "result": { + "item": "engineersdecor:thin_steel_pole", + "count": 12 + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/thin_steel_pole_recipe_backcycle.json b/1.12/src/main/resources/assets/engineersdecor/recipes/thin_steel_pole_recipe_backcycle.json new file mode 100644 index 0000000..9623469 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/thin_steel_pole_recipe_backcycle.json @@ -0,0 +1,17 @@ +{ + "conditions": [ + { + "type": "engineersdecor:grc", + "result": "engineersdecor:thin_steel_pole" + } + ], + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "item": "engineersdecor:thin_steel_pole_head" + } + ], + "result": { + "item": "engineersdecor:thin_steel_pole" + } +} diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/treated_wood_ladder_recipe.json b/1.12/src/main/resources/assets/engineersdecor/recipes/treated_wood_ladder_recipe.json index cd81662..8546d3f 100644 --- a/1.12/src/main/resources/assets/engineersdecor/recipes/treated_wood_ladder_recipe.json +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/treated_wood_ladder_recipe.json @@ -20,6 +20,6 @@ }, "result": { "item": "engineersdecor:treated_wood_ladder", - "count": 4 + "count": 3 } } diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/treated_wood_pole_recipe.json b/1.12/src/main/resources/assets/engineersdecor/recipes/treated_wood_pole_recipe.json index 62330e4..801bc97 100644 --- a/1.12/src/main/resources/assets/engineersdecor/recipes/treated_wood_pole_recipe.json +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/treated_wood_pole_recipe.json @@ -8,9 +8,9 @@ ], "type": "minecraft:crafting_shaped", "pattern": [ - " S ", - " W ", - " W " + "S", + "W", + "W" ], "key": { "W": { diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/treated_wood_stool_recipe.json b/1.12/src/main/resources/assets/engineersdecor/recipes/treated_wood_stool_recipe.json index 92fd712..85cdeb1 100644 --- a/1.12/src/main/resources/assets/engineersdecor/recipes/treated_wood_stool_recipe.json +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/treated_wood_stool_recipe.json @@ -8,7 +8,6 @@ ], "type": "minecraft:crafting_shaped", "pattern": [ - " ", "WWW", " S " ], diff --git a/1.12/src/main/resources/assets/engineersdecor/recipes/treated_wood_windowsill_recipe.json b/1.12/src/main/resources/assets/engineersdecor/recipes/treated_wood_windowsill_recipe.json index 15a9277..95ddba1 100644 --- a/1.12/src/main/resources/assets/engineersdecor/recipes/treated_wood_windowsill_recipe.json +++ b/1.12/src/main/resources/assets/engineersdecor/recipes/treated_wood_windowsill_recipe.json @@ -9,8 +9,7 @@ "type": "minecraft:crafting_shaped", "pattern": [ "WWW", - "S S", - " " + "S S" ], "key": { "W": { diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/clinker_brick/clinker_brick_wall.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/clinker_brick/clinker_brick_wall0.png similarity index 75% rename from 1.12/src/main/resources/assets/engineersdecor/textures/blocks/clinker_brick/clinker_brick_wall.png rename to 1.12/src/main/resources/assets/engineersdecor/textures/blocks/clinker_brick/clinker_brick_wall0.png index 50a3cec..6132835 100644 Binary files a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/clinker_brick/clinker_brick_wall.png and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/clinker_brick/clinker_brick_wall0.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/clinker_brick/clinker_brick_wall1.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/clinker_brick/clinker_brick_wall1.png new file mode 100644 index 0000000..6dc22d5 Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/clinker_brick/clinker_brick_wall1.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/clinker_brick/clinker_brick_wall2.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/clinker_brick/clinker_brick_wall2.png new file mode 100644 index 0000000..22cfe00 Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/clinker_brick/clinker_brick_wall2.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/clinker_brick/clinker_brick_wall3.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/clinker_brick/clinker_brick_wall3.png new file mode 100644 index 0000000..683f5a5 Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/clinker_brick/clinker_brick_wall3.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/clinker_brick/clinker_brick_wall4.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/clinker_brick/clinker_brick_wall4.png new file mode 100644 index 0000000..40a00bf Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/clinker_brick/clinker_brick_wall4.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/clinker_brick/clinker_brick_wall5.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/clinker_brick/clinker_brick_wall5.png new file mode 100644 index 0000000..688d227 Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/clinker_brick/clinker_brick_wall5.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/clinker_brick/clinker_brick_wall6.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/clinker_brick/clinker_brick_wall6.png new file mode 100644 index 0000000..dd33298 Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/clinker_brick/clinker_brick_wall6.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/clinker_brick/clinker_brick_wall7.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/clinker_brick/clinker_brick_wall7.png new file mode 100644 index 0000000..3aabd7b Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/clinker_brick/clinker_brick_wall7.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/crafting_table/treated_wood_crafting_table_front.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/crafting_table/treated_wood_crafting_table_front.png index 8fc207a..06069e9 100644 Binary files a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/crafting_table/treated_wood_crafting_table_front.png and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/crafting_table/treated_wood_crafting_table_front.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/crafting_table/treated_wood_crafting_table_side.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/crafting_table/treated_wood_crafting_table_side.png index 273905e..f059bb7 100644 Binary files a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/crafting_table/treated_wood_crafting_table_side.png and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/crafting_table/treated_wood_crafting_table_side.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/crafting_table/treated_wood_crafting_table_top.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/crafting_table/treated_wood_crafting_table_top.png index 2e9aead..0462c67 100644 Binary files a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/crafting_table/treated_wood_crafting_table_top.png and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/crafting_table/treated_wood_crafting_table_top.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/crafting_table/treated_wood_crafting_table_tray.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/crafting_table/treated_wood_crafting_table_tray.png index 530e0bf..cc16e1f 100644 Binary files a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/crafting_table/treated_wood_crafting_table_tray.png and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/crafting_table/treated_wood_crafting_table_tray.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_electrical_furnace_back.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_electrical_furnace_back.png new file mode 100644 index 0000000..78db770 Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_electrical_furnace_back.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_electrical_furnace_bottom.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_electrical_furnace_bottom.png new file mode 100644 index 0000000..d806f99 Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_electrical_furnace_bottom.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_electrical_furnace_front.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_electrical_furnace_front.png new file mode 100644 index 0000000..2d200b9 Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_electrical_furnace_front.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_electrical_furnace_gloom_off.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_electrical_furnace_gloom_off.png new file mode 100644 index 0000000..481f72d Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_electrical_furnace_gloom_off.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_electrical_furnace_gloom_on.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_electrical_furnace_gloom_on.png new file mode 100644 index 0000000..02da036 Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_electrical_furnace_gloom_on.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_electrical_furnace_gloom_on.png.mcmeta b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_electrical_furnace_gloom_on.png.mcmeta new file mode 100644 index 0000000..e745021 --- /dev/null +++ b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_electrical_furnace_gloom_on.png.mcmeta @@ -0,0 +1 @@ +{ "animation":{ "frames": [0,1,2,3,4,5,6,7], "frametime":8, "interpolate":true }} \ No newline at end of file diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_electrical_furnace_left.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_electrical_furnace_left.png new file mode 100644 index 0000000..40012d5 Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_electrical_furnace_left.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_electrical_furnace_right.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_electrical_furnace_right.png new file mode 100644 index 0000000..97ed4cf Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_electrical_furnace_right.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_electrical_furnace_top.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_electrical_furnace_top.png new file mode 100644 index 0000000..6457ee0 Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_electrical_furnace_top.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_lab_furnace_back.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_lab_furnace_back.png index 4465f75..364e1ad 100644 Binary files a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_lab_furnace_back.png and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_lab_furnace_back.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_lab_furnace_bottom.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_lab_furnace_bottom.png index b56e843..7a0e8d7 100644 Binary files a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_lab_furnace_bottom.png and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_lab_furnace_bottom.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_lab_furnace_front.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_lab_furnace_front.png index 218c945..4185ff0 100644 Binary files a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_lab_furnace_front.png and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_lab_furnace_front.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_lab_furnace_front_gloom_off.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_lab_furnace_front_gloom_off.png index cd9ac94..481f72d 100644 Binary files a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_lab_furnace_front_gloom_off.png and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_lab_furnace_front_gloom_off.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_lab_furnace_front_gloom_on.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_lab_furnace_front_gloom_on.png index 8bcef55..02da036 100644 Binary files a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_lab_furnace_front_gloom_on.png and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_lab_furnace_front_gloom_on.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_lab_furnace_handles.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_lab_furnace_handles.png index 9698805..1998de0 100644 Binary files a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_lab_furnace_handles.png and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_lab_furnace_handles.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_lab_furnace_left.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_lab_furnace_left.png index 14c1b1b..039f719 100644 Binary files a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_lab_furnace_left.png and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_lab_furnace_left.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_lab_furnace_right.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_lab_furnace_right.png index 95dd1c1..5c417d5 100644 Binary files a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_lab_furnace_right.png and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_lab_furnace_right.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_lab_furnace_top.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_lab_furnace_top.png index 391188d..d711b45 100644 Binary files a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_lab_furnace_top.png and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/furnace/small_lab_furnace_top.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/glass/window_glass_texture-orig.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/glass/window_glass_texture-orig.png deleted file mode 100644 index 4281eaf..0000000 Binary files a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/glass/window_glass_texture-orig.png and /dev/null differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/hsupport/steel_double_t_support_end_texture.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/hsupport/steel_double_t_support_end_texture.png new file mode 100644 index 0000000..db9e940 Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/hsupport/steel_double_t_support_end_texture.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/hsupport/steel_double_t_support_side_texture.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/hsupport/steel_double_t_support_side_texture.png new file mode 100644 index 0000000..db55c56 Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/hsupport/steel_double_t_support_side_texture.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/hsupport/steel_double_t_support_top_texture.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/hsupport/steel_double_t_support_top_texture.png new file mode 100644 index 0000000..3d928b5 Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/hsupport/steel_double_t_support_top_texture.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pipe/passive_fluid_accumulator_back_texture.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pipe/passive_fluid_accumulator_back_texture.png new file mode 100644 index 0000000..2d9fcd6 Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pipe/passive_fluid_accumulator_back_texture.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pipe/passive_fluid_accumulator_front_texture.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pipe/passive_fluid_accumulator_front_texture.png new file mode 100644 index 0000000..1cf9adf Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pipe/passive_fluid_accumulator_front_texture.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pipe/passive_fluid_accumulator_side_texture.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pipe/passive_fluid_accumulator_side_texture.png new file mode 100644 index 0000000..a1daa3b Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pipe/passive_fluid_accumulator_side_texture.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pipe/straight_pipe_valve_end_texture.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pipe/straight_pipe_valve_end_texture.png new file mode 100644 index 0000000..45081f0 Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pipe/straight_pipe_valve_end_texture.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pipe/straight_pipe_valve_side_redstone_analog_texture.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pipe/straight_pipe_valve_side_redstone_analog_texture.png new file mode 100644 index 0000000..f0c34e6 Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pipe/straight_pipe_valve_side_redstone_analog_texture.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pipe/straight_pipe_valve_side_redstone_cn_texture.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pipe/straight_pipe_valve_side_redstone_cn_texture.png new file mode 100644 index 0000000..d8d7dfc Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pipe/straight_pipe_valve_side_redstone_cn_texture.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pipe/straight_pipe_valve_side_redstone_texture.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pipe/straight_pipe_valve_side_redstone_texture.png new file mode 100644 index 0000000..0418660 Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pipe/straight_pipe_valve_side_redstone_texture.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pipe/straight_pipe_valve_side_texture.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pipe/straight_pipe_valve_side_texture.png new file mode 100644 index 0000000..66db297 Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pipe/straight_pipe_valve_side_texture.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pole/thick_steel_pole_side_texture.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pole/thick_steel_pole_side_texture.png new file mode 100644 index 0000000..ebd2abc Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pole/thick_steel_pole_side_texture.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pole/thick_steel_pole_top_texture.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pole/thick_steel_pole_top_texture.png new file mode 100644 index 0000000..a5f670c Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pole/thick_steel_pole_top_texture.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pole/thin_steel_pole_side_texture.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pole/thin_steel_pole_side_texture.png new file mode 100644 index 0000000..773c4b9 Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pole/thin_steel_pole_side_texture.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pole/thin_steel_pole_top_texture.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pole/thin_steel_pole_top_texture.png new file mode 100644 index 0000000..8a14fa4 Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pole/thin_steel_pole_top_texture.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pole/treated_wood_pole_side_texture.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pole/treated_wood_pole_side_texture.png index 533f852..478d321 100644 Binary files a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pole/treated_wood_pole_side_texture.png and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pole/treated_wood_pole_side_texture.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pole/treated_wood_pole_top_texture.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pole/treated_wood_pole_top_texture.png index 4605187..33a66c4 100644 Binary files a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pole/treated_wood_pole_top_texture.png and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/pole/treated_wood_pole_top_texture.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/slag_brick/slag_brick_wall.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/slag_brick/slag_brick_wall0.png similarity index 100% rename from 1.12/src/main/resources/assets/engineersdecor/textures/blocks/slag_brick/slag_brick_wall.png rename to 1.12/src/main/resources/assets/engineersdecor/textures/blocks/slag_brick/slag_brick_wall0.png diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/slag_brick/slag_brick_wall1.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/slag_brick/slag_brick_wall1.png new file mode 100644 index 0000000..22ea4b1 Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/slag_brick/slag_brick_wall1.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/slag_brick/slag_brick_wall2.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/slag_brick/slag_brick_wall2.png new file mode 100644 index 0000000..02c3469 Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/slag_brick/slag_brick_wall2.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/slag_brick/slag_brick_wall3.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/slag_brick/slag_brick_wall3.png new file mode 100644 index 0000000..2cf3bd2 Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/slag_brick/slag_brick_wall3.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/slag_brick/slag_brick_wall4.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/slag_brick/slag_brick_wall4.png new file mode 100644 index 0000000..f53b2be Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/slag_brick/slag_brick_wall4.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/slag_brick/slag_brick_wall5.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/slag_brick/slag_brick_wall5.png new file mode 100644 index 0000000..8d30e34 Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/slag_brick/slag_brick_wall5.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/slag_brick/slag_brick_wall6.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/slag_brick/slag_brick_wall6.png new file mode 100644 index 0000000..c8f210f Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/slag_brick/slag_brick_wall6.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/blocks/slag_brick/slag_brick_wall7.png b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/slag_brick/slag_brick_wall7.png new file mode 100644 index 0000000..4b38037 Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/blocks/slag_brick/slag_brick_wall7.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/gui/small_electrical_furnace_gui.png b/1.12/src/main/resources/assets/engineersdecor/textures/gui/small_electrical_furnace_gui.png new file mode 100644 index 0000000..0177a21 Binary files /dev/null and b/1.12/src/main/resources/assets/engineersdecor/textures/gui/small_electrical_furnace_gui.png differ diff --git a/1.12/src/main/resources/assets/engineersdecor/textures/gui/treated_wood_crafting_table.png b/1.12/src/main/resources/assets/engineersdecor/textures/gui/treated_wood_crafting_table.png index 58d1131..bc26abf 100644 Binary files a/1.12/src/main/resources/assets/engineersdecor/textures/gui/treated_wood_crafting_table.png and b/1.12/src/main/resources/assets/engineersdecor/textures/gui/treated_wood_crafting_table.png differ diff --git a/1.13/readme.md b/1.13/readme.md index cb5bbe3..3ec0707 100644 --- a/1.13/readme.md +++ b/1.13/readme.md @@ -10,7 +10,15 @@ Mod sources for Minecraft version 1.13.2. ---- ## Revision history - ~ v1.0.2-b4 [A] + - v1.0.4-b3 [V] Version assignment: All features of v1.0.4-b3-1.12.2 that can be ported + to 1.13.2 implemented/prepared, therefore version re-iterated. + [A] Lab furnace ported to 1.13. + [A] Treated wood crafting table: Added crafting table history/quick craft. + [A] Treated wood stool: Sitting on the stool implemented. + [A] Steel poles (thick/thin) with support heads/foots added. + [E] Prepared position dependent texture variation for walls (clinker, slag, rebar concrete), + missing one forge feature yet for completion. + [E] Prepared multi-layer rendering for windows, needs forge feature implementation. - v1.0.2-b3 [A] Added treated wood window. [A] Added treated wood pole support. @@ -19,16 +27,13 @@ Mod sources for Minecraft version 1.13.2. - v1.0.2-b2 [A] Added wall decomposition recipes. [A] Added slag brick wall. - [M] Climbing/descending mod ladders is faster when - looking up or down and not sneaking. + [M] Climbing/descending mod ladders is faster when looking up or down and not sneaking. [M] Panzer glass material definition changed. - v1.0.2-b1 [A] Added Treated wood crafting table. [A] Added decomposition recipes for stairs and tiles. - [N] Note: All v1.0.2-b1-mc1.12.2 blocks are - ported to 1.13.2 (alpha -^ beta version). - [N] Note: Until IE is out for 1.13.2, the - recipes are temporary with vanilla items. + [N] Note: All v1.0.2-b1-mc1.12.2 blocks are ported to 1.13.2 (alpha -^ beta version). + [N] Note: Until IE is out for 1.13.2, the recipes are temporary with vanilla items. - v1.0.0-a3 [A] Added iron inset light. [A] Added rebar concrete tile. diff --git a/credits.md b/credits.md index c0bfab6..69da9b2 100644 --- a/credits.md +++ b/credits.md @@ -22,3 +22,10 @@ IE components used in this mod: reported bailouts if IE is not installed, local path in the mod is "engineersdecor:blocks/iestyle/stone_decoration_concrete_by_blusunrize", used in block "engineersdecor:concrete_wall". + + - immersiveengineering:textures/block/metal_device1_fluid_pipe.png (for + valves). + +Source codes derived (inspected e.g. for trouble shooting and learning how things work): + + - Ore dict based recipe registration from blusunrize.immersiveengineering.common.IERecipes. diff --git a/documentation/engineers-decor-v101a-craftinggui.png b/documentation/engineers-decor-v101a-craftinggui.png deleted file mode 100644 index 117c70e..0000000 Binary files a/documentation/engineers-decor-v101a-craftinggui.png and /dev/null differ diff --git a/documentation/engineers-decor-v104a-craftinggui.png b/documentation/engineers-decor-v104a-craftinggui.png new file mode 100644 index 0000000..ebbab10 Binary files /dev/null and b/documentation/engineers-decor-v104a-craftinggui.png differ diff --git a/meta/update.json b/meta/update.json index c718205..b0a040d 100644 --- a/meta/update.json +++ b/meta/update.json @@ -1,6 +1,16 @@ { "homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/", "1.12.2": { + "1.0.4": "[R] Release based on v1.0.3-b9. Release-to-release changes: * Crafting table: Quick crafting history re-fab, JEI integration. * Rendering improvements and issue fixes (stairs, ambient occlusion, optifine, etc). * Walls with texture variations. * Thin/thick steel poles with support feet/heads. * Horizontal steel double-T support beams added. * Fluid pipe valves added: Check valve, redstone controlled valve, analog redstone controlled valve. Support pressuzized transfer. * Tooltip documentation (CTRL-SHIFT) for stairs added. * Internal code cleanups. * Recipes tuned.\n[E] Added pass-through electrical furnace (experimental, see config).", + "1.0.4-b9": "[F] Inserting fluids with pressurized tag only into IE piping.\n[F] Valve redstone connector rendering does not check for \"can connect redstone\" but only for \"can provide power\".\n[M] Valves are adapted to be detected as pipe by IE.", + "1.0.4-b8": "[F] Fixed stairs rendering without smooth light (thanks rastot9).\n[E] Added passive fluid accumulator (experimental feature, see config).", + "1.0.4-b7": "[F] Fixed recipe loading issue if IE is not installed.\n[M] Valves support IE pressurized fluid transfer.", + "1.0.4-b6": "[A] Added redstone controlled fluid valve.\n[A] Added redstone controlled analog fluid valve.\n[M] Check valve recipe adapted (thanks majijn).", + "1.0.4-b5": "[A] Horizontal steel double-T support beam with pole connections.\n[A] Added fluid pipe check valve (straight, conducts only one way).\n[M] Internal registration block/te handling changed.", + "1.0.4-b4": "[F] Clinker/slag brick wall side cullfacing disabled to prevent texture leaks when connecting to concrete walls.\n[F] Unused treated wood pole texture regions filled (optifine).\n[F] Using mipped cutout format for window multi-layer model (issue #19, thanks rixmswey for reporting and details).\n[M] Recipe tuning, added standalone recipe for all mod blocks.\n[M] In-game CTRL-SHIFT tooltip documentation updated.\n[M] Panzer glass block: Ambient occlusion and light opacity tuned.\n[M] Stairs: Light opacity tuned.\n[A] Tooltip documentation added for mod stairs.\n[E] Horizontal steel double-T support beam (config:experimental).", + "1.0.4-b3": "[A] Added thin (4x4x16) and thick (6x6x16) steel hollow poles.\n[A] Added support head/foot components for thin and thick steel poles.", + "1.0.4-b2": "[A] Added position dependent texture variation to clinker wall, slag brick wall and rebar concrete wall.", + "1.0.4-b1": "[A] Crafting table: JEI integration for recipe placement added.\n[A] Crafting table: History re-fab added, allowing to quickly select and re-craft recent recipes. Selection with arrow buttons, ingredient placement by clicking the result slot. Automatic item distribution on shift-click. Quick-move buttons.\n[F] Crafting table textures modified to prevent optifine glitches on the edges of the legs.", "1.0.3": "[R] Release based on v1.0.3-b5. Release-to-release changes: * Small laboratory furnace added. * Extensive config options for mod packing and tuning added. * Rendering issues fixes (window bleeding, optifine). * Steel framed window added. * Treated wood pole \"end pieces\" added (two support variants). * Sitting on treated wood stool added including mobs (but not villagers, as these are obviously very upright people). * Lang ru_ru added (github contribution from Yaroslavik). * Creative tab logo changed to mod logo. * Table/crafting table bounding boxes refined. * Standalone \"escape\" recipes added if IE is not installed.", "1.0.3-b5": "[F] Fixed typo in en-en lang file.\n[F] Fixed IE concrete texture missing bailout in log if IE is not installed.\n[F] Using forge multi-layer models for windows to circumvent glitches.\n[M] Changed creative tab logo to the mod logo.\n[A] Added alternative recipes for crafting table and furnace if main IE ingredients are missing (for \"stand-alone\" mod usage).", "1.0.3-b4": "[A] Lab furnace supports electrical speedup when a IE external is placed in one of the two auxiliary slots.\n[F] Fixed window rendering issue (issue #15, thanks to ILLOMIURGE).\n[M] Updated ru_ru lang file (Yaroslavik).", @@ -23,6 +33,7 @@ "1.0.0-b1": "[A] Initial structure.\n[A] Added clinker bricks and clinker brick stairs.\n[A] Added slag bricks and slag brick stairs.\n[A] Added metal rung ladder.\n[A] Added staggered metal steps ladder.\n[A] Added treated wood ladder.\n[A] Added treated wood pole.\n[A] Added treated wood table." }, "1.13.2": { + "1.0.4-b3": "[V] Version assignment: All features of v1.0.4-b3-1.12.2 that can be ported to 1.13.2 implemented/prepared, therefore version re-iterated.\n[A] Lab furnace ported to 1.13.\n[A] Treated wood crafting table: Added crafting table history/quick craft.\n[A] Treated wood stool: Sitting on the stool implemented.\n[A] Steel poles (thick/thin) with support heads/foots added.\n[E] Prepared position dependent texture variation for walls (clinker, slag, rebar concrete), missing one forge feature yet for completion.\n[E] Prepared multi-layer rendering for windows, needs forge feature implementation.", "1.0.2-b3": "[A] Added treated wood window.\n[A] Added treated wood pole support.\n[A] Added treated wood pole head.\n[A] Added steel framed window.", "1.0.2-b2": "[A] Added wall decomposition recipes.\n[A] Added slag brick wall.\n[M] Climbing/descending mod ladders is faster when looking up or down and not sneaking.\n[M] Panzer glass material definition changed.", "1.0.2-b1": "[A] Added Treated wood crafting table.\n[A] Added decomposition recipes for stairs and tiles.\n[N] Note: All v1.0.2-b1-mc1.12.2 blocks are ported to 1.13.2 (alpha -^ beta version).\n[N] Note: Until IE is out for 1.13.2, the recipes are temporary with vanilla items.", @@ -31,9 +42,9 @@ "1.0.0-a1": "[A] Initial port to 1.13.2 with Forge beta." }, "promos": { - "1.12.2-recommended": "1.0.3", - "1.12.2-latest": "1.0.3", + "1.12.2-recommended": "1.0.4", + "1.12.2-latest": "1.0.4", "1.13.2-recommended": "", - "1.13.2-latest": "1.0.2-b3" + "1.13.2-latest": "1.0.4-b3" } } \ No newline at end of file diff --git a/readme.md b/readme.md index a454d5e..2e23713 100644 --- a/readme.md +++ b/readme.md @@ -17,8 +17,7 @@ Main distribution channel for this mod is CurseForge: ---- ### Details -The mod has its focus on non-functional, decorative blocks. If anyhow possible, -no tile entities or user interactions are used. Current feature set: +The mod has its focus decorative blocks. Current feature set: - *Treated wood crafting table*: 3x3 crafting table with IE style GUI and a model fitting better in the engineer's workshop. Keeps its inventory, has eight additional @@ -80,10 +79,23 @@ no tile entities or user interactions are used. Current feature set: Can be used e.g. for structural support or wire relay post, where the height of the IE wire posts does not match. +- *Thin and thick steel support poles*: Hollow steel pole fragments, can be + placed in all directions. Also with head/food end components. Thin poles crafted + 3x3 from three steel ingots (output 12), thick poles crafted 3x3 from six thin + steel poles. + +- *Double-T steel support*: Horizontal top-aligned support beam, placed in the + direction you look. Auto connects to adjacent beams if facing towards them. Auto + connects to steel poles underneath. Crafted 3x3 from thin steel poles in a T-shape + (output: 6 beams). + - *Inset spot light*: Small metal framed glowstone based light source for ceiling, wall, or floor. Light level like a torch. Thin, hence not blocking the way. Allows illuminating places where electrical light installations are problematic. +- *Fluid pipe check valve*: IE fluid pipe styled straight valve that conducts fluids + only in one direction. Crafted from 3x3 from three fluid pipes. + More to come slowly but steadily. ---- @@ -138,6 +150,8 @@ Mods covering similar features, or may fit well together with IE and the decorat ![Concrete](documentation/engineers-decor-v100a-concrete-stuff.png) -![Concrete](documentation/engineers-decor-v101a-summary.png) +![v1.0.1 summary](documentation/engineers-decor-v101a-summary.png) -![Concrete](documentation/engineers-decor-v101a-craftinggui.png) +![Crafting table GUI](documentation/engineers-decor-v104a-craftinggui.png) + +![Lab furnace GUI](documentation/engineers-decor-v103-labfurnacegui.png)