Added small lab furnace. 1.13 build system setup WIP.
|
@ -3,7 +3,7 @@ org.gradle.daemon=false
|
|||
org.gradle.jvmargs=-Xmx8G
|
||||
version_minecraft=1.12.2
|
||||
version_forge=14.23.5.2768
|
||||
version_engineersdecor=1.0.2
|
||||
version_engineersdecor=1.0.3-b1
|
||||
#
|
||||
# jar signing data loaded from signing.properties in the project root.
|
||||
#
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/",
|
||||
"1.12.2": {
|
||||
"1.0.3-b1": "[A] Added small laboratry furnace.\n[M] Panzer glass opacity/light level set explicitly 0.",
|
||||
"1.0.2": "[R] Release based on v1.0.2-b3 * Fixes: Spawning. * Crafting table: Shift-click. * Ladders: Faster climbing/descending. * Concrete: Rebar tiles, tile stairs. * Treated wood: window, windowsill. * Slag brick: wall. * Panzer glass: added. * Recipes: Adaptions, added decompositions.",
|
||||
"1.0.2-b3": "[A] Added slag brick wall.\n[A] Added wall decomposition recipes.\n[A] Added treated wood window.\n[M] Climbing/descending mod ladders is faster when looking up or down and not sneaking.\n[M] Panzer glass material definition changed.\n[M] Explicitly preventing spawning in and on \"non-full\" blocks of the mod.",
|
||||
"1.0.2-b2": "[A] Added rebar concrete tile stairs.\n[A] Added treated wood window sill.\n[A] Added decomposition recipes for stairs and tiles.\n[M] Changed stair recipe yield quantity from 9 to 6.",
|
||||
|
@ -18,6 +19,6 @@
|
|||
},
|
||||
"promos": {
|
||||
"1.12.2-recommended": "1.0.2",
|
||||
"1.12.2-latest": "1.0.2"
|
||||
"1.12.2-latest": "1.0.3-b1"
|
||||
}
|
||||
}
|
|
@ -10,6 +10,9 @@ Mod sources for Minecraft version 1.12.2.
|
|||
----
|
||||
## Revision history
|
||||
|
||||
- v1.0.3-b1 [A] Added small laboratry furnace.
|
||||
[M] Panzer glass opacity/light level set explicitly 0.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
- v1.0.2 [R] Release based on v1.0.2-b3
|
||||
* Fixes: Spawning.
|
||||
|
|
|
@ -18,6 +18,7 @@ import net.minecraftforge.event.entity.living.LivingEvent;
|
|||
import net.minecraftforge.fml.common.network.IGuiHandler;
|
||||
import net.minecraftforge.fml.common.network.NetworkRegistry;
|
||||
import wile.engineersdecor.blocks.BlockDecorCraftingTable;
|
||||
import wile.engineersdecor.blocks.BlockDecorFurnace;
|
||||
import wile.engineersdecor.blocks.BlockDecorLadder;
|
||||
import wile.engineersdecor.detail.ModConfig;
|
||||
import wile.engineersdecor.blocks.ModBlocks;
|
||||
|
@ -123,6 +124,7 @@ public class ModEngineersDecor
|
|||
public static final class GuiHandler implements IGuiHandler
|
||||
{
|
||||
public static final int GUIID_CRAFTING_TABLE = 213101;
|
||||
public static final int GUIID_SMALL_LAB_FURNACE = 213102;
|
||||
|
||||
@Override
|
||||
public Object getServerGuiElement(final int guiid, final EntityPlayer player, final World world, int x, int y, int z)
|
||||
|
@ -131,6 +133,7 @@ public class ModEngineersDecor
|
|||
final TileEntity te = world.getTileEntity(pos);
|
||||
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);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -143,6 +146,7 @@ public class ModEngineersDecor
|
|||
final TileEntity te = (world instanceof WorldClient) ? world.getTileEntity(pos) : null;
|
||||
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);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -50,6 +50,7 @@ public class BlockDecor extends Block
|
|||
public static final long CFG_TRANSLUCENT = 0x0000000000000040L; // 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 BlockDecor(@Nonnull String registryName, long config, @Nullable Material material, float hardness, float resistance, @Nullable SoundType sound)
|
||||
{
|
||||
|
|
|
@ -134,16 +134,16 @@ public class BlockDecorCraftingTable extends BlockDecorDirected
|
|||
{ 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 BGuiCrafting(player.inventory, world, pos, (BTileEntity)te)) : null; }
|
||||
{ return (te instanceof BTileEntity) ? (new BGui(player.inventory, world, pos, (BTileEntity)te)) : null; }
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
// GUI
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static class BGuiCrafting extends GuiContainer
|
||||
private static class BGui extends GuiContainer
|
||||
{
|
||||
public BGuiCrafting(InventoryPlayer playerInventory, World world, BlockPos pos, BTileEntity te)
|
||||
public BGui(InventoryPlayer playerInventory, World world, BlockPos pos, BTileEntity te)
|
||||
{ super(new BContainer(playerInventory, world, pos, te)); }
|
||||
|
||||
@Override
|
||||
|
@ -171,7 +171,7 @@ public class BlockDecorCraftingTable extends BlockDecorDirected
|
|||
// Crafting container
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
public static class BContainer extends Container
|
||||
private static class BContainer extends Container
|
||||
{
|
||||
private final World world;
|
||||
private final BlockPos pos;
|
||||
|
@ -282,7 +282,7 @@ public class BlockDecorCraftingTable extends BlockDecorDirected
|
|||
// Crafting inventory (needed to allow SlotCrafting to have a InventoryCrafting)
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
public static class BInventoryCrafting extends InventoryCrafting
|
||||
private static class BInventoryCrafting extends InventoryCrafting
|
||||
{
|
||||
protected final Container container;
|
||||
protected final IInventory inventory;
|
||||
|
|
|
@ -0,0 +1,749 @@
|
|||
/*
|
||||
* @file BlockFurnace.java
|
||||
* @author Stefan Wilhelm (wile)
|
||||
* @copyright (C) 2019 Stefan Wilhelm
|
||||
* @license MIT (see https://opensource.org/licenses/MIT)
|
||||
*
|
||||
* ED Lab furnace.
|
||||
*/
|
||||
package wile.engineersdecor.blocks;
|
||||
|
||||
import net.minecraft.init.SoundEvents;
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
import net.minecraft.stats.StatList;
|
||||
import net.minecraft.block.properties.PropertyBool;
|
||||
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.world.World;
|
||||
import net.minecraft.world.Explosion;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
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.Items;
|
||||
import net.minecraft.item.*;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
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.text.ITextComponent;
|
||||
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.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 javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Random;
|
||||
|
||||
|
||||
public class BlockDecorFurnace extends BlockDecorDirected
|
||||
{
|
||||
public static final PropertyBool LIT = PropertyBool.create("lit");
|
||||
|
||||
public BlockDecorFurnace(@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);
|
||||
setLightOpacity(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BlockStateContainer createBlockState()
|
||||
{ return new BlockStateContainer(this, FACING, LIT); }
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta)
|
||||
{ return getDefaultState().withProperty(FACING, EnumFacing.byHorizontalIndex(meta & 0x3)).withProperty(LIT, (meta & 0x4)!=0); }
|
||||
|
||||
@Override
|
||||
public int getMetaFromState(IBlockState state)
|
||||
{ return (state.getValue(FACING).getHorizontalIndex() & 0x3) | (state.getValue(LIT) ? 4 : 0); }
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
|
||||
{ return getDefaultState().withProperty(FACING, placer.getHorizontalFacing().getOpposite()).withProperty(LIT, false); }
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean hasComparatorInputOverride(IBlockState state)
|
||||
{ return true; }
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public int getComparatorInputOverride(IBlockState blockState, World world, BlockPos pos)
|
||||
{ return Container.calcRedstone(world.getTileEntity(pos)); }
|
||||
|
||||
@Override
|
||||
public boolean hasTileEntity(IBlockState state)
|
||||
{ return true; }
|
||||
|
||||
@Nullable
|
||||
public TileEntity createTileEntity(World world, IBlockState state)
|
||||
{ return new BlockDecorFurnace.BTileEntity(); }
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
|
||||
{
|
||||
if(world.isRemote) return;
|
||||
if((!stack.hasTagCompound()) || (!stack.getTagCompound().hasKey("inventory"))) return;
|
||||
NBTTagCompound inventory_nbt = stack.getTagCompound().getCompoundTag("inventory");
|
||||
if(inventory_nbt.isEmpty()) return;
|
||||
final TileEntity te = world.getTileEntity(pos);
|
||||
if(!(te instanceof BTileEntity)) return;
|
||||
((BTileEntity)te).readnbt(inventory_nbt);
|
||||
((BTileEntity)te).markDirty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removedByPlayer(IBlockState state, World world, BlockPos pos, EntityPlayer player, boolean willHarvest)
|
||||
{
|
||||
if(world.isRemote) return true;
|
||||
TileEntity te = world.getTileEntity(pos);
|
||||
if(!(te instanceof BTileEntity)) return super.removedByPlayer(state, world, pos, player, willHarvest);
|
||||
ItemStack stack = new ItemStack(this, 1);
|
||||
NBTTagCompound inventory_nbt = new NBTTagCompound();
|
||||
ItemStackHelper.saveAllItems(inventory_nbt, ((BTileEntity)te).stacks_, false);
|
||||
if(!inventory_nbt.isEmpty()) {
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
nbt.setTag("inventory", inventory_nbt);
|
||||
stack.setTagCompound(nbt);
|
||||
}
|
||||
world.spawnEntity(new EntityItem(world, pos.getX()+0.5, pos.getY()+0.5, pos.getZ()+0.5, stack));
|
||||
world.setBlockToAir(pos);
|
||||
world.removeTileEntity(pos);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockExploded(World world, BlockPos pos, Explosion explosion)
|
||||
{
|
||||
if(world.isRemote) return;
|
||||
TileEntity te = world.getTileEntity(pos);
|
||||
if(!(te instanceof BTileEntity)) return;
|
||||
for(ItemStack stack: ((BTileEntity)te).stacks_) {
|
||||
if(!stack.isEmpty()) world.spawnEntity(new EntityItem(world, pos.getX(), pos.getY(), pos.getZ(), stack));
|
||||
}
|
||||
((BTileEntity)te).reset();
|
||||
super.onBlockExploded(world, pos, explosion);
|
||||
}
|
||||
|
||||
@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_SMALL_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)
|
||||
{
|
||||
if((state.getBlock()!=this) || (!state.getValue(LIT))) return;
|
||||
final double rv = rnd.nextDouble();
|
||||
if(rv > 0.5) return;
|
||||
final double x=0.5+pos.getX(), y=0.5+pos.getY(), z=0.5+pos.getZ();
|
||||
final double xc=0.52, xr=rnd.nextDouble()*0.4-0.2, yr=(y-0.3+rnd.nextDouble()*0.2);
|
||||
if(rv < 0.1d) world.playSound(x, y, z, SoundEvents.BLOCK_FURNACE_FIRE_CRACKLE, SoundCategory.BLOCKS, 0.4f, 0.5f, false);
|
||||
switch(state.getValue(FACING)) {
|
||||
case WEST: world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, x-xc, yr, z+xr, 0.0, 0.0, 0.0); break;
|
||||
case EAST: world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, x+xc, yr, z+xr, 0.0, 0.0, 0.0); break;
|
||||
case NORTH: world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, x+xr, yr, z-xc, 0.0, 0.0, 0.0); break;
|
||||
default: world.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, x+xr, yr, z+xc, 0.0, 0.0, 0.0); break;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
// 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_lab_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)) {
|
||||
final int k = flame_px(13);
|
||||
drawTexturedModalRect(x0+59, y0+36+12-k, 176, 12-k, 14, k+1);
|
||||
}
|
||||
drawTexturedModalRect(x0+79, y0+36, 176, 15, 1+progress_px(17), 15);
|
||||
}
|
||||
|
||||
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 flame_px(int pixels)
|
||||
{ int ibt = te.getField(1); return ((te.getField(0) * pixels) / ((ibt>0) ? (ibt) : (te.proc_speed_interval_))); }
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
// container slots
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
public static class BSlotInpFifo extends Slot
|
||||
{
|
||||
public BSlotInpFifo(IInventory inv, int index, int xpos, int ypos)
|
||||
{ super(inv, index, xpos, ypos); }
|
||||
}
|
||||
|
||||
public static class BSlotFuelFifo extends Slot
|
||||
{
|
||||
public BSlotFuelFifo(IInventory inv, int index, int xpos, int ypos)
|
||||
{ super(inv, index, xpos, ypos); }
|
||||
}
|
||||
|
||||
public static class BSlotOutFifo extends SlotFurnaceOutput
|
||||
{
|
||||
public BSlotOutFifo(EntityPlayer player, BTileEntity te, int index, int xpos, int ypos)
|
||||
{ super(player, te, index, xpos, ypos); }
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
// container
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
public static class BContainer extends Container
|
||||
{
|
||||
private static final int PLAYER_INV_START_SLOTNO = 11;
|
||||
private final World world;
|
||||
private final BlockPos pos;
|
||||
private final EntityPlayer player;
|
||||
private final BTileEntity te;
|
||||
private int proc_time_elapsed_;
|
||||
private int burntime_left_;
|
||||
private int fuel_burntime_;
|
||||
private int proc_time_needed_;
|
||||
|
||||
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, 17)); // smelting input
|
||||
addSlotToContainer(new SlotFurnaceFuel(te, 1, 59, 53)); // fuel
|
||||
addSlotToContainer(new SlotFurnaceOutput(playerInventory.player, te, 2, 101, 35)); // smelting result
|
||||
addSlotToContainer(new BSlotInpFifo(te, 3, 34, 17)); // input fifo 0
|
||||
addSlotToContainer(new BSlotInpFifo(te, 4, 16, 17)); // input fifo 1
|
||||
addSlotToContainer(new BSlotFuelFifo(te, 5, 34, 53)); // fuel fifo 0
|
||||
addSlotToContainer(new BSlotFuelFifo(te, 6, 16, 53)); // fuel fifo 1
|
||||
addSlotToContainer(new BSlotOutFifo(playerInventory.player, te, 7, 126, 35)); // out fifo 0
|
||||
addSlotToContainer(new BSlotOutFifo(playerInventory.player, te, 8, 144, 35)); // out fifo 1
|
||||
addSlotToContainer(new Slot(te, 9, 126, 61)); // aux slot 1
|
||||
addSlotToContainer(new Slot(te, 10, 144, 61)); // aux slot 2
|
||||
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<listeners.size(); ++i) {
|
||||
IContainerListener lis = listeners.get(i);
|
||||
if(proc_time_elapsed_ != te.getField(2)) lis.sendWindowProperty(this, 2, te.getField(2));
|
||||
if(burntime_left_ != te.getField(0)) lis.sendWindowProperty(this, 0, te.getField(0));
|
||||
if(fuel_burntime_ != te.getField(1)) lis.sendWindowProperty(this, 1, te.getField(1));
|
||||
if(proc_time_needed_ != te.getField(3)) lis.sendWindowProperty(this, 3, te.getField(3));
|
||||
}
|
||||
proc_time_elapsed_ = te.getField(2);
|
||||
burntime_left_ = te.getField(0);
|
||||
fuel_burntime_ = te.getField(1);
|
||||
proc_time_needed_ = te.getField(3);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void updateProgressBar(int id, int data)
|
||||
{ te.setField(id, data); }
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player)
|
||||
{ return (world.getBlockState(pos).getBlock() instanceof BlockDecorFurnace) && (player.getDistanceSq(pos) <= 64); }
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int index)
|
||||
{
|
||||
Slot slot = inventorySlots.get(index);
|
||||
if((slot==null) || (!slot.getHasStack())) return ItemStack.EMPTY;
|
||||
ItemStack slot_stack = slot.getStack();
|
||||
ItemStack transferred = slot_stack.copy();
|
||||
if((index==2) || (index==7) || (index==8)) {
|
||||
// Output slots
|
||||
if(!mergeItemStack(slot_stack, PLAYER_INV_START_SLOTNO, PLAYER_INV_START_SLOTNO+36, true)) return ItemStack.EMPTY;
|
||||
slot.onSlotChange(slot_stack, transferred);
|
||||
} else if((index==0) || (index==3) || (index==4)) {
|
||||
// Input slots
|
||||
if(!mergeItemStack(slot_stack, PLAYER_INV_START_SLOTNO, PLAYER_INV_START_SLOTNO+36, false)) return ItemStack.EMPTY;
|
||||
} else if((index==1) || (index==5) || (index==6)) {
|
||||
// Fuel slots
|
||||
if(!mergeItemStack(slot_stack, PLAYER_INV_START_SLOTNO, PLAYER_INV_START_SLOTNO+36, false)) return ItemStack.EMPTY;
|
||||
} else if((index==9) || (index==10)) {
|
||||
if(!mergeItemStack(slot_stack, PLAYER_INV_START_SLOTNO, PLAYER_INV_START_SLOTNO+36, false)) return ItemStack.EMPTY;
|
||||
} else if((index >= PLAYER_INV_START_SLOTNO) && (index <= PLAYER_INV_START_SLOTNO+36)) {
|
||||
// Player inventory
|
||||
if(!FurnaceRecipes.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(TileEntityFurnace.isItemFuel(slot_stack)) {
|
||||
if(
|
||||
(!mergeItemStack(slot_stack, 1, 2, false)) && // fuel input
|
||||
(!mergeItemStack(slot_stack, 5, 6, false)) && // fuel fifo0
|
||||
(!mergeItemStack(slot_stack, 6, 7, false)) // fuel 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 TileEntity implements ITickable, ISidedInventory
|
||||
{
|
||||
public static final int TICK_INTERVAL = 4;
|
||||
public static final int FIFO_INTERVAL = 20;
|
||||
public static final int MAX_BURNTIME = 0x7fff;
|
||||
public static final int VANILLA_FURNACE_SPEED_INTERVAL = 200;
|
||||
public static final int DEFAULT_SPEED_INTERVAL = 150;
|
||||
public static final int NUM_OF_SLOTS = 11;
|
||||
public static final int SMELTING_INPUT_SLOT_NO = 0;
|
||||
public static final int SMELTING_FUEL_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_FUEL_0_SLOT_NO = 5;
|
||||
public static final int FIFO_FUEL_1_SLOT_NO = 6;
|
||||
public static final int FIFO_OUTPUT_0_SLOT_NO = 7;
|
||||
public static final int FIFO_OUTPUT_1_SLOT_NO = 8;
|
||||
public static final int AUX_0_SLOT_NO = 9;
|
||||
public static final int AUX_1_SLOT_NO =10;
|
||||
|
||||
private static final int[] SLOTS_TOP = new int[] {FIFO_INPUT_1_SLOT_NO};
|
||||
private static final int[] SLOTS_BOTTOM = new int[] {FIFO_OUTPUT_1_SLOT_NO};
|
||||
private static final int[] SLOTS_SIDES = new int[] {FIFO_FUEL_1_SLOT_NO};
|
||||
private final IItemHandler sided_itemhandler_top_ = new SidedInvWrapper(this, EnumFacing.UP);
|
||||
private final IItemHandler sided_itemhandler_down_ = new SidedInvWrapper(this, EnumFacing.DOWN);
|
||||
private final IItemHandler sided_itemhandler_sides_ = new SidedInvWrapper(this, EnumFacing.WEST);
|
||||
|
||||
private int tick_timer_;
|
||||
private int fifo_timer_;
|
||||
private int burntime_left_;
|
||||
private int fuel_burntime_;
|
||||
private int proc_time_elapsed_;
|
||||
private int proc_time_needed_;
|
||||
private int proc_speed_interval_;
|
||||
private NonNullList<ItemStack> stacks_;
|
||||
|
||||
public BTileEntity()
|
||||
{ reset(); }
|
||||
|
||||
public void reset()
|
||||
{
|
||||
stacks_ = NonNullList.<ItemStack>withSize(NUM_OF_SLOTS, ItemStack.EMPTY);
|
||||
proc_speed_interval_ = DEFAULT_SPEED_INTERVAL;
|
||||
proc_time_elapsed_ = 0;
|
||||
proc_time_needed_ = 0;
|
||||
burntime_left_ = 0;
|
||||
fuel_burntime_ = 0;
|
||||
fifo_timer_ = 0;
|
||||
tick_timer_ = 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");
|
||||
fuel_burntime_ = getItemBurnTime(stacks_.get(SMELTING_FUEL_SLOT_NO));
|
||||
}
|
||||
|
||||
private 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));
|
||||
compound.setInteger("CookTimeTotal", MathHelper.clamp(proc_time_needed_, 0, MAX_BURNTIME));
|
||||
ItemStackHelper.saveAllItems(compound, stacks_);
|
||||
}
|
||||
|
||||
// TileEntity ------------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public boolean shouldRefresh(World world, BlockPos pos, IBlockState os, IBlockState ns)
|
||||
{ return (os.getBlock() != ns.getBlock()) || (!(ns.getBlock() instanceof BlockDecorFurnace)); }
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound compound)
|
||||
{ super.readFromNBT(compound); readnbt(compound); }
|
||||
|
||||
@Override
|
||||
public NBTTagCompound writeToNBT(NBTTagCompound compound)
|
||||
{ super.writeToNBT(compound); writenbt(compound); return compound; }
|
||||
|
||||
// IWorldNamable ---------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public String getName()
|
||||
{ final Block block=getBlockType(); return (block!=null) ? (block.getTranslationKey() + ".name") : (""); }
|
||||
|
||||
@Override
|
||||
public boolean hasCustomName()
|
||||
{ return false; }
|
||||
|
||||
@Override
|
||||
public ITextComponent getDisplayName()
|
||||
{ return new TextComponentTranslation(getName(), new Object[0]); }
|
||||
|
||||
// IInventory ------------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public int getSizeInventory()
|
||||
{ return stacks_.size(); }
|
||||
|
||||
@Override
|
||||
public boolean isEmpty()
|
||||
{ for(ItemStack stack: stacks_) { if(!stack.isEmpty()) return false; } return true; }
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int index)
|
||||
{ return (index < getSizeInventory()) ? stacks_.get(index) : ItemStack.EMPTY; }
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int index, int count)
|
||||
{ return ItemStackHelper.getAndSplit(stacks_, index, count); }
|
||||
|
||||
@Override
|
||||
public ItemStack removeStackFromSlot(int index)
|
||||
{ return ItemStackHelper.getAndRemove(stacks_, index); }
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int index, ItemStack stack)
|
||||
{
|
||||
ItemStack slot_stack = stacks_.get(index);
|
||||
boolean already_in_slot = (!stack.isEmpty()) && (stack.isItemEqual(slot_stack)) && (ItemStack.areItemStackTagsEqual(stack, slot_stack));
|
||||
stacks_.set(index, stack);
|
||||
if(stack.getCount() > getInventoryStackLimit()) stack.setCount(getInventoryStackLimit());
|
||||
if((index == SMELTING_INPUT_SLOT_NO) && (!already_in_slot)) {
|
||||
proc_time_needed_ = getCookTime(stack);
|
||||
proc_time_elapsed_ = 0;
|
||||
markDirty();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventoryStackLimit()
|
||||
{ return 64; }
|
||||
|
||||
@Override
|
||||
public void markDirty()
|
||||
{ super.markDirty(); }
|
||||
|
||||
@Override
|
||||
public boolean isUsableByPlayer(EntityPlayer player)
|
||||
{ return ((world.getTileEntity(pos) == this) && (player.getDistanceSq(pos.getX()+0.5d, pos.getY()+0.5d, pos.getZ()+0.5d) <= 64.0d)); }
|
||||
|
||||
@Override
|
||||
public void openInventory(EntityPlayer player)
|
||||
{}
|
||||
|
||||
@Override
|
||||
public void closeInventory(EntityPlayer player)
|
||||
{ markDirty(); }
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int index, ItemStack stack)
|
||||
{
|
||||
switch(index) {
|
||||
case SMELTING_OUTPUT_SLOT_NO:
|
||||
case FIFO_OUTPUT_0_SLOT_NO:
|
||||
case FIFO_OUTPUT_1_SLOT_NO:
|
||||
return false;
|
||||
case SMELTING_INPUT_SLOT_NO:
|
||||
case FIFO_INPUT_0_SLOT_NO:
|
||||
case FIFO_INPUT_1_SLOT_NO:
|
||||
return true;
|
||||
case AUX_0_SLOT_NO:
|
||||
case AUX_1_SLOT_NO:
|
||||
return true;
|
||||
default: {
|
||||
ItemStack slot_stack = stacks_.get(FIFO_FUEL_1_SLOT_NO);
|
||||
return isItemFuel(stack) || SlotFurnaceFuel.isBucket(stack) && (slot_stack.getItem() != Items.BUCKET);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getField(int id)
|
||||
{
|
||||
switch (id) {
|
||||
case 0: return burntime_left_;
|
||||
case 1: return fuel_burntime_;
|
||||
case 2: return proc_time_elapsed_;
|
||||
case 3: return proc_time_needed_;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setField(int id, int value)
|
||||
{
|
||||
switch(id) {
|
||||
case 0: burntime_left_ = value; break;
|
||||
case 1: fuel_burntime_ = value; break;
|
||||
case 2: proc_time_elapsed_ = value; break;
|
||||
case 3: proc_time_needed_ = value; break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFieldCount()
|
||||
{ return 4; }
|
||||
|
||||
@Override
|
||||
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;
|
||||
}
|
||||
ItemStack fuel = stacks_.get(SMELTING_FUEL_SLOT_NO);
|
||||
if(isBurning() || (!fuel.isEmpty()) && (!(stacks_.get(SMELTING_INPUT_SLOT_NO)).isEmpty())) {
|
||||
if(!isBurning() && canSmelt()) {
|
||||
burntime_left_ = getItemBurnTime(fuel);
|
||||
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(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; }
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static boolean isBurning(IInventory inventory)
|
||||
{ return inventory.getField(0) > 0; }
|
||||
|
||||
public int getCookTime(ItemStack stack)
|
||||
{ return proc_speed_interval_ < 10 ? 10 : proc_speed_interval_; }
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
private boolean canSmelt()
|
||||
{
|
||||
if(stacks_.get(SMELTING_INPUT_SLOT_NO).isEmpty()) return false;
|
||||
final ItemStack recipe_result_items = FurnaceRecipes.instance().getSmeltingResult(stacks_.get(SMELTING_INPUT_SLOT_NO));
|
||||
if(recipe_result_items.isEmpty()) return false;
|
||||
final ItemStack result_stack = stacks_.get(SMELTING_OUTPUT_SLOT_NO);
|
||||
if(result_stack.isEmpty()) return true;
|
||||
if(!result_stack.isItemEqual(recipe_result_items)) return false;
|
||||
if(result_stack.getCount() + recipe_result_items.getCount() <= getInventoryStackLimit() && result_stack.getCount() + recipe_result_items.getCount() <= result_stack.getMaxStackSize()) return true;
|
||||
return result_stack.getCount() + recipe_result_items.getCount() <= recipe_result_items.getMaxStackSize();
|
||||
}
|
||||
|
||||
public void smeltItem()
|
||||
{
|
||||
if(!canSmelt()) return;
|
||||
final ItemStack smelting_input_stack = stacks_.get(SMELTING_INPUT_SLOT_NO);
|
||||
final ItemStack recipe_result_items = FurnaceRecipes.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()) {
|
||||
smelting_output_stack.grow(recipe_result_items.getCount());
|
||||
}
|
||||
smelting_input_stack.shrink(1);
|
||||
}
|
||||
|
||||
public static int getItemBurnTime(ItemStack stack)
|
||||
{ return TileEntityFurnace.getItemBurnTime(stack); }
|
||||
|
||||
public static boolean isItemFuel(ItemStack stack)
|
||||
{ return TileEntityFurnace.isItemFuel(stack); }
|
||||
|
||||
@Override
|
||||
public int[] getSlotsForFace(EnumFacing side)
|
||||
{
|
||||
if(side == EnumFacing.DOWN) return SLOTS_BOTTOM;
|
||||
if(side == EnumFacing.UP) return SLOTS_TOP;
|
||||
return SLOTS_SIDES;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInsertItem(int index, ItemStack itemStackIn, EnumFacing direction)
|
||||
{ return isItemValidForSlot(index, itemStackIn); }
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int index, ItemStack stack, EnumFacing direction)
|
||||
{
|
||||
if((direction!=EnumFacing.DOWN) || ((index!=SMELTING_FUEL_SLOT_NO) && (index!=FIFO_FUEL_0_SLOT_NO) && (index!=FIFO_FUEL_1_SLOT_NO) )) return true;
|
||||
return (stack.getItem()==Items.BUCKET);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
@Nullable
|
||||
public <T> T getCapability(Capability<T> capability, @Nullable EnumFacing facing)
|
||||
{
|
||||
if((facing == null) || (capability != CapabilityItemHandler.ITEM_HANDLER_CAPABILITY)) return super.getCapability(capability, facing);
|
||||
if(facing == EnumFacing.DOWN) return (T) sided_itemhandler_down_;
|
||||
if(facing == EnumFacing.UP) return (T) sided_itemhandler_top_;
|
||||
return (T) sided_itemhandler_sides_;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -56,6 +56,24 @@ public class BlockDecorGlassBlock extends BlockDecor
|
|||
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 int getLightOpacity(IBlockState state, IBlockAccess world, BlockPos pos)
|
||||
{ return 0; }
|
||||
|
||||
@Override
|
||||
public int getLightValue(IBlockState state, IBlockAccess world, BlockPos pos)
|
||||
{ return 0; }
|
||||
|
||||
@Override
|
||||
public boolean canCreatureSpawn(IBlockState state, IBlockAccess world, BlockPos pos, net.minecraft.entity.EntityLiving.SpawnPlacementType type)
|
||||
{ return false; }
|
||||
|
@ -75,14 +93,4 @@ public class BlockDecorGlassBlock extends BlockDecor
|
|||
public AxisAlignedBB getCollisionBoundingBox(IBlockState state, IBlockAccess world, BlockPos pos)
|
||||
{ return FULL_BLOCK_AABB; }
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean isFullCube(IBlockState state)
|
||||
{ return false; }
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean isNormalCube(IBlockState state)
|
||||
{ return false; }
|
||||
|
||||
}
|
||||
|
|
|
@ -105,6 +105,13 @@ public class ModBlocks
|
|||
ModAuxiliaries.getPixeledAABB(0,0,7, 16,16,9)
|
||||
);
|
||||
|
||||
public static final BlockDecorFurnace SMALL_LAB_FURNACE = new BlockDecorFurnace(
|
||||
"small_lab_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)
|
||||
);
|
||||
|
||||
public static final BlockDecorFull IRON_SHEET_ROOF_FULLBLOCK = new BlockDecorFull("iron_sheet_roof_block", 0, Material.IRON, 1.8f, 25f, SoundType.METAL);
|
||||
public static final BlockDecorStairs IRON_SHEET_ROOF = new BlockDecorStairs("iron_sheet_roof", IRON_SHEET_ROOF_FULLBLOCK.getDefaultState());
|
||||
|
||||
|
@ -132,10 +139,11 @@ public class ModBlocks
|
|||
TREATED_WOOD_WINDOW,
|
||||
TREATED_WOOD_WINDOWSILL,
|
||||
INSET_LIGHT_IRON,
|
||||
SMALL_LAB_FURNACE,
|
||||
};
|
||||
|
||||
private static final Block devBlocks[] = {
|
||||
IRON_SHEET_ROOF, // model looks not good enough yet
|
||||
IRON_SHEET_ROOF, // model looks not good enough yet
|
||||
};
|
||||
|
||||
private static ArrayList<Block> registeredBlocks = new ArrayList<>();
|
||||
|
@ -157,6 +165,7 @@ public class ModBlocks
|
|||
ModEngineersDecor.logger.info("Registered " + Integer.toString(registeredBlocks.size()) + " blocks.");
|
||||
// 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"));
|
||||
}
|
||||
|
||||
// Invoked from ClientProxy.registerModels()
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"forge_marker": 1,
|
||||
"defaults": {
|
||||
"model": "engineersdecor:furnace/small_lab_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_lab_furnace_front_gloom_off" } }, "true":{}}
|
||||
}
|
||||
}
|
|
@ -70,6 +70,8 @@ tile.engineersdecor.treated_wood_windowsill.help=§6Simple window decoration.
|
|||
#-----------------------------------------------------------------------------------------------------------
|
||||
tile.engineersdecor.iron_sheet_roof.name=Iron sheet metal roof
|
||||
tile.engineersdecor.iron_sheet_roof.help=§6Well, it's a roof.
|
||||
tile.engineersdecor.small_lab_furnace.name=Small laboratry furnace
|
||||
tile.engineersdecor.small_lab_furnace.help=§6Small metal cased lab kiln.§r Solid fuel consuming, updraught. Slightly hotter and better isolated than a cobblestone furnace, therefore more efficient. Two stack internal hopper fifos for input, output, and fuel.
|
||||
#-----------------------------------------------------------------------------------------------------------
|
||||
# EOF
|
||||
#-----------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -0,0 +1,198 @@
|
|||
{
|
||||
"parent": "block/cube",
|
||||
"textures": {
|
||||
"handles": "engineersdecor:blocks/furnace/small_lab_furnace_handles",
|
||||
"particle": "engineersdecor:blocks/furnace/small_lab_furnace_handles",
|
||||
"top": "engineersdecor:blocks/furnace/small_lab_furnace_top",
|
||||
"bottom": "engineersdecor:blocks/furnace/small_lab_furnace_bottom",
|
||||
"left": "engineersdecor:blocks/furnace/small_lab_furnace_left",
|
||||
"right": "engineersdecor:blocks/furnace/small_lab_furnace_right",
|
||||
"front": "engineersdecor:blocks/furnace/small_lab_furnace_front",
|
||||
"back": "engineersdecor:blocks/furnace/small_lab_furnace_back",
|
||||
"gloom": "engineersdecor:blocks/furnace/small_lab_furnace_front_gloom_on"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [4, 2, 0],
|
||||
"to": [12, 5, 1],
|
||||
"faces": {
|
||||
"north": {"uv": [4, 11, 12, 14], "texture": "#gloom"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [0, 1, 1],
|
||||
"to": [16, 16, 16],
|
||||
"faces": {
|
||||
"north": {"uv": [0, 0, 16, 15], "texture": "#front"},
|
||||
"east": {"uv": [0, 0, 15, 15], "texture": "#left"},
|
||||
"south": {"uv": [0, 0, 16, 15], "texture": "#back"},
|
||||
"west": {"uv": [1, 0, 16, 15], "texture": "#right"},
|
||||
"up": {"uv": [0, 1, 16, 16], "texture": "#top"},
|
||||
"down": {"uv": [0, 0, 16, 15], "texture": "#bottom"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [1, 0, 1],
|
||||
"to": [15, 1, 15],
|
||||
"faces": {
|
||||
"north": {"uv": [1, 15, 15, 16], "texture": "#front"},
|
||||
"east": {"uv": [1, 15, 15, 16], "texture": "#left"},
|
||||
"south": {"uv": [1, 15, 15, 16], "texture": "#back"},
|
||||
"west": {"uv": [1, 15, 15, 16], "texture": "#right"},
|
||||
"down": {"uv": [1, 1, 15, 15], "texture": "#bottom"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [3, 7, 0],
|
||||
"to": [13, 15, 1],
|
||||
"faces": {
|
||||
"north": {"uv": [3, 1, 13, 9], "texture": "#front"},
|
||||
"east": {"uv": [15, 1, 16, 9], "texture": "#left"},
|
||||
"west": {"uv": [0, 1, 1, 9], "texture": "#right"},
|
||||
"up": {"uv": [3, 0, 13, 1], "texture": "#top"},
|
||||
"down": {"uv": [3, 15, 13, 16], "texture": "#bottom"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [3, 5, 0],
|
||||
"to": [13, 6, 1],
|
||||
"faces": {
|
||||
"north": {"uv": [3, 10, 13, 11], "texture": "#front"},
|
||||
"east": {"uv": [15, 10, 16, 11], "texture": "#left"},
|
||||
"west": {"uv": [0, 10, 1, 11], "texture": "#right"},
|
||||
"up": {"uv": [3, 0, 13, 1], "texture": "#top"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [3, 1, 0],
|
||||
"to": [13, 2, 1],
|
||||
"faces": {
|
||||
"north": {"uv": [3, 14, 13, 15], "texture": "#front"},
|
||||
"east": {"uv": [15, 14, 16, 15], "texture": "#left"},
|
||||
"west": {"uv": [0, 14, 1, 15], "texture": "#right"},
|
||||
"down": {"uv": [3, 15, 13, 16], "texture": "#bottom"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [3, 2, 0],
|
||||
"to": [4, 5, 1],
|
||||
"faces": {
|
||||
"north": {"uv": [12, 11, 13, 14], "texture": "#front"},
|
||||
"west": {"uv": [0, 11, 1, 14], "texture": "#right"},
|
||||
"up": {"uv": [3, 0, 4, 1], "texture": "#top"},
|
||||
"down": {"uv": [3, 15, 4, 16], "texture": "#bottom"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [12, 2, 0],
|
||||
"to": [13, 5, 1],
|
||||
"faces": {
|
||||
"north": {"uv": [3, 11, 4, 14], "texture": "#front"},
|
||||
"east": {"uv": [15, 11, 16, 14], "texture": "#left"},
|
||||
"up": {"uv": [12, 0, 13, 1], "texture": "#top"},
|
||||
"down": {"uv": [12, 15, 13, 16], "texture": "#bottom"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [13, 1.5, 0.25],
|
||||
"to": [14, 5.5, 0.75],
|
||||
"faces": {
|
||||
"north": {"uv": [2, 10.5, 3, 14.5], "texture": "#handles"},
|
||||
"east": {"uv": [15.25, 10.5, 15.75, 14.5], "texture": "#handles"},
|
||||
"south": {"uv": [13, 10.5, 14, 14.5], "texture": "#handles"},
|
||||
"up": {"uv": [13, 0.25, 14, 0.75], "rotation": 270, "texture": "#handles"},
|
||||
"down": {"uv": [13, 15.25, 14, 15.75], "rotation": 90, "texture": "#handles"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [13, 13, 0.25],
|
||||
"to": [14, 14, 0.75],
|
||||
"faces": {
|
||||
"north": {"uv": [2, 2, 3, 3], "texture": "#handles"},
|
||||
"east": {"uv": [15.25, 2, 15.75, 3], "texture": "#handles"},
|
||||
"south": {"uv": [13, 2, 14, 3], "texture": "#handles"},
|
||||
"up": {"uv": [13, 0.25, 14, 0.75], "rotation": 270, "texture": "#handles"},
|
||||
"down": {"uv": [13, 15.25, 14, 15.75], "rotation": 90, "texture": "#handles"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [2.5, 12, 0.5],
|
||||
"to": [3, 14, 1],
|
||||
"faces": {
|
||||
"north": {"uv": [13, 2, 13.5, 4], "texture": "#handles"},
|
||||
"west": {"uv": [0.5, 2, 1, 4], "texture": "#handles"},
|
||||
"up": {"uv": [2.5, 0.5, 3, 1], "rotation": 270, "texture": "#handles"},
|
||||
"down": {"uv": [2.5, 15, 3, 15.5], "rotation": 90, "texture": "#handles"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [2.5, 8, 0.5],
|
||||
"to": [3, 10, 1],
|
||||
"faces": {
|
||||
"north": {"uv": [13, 6, 13.5, 8], "texture": "#handles"},
|
||||
"west": {"uv": [0.5, 6, 1, 8], "texture": "#handles"},
|
||||
"up": {"uv": [2.5, 0.5, 3, 1], "rotation": 270, "texture": "#handles"},
|
||||
"down": {"uv": [2.5, 15, 3, 15.5], "rotation": 90, "texture": "#handles"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [2.5, 1, 0.5],
|
||||
"to": [3, 2, 1],
|
||||
"faces": {
|
||||
"north": {"uv": [13, 14, 13.5, 15], "texture": "#handles"},
|
||||
"west": {"uv": [0.5, 14, 1, 15], "texture": "#handles"},
|
||||
"up": {"uv": [2.5, 0.5, 3, 1], "rotation": 270, "texture": "#handles"},
|
||||
"down": {"uv": [2.5, 15, 3, 15.5], "rotation": 90, "texture": "#handles"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [2.5, 5, 0.5],
|
||||
"to": [3, 6, 1],
|
||||
"faces": {
|
||||
"north": {"uv": [13, 10, 13.5, 11], "texture": "#handles"},
|
||||
"west": {"uv": [0.5, 10, 1, 11], "texture": "#handles"},
|
||||
"up": {"uv": [2.5, 0.5, 3, 1], "rotation": 270, "texture": "#handles"},
|
||||
"down": {"uv": [2.5, 15, 3, 15.5], "rotation": 90, "texture": "#handles"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [13, 8, 0.25],
|
||||
"to": [14, 9, 0.75],
|
||||
"faces": {
|
||||
"north": {"uv": [2, 7, 3, 8], "texture": "#handles"},
|
||||
"east": {"uv": [15.25, 7, 15.75, 8], "texture": "#handles"},
|
||||
"south": {"uv": [13, 7, 14, 8], "texture": "#handles"},
|
||||
"up": {"uv": [13, 0.25, 14, 0.75], "rotation": 270, "texture": "#handles"},
|
||||
"down": {"uv": [13, 15.25, 14, 15.75], "rotation": 90, "texture": "#handles"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"from": [13.5, 9, 0.25],
|
||||
"to": [14, 13, 0.75],
|
||||
"faces": {
|
||||
"north": {"uv": [2, 3, 2.5, 7], "texture": "#handles"},
|
||||
"east": {"uv": [15.25, 3, 15.75, 7], "texture": "#handles"},
|
||||
"south": {"uv": [13.5, 3, 14, 7], "texture": "#handles"},
|
||||
"west": {"uv": [0.25, 3, 0.75, 7], "texture": "#handles"}
|
||||
}
|
||||
}
|
||||
],
|
||||
"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]
|
||||
}
|
||||
},
|
||||
"groups": [0, 1, 2, 3, 4, 5, 6, 7,
|
||||
{
|
||||
"name": "handles",
|
||||
"children": [8, 9, 10, 11, 12, 13, 14, 15]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -205,6 +205,13 @@
|
|||
},
|
||||
"name": "itemCraftingTable"
|
||||
},
|
||||
{
|
||||
"ingredient": {
|
||||
"item": "minecraft:hopper",
|
||||
"data": 0
|
||||
},
|
||||
"name": "anyHopper"
|
||||
},
|
||||
{
|
||||
"ingredient": [
|
||||
{
|
||||
|
@ -237,6 +244,12 @@
|
|||
"data": 0
|
||||
},
|
||||
"name": "crateTreatedWood"
|
||||
},
|
||||
{
|
||||
"ingredient": {
|
||||
"item": "minecraft:furnace",
|
||||
"data": 0
|
||||
},
|
||||
"name": "itemFurnace"
|
||||
}
|
||||
|
||||
]
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"conditions": [
|
||||
{
|
||||
"type": "engineersdecor:grc",
|
||||
"result": "engineersdecor:small_lab_furnace",
|
||||
"required": ["immersiveengineering:material"]
|
||||
}
|
||||
],
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"HPP",
|
||||
"PFP",
|
||||
"PPP"
|
||||
],
|
||||
"key": {
|
||||
"F": {
|
||||
"item": "#itemFurnace",
|
||||
"data": 0
|
||||
},
|
||||
"P": {
|
||||
"item": "#plateIron",
|
||||
"data": 0
|
||||
},
|
||||
"H": {
|
||||
"item": "#anyHopper",
|
||||
"data": 0
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "engineersdecor:small_lab_furnace",
|
||||
"count": 1
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 574 B |
After Width: | Height: | Size: 504 B |
After Width: | Height: | Size: 534 B |
After Width: | Height: | Size: 537 B |
After Width: | Height: | Size: 667 B |
|
@ -0,0 +1 @@
|
|||
{ "animation":{ "frames": [0,1,2,3,4,5,6,7], "frametime":8, "interpolate":true }}
|
After Width: | Height: | Size: 417 B |
After Width: | Height: | Size: 557 B |
After Width: | Height: | Size: 550 B |
After Width: | Height: | Size: 515 B |
After Width: | Height: | Size: 23 KiB |
|
@ -225,9 +225,9 @@ tasks["version-check"] = function() {
|
|||
})
|
||||
const combined_version = version_minecraft + "-" + version_engineersdecor;
|
||||
var readme_version_found = fs.readfile("readme.md", function(line){
|
||||
var m = line.match(/^[\s]+-[\s]+v([\d]+[\.][\d]+[\.][\d]+[-][abrc][\d]+)/i);
|
||||
var m = line.match(/^[\s]+[-~][\s]+v([\d]+[\.][\d]+[\.][\d]+[-][abrc][\d]+)/i);
|
||||
if((!m) || (!m.length) || (m.length < 2)) {
|
||||
m = line.match(/^[\s]+-[\s]+v([\d]+[\.][\d]+[\.][\d]+)/i);
|
||||
m = line.match(/^[\s]+[-~][\s]+v([\d]+[\.][\d]+[\.][\d]+)/i);
|
||||
if((!m) || (!m.length) || (m.length < 2)) return false;
|
||||
}
|
||||
return m[1]==version_engineersdecor;
|
||||
|
|
1
1.13/.gitignore
vendored
|
@ -33,3 +33,4 @@ desktop.ini
|
|||
.DS_Store
|
||||
Thumbs.db
|
||||
forge*changelog.txt
|
||||
/*.txt
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
{
|
||||
"homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/",
|
||||
"1.13.2": {
|
||||
"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.",
|
||||
"1.0.0-a3": "[A] Added iron inset light.\n[A] Added rebar concrete tile.\n[A] Added rebar concrete tile stairs.\n[A] Added clinker brick wall.\n[A] Added treated wood stool.\n[A] Added treated window sill.",
|
||||
"1.0.0-a2": "[A] Added panzer glass.",
|
||||
"1.0.0-a1": "[A] Initial port to 1.13.2 with Forge beta."
|
||||
},
|
||||
"promos": {
|
||||
"1.13.2-recommended": "",
|
||||
"1.13.2-latest": "1.0.0-a1"
|
||||
"1.13.2-latest": "1.0.2-b2"
|
||||
}
|
||||
}
|
|
@ -10,6 +10,30 @@ Mod sources for Minecraft version 1.13.2.
|
|||
----
|
||||
## Revision history
|
||||
|
||||
~ v1.0.2-b3 [A]
|
||||
|
||||
- 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] 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.
|
||||
|
||||
- v1.0.0-a3 [A] Added iron inset light.
|
||||
[A] Added rebar concrete tile.
|
||||
[A] Added rebar concrete tile stairs.
|
||||
[A] Added clinker brick wall.
|
||||
[A] Added treated wood stool.
|
||||
[A] Added treated window sill.
|
||||
|
||||
- v1.0.0-a2 [A] Added panzer glass.
|
||||
|
||||
- v1.0.0-a1 [A] Initial port to 1.13.2 with Forge beta.
|
||||
|
||||
----
|
||||
|
|
|
@ -26,9 +26,9 @@ tasks["dist-check"] = function() {
|
|||
if(git_remote.replace(/[\s]/g,"").indexOf("git@github.com:stfwi/engineers-decor.git(push)") < 0) fails.push("Not the reference repository.");
|
||||
if((git_branch != "develop") && (git_branch != "master")) {
|
||||
fails.push("No valid branch for dist. (branch:'"+git_branch+"')");
|
||||
} else if((git_branch == "develop") && (version_engineersdecor.replace(/[^\w\.-]/g,"")=="")) {
|
||||
} else if((git_branch == "develop") && (version_engineersdecor.replace(/[^ab]/g,"")=="")) {
|
||||
fails.push("Cannot make release dist on develop branch.");
|
||||
} else if((git_branch == "master") && (version_engineersdecor.replace(/[^\w\.-]/g,"")!="")) {
|
||||
} else if((git_branch == "master") && (version_engineersdecor.replace(/[^ab]/g,"")!="")) {
|
||||
fails.push("Cannot make beta dist on master branch.");
|
||||
}
|
||||
if(git_diff !== "") fails.push("Not everything committed to the GIT repository.");
|
||||
|
@ -109,9 +109,9 @@ tasks["version-check"] = function() {
|
|||
})
|
||||
const combined_version = version_minecraft + "-" + version_engineersdecor;
|
||||
var readme_version_found = fs.readfile("readme.md", function(line){
|
||||
var m = line.match(/^[\s]+-[\s]+v([\d]+[\.][\d]+[\.][\d]+[-][abrc][\d]+)/i);
|
||||
var m = line.match(/^[\s]+[-~][\s]+v([\d]+[\.][\d]+[\.][\d]+[-][abrc][\d]+)/i);
|
||||
if((!m) || (!m.length) || (m.length < 2)) {
|
||||
m = line.match(/^[\s]+-[\s]+v([\d]+[\.][\d]+[\.][\d]+)/i);
|
||||
m = line.match(/^[\s]+[-~][\s]+v([\d]+[\.][\d]+[\.][\d]+)/i);
|
||||
if((!m) || (!m.length) || (m.length < 2)) return false;
|
||||
}
|
||||
return m[1]==version_engineersdecor;
|
||||
|
@ -189,7 +189,7 @@ tasks["update-json"] = function() {
|
|||
// Condense log entries sepatated with newlines to one line for each version
|
||||
for(var i=readme.length-1; i>0; --i) {
|
||||
var line = readme[i].replace(/^\s+/,"");
|
||||
if(line.search(/^-/) < 0) {
|
||||
if(line.search(/^[-~]/) < 0) {
|
||||
readme[i-1] += "\n" + line;
|
||||
readme[i] = "";
|
||||
}
|
||||
|
@ -201,6 +201,7 @@ tasks["update-json"] = function() {
|
|||
var line = readme[i].replace(/^[\sv-]+/g,"").trim();
|
||||
var ver = line.substr(0, line.search(" ")).trim().toLowerCase();
|
||||
var txt = line.substr(line.search(" ")).trim();
|
||||
if(ver.search("~")===0) continue;
|
||||
if(history[ver] !== undefined) throw new Error("Double definition of version '" + ver + "' in the readme revision history.");
|
||||
history[ver] = txt;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/",
|
||||
"1.12.2": {
|
||||
"1.0.3-b1": "[A] Added small laboratry furnace.\n[M] Panzer glass opacity/light level set explicitly 0.",
|
||||
"1.0.2": "[R] Release based on v1.0.2-b3 * Fixes: Spawning. * Crafting table: Shift-click. * Ladders: Faster climbing/descending. * Concrete: Rebar tiles, tile stairs. * Treated wood: window, windowsill. * Slag brick: wall. * Panzer glass: added. * Recipes: Adaptions, added decompositions.",
|
||||
"1.0.2-b3": "[A] Added slag brick wall.\n[A] Added wall decomposition recipes.\n[A] Added treated wood window.\n[M] Climbing/descending mod ladders is faster when looking up or down and not sneaking.\n[M] Panzer glass material definition changed.\n[M] Explicitly preventing spawning in and on \"non-full\" blocks of the mod.",
|
||||
"1.0.2-b2": "[A] Added rebar concrete tile stairs.\n[A] Added treated wood window sill.\n[A] Added decomposition recipes for stairs and tiles.\n[M] Changed stair recipe yield quantity from 9 to 6.",
|
||||
|
@ -25,7 +26,7 @@
|
|||
},
|
||||
"promos": {
|
||||
"1.12.2-recommended": "1.0.2",
|
||||
"1.12.2-latest": "1.0.2",
|
||||
"1.12.2-latest": "1.0.3-b1",
|
||||
"1.13.2-recommended": "",
|
||||
"1.13.2-latest": "1.0.2-b2"
|
||||
}
|
||||
|
|
28
readme.md
|
@ -20,10 +20,21 @@ Main distribution channel for this mod is CurseForge:
|
|||
The mod has its focus on non-functional, decorative blocks. If anyhow possible,
|
||||
no tile entities or user interactions are used. 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
|
||||
storage slots on the left side of the crafting grid. Crafted 2x2 with three
|
||||
treated wood planks and one vanilla crafting table.
|
||||
|
||||
- *Small laboratry furnace*: Solid fuel consuming, updraught. Slightly hotter and
|
||||
better isolated than a cobblestone furnace, therefore more efficient. Has internal
|
||||
hopper FiFos for input, output, and fuel (two stacks each). Two auxilliary slots
|
||||
(storage tray). Keeps inventory when relocated. Crafted with one cobblestone
|
||||
furnace, one hopper, and seven metal plates.
|
||||
|
||||
- Rebar (steel) reinforced concrete: Expensive but creeper-proof. Crafted 3x3 from
|
||||
four concrete blocks and five steel rods. Texture design oriented at the IE concrete,
|
||||
slightly darker, eight (position dependent) random texture variations with rust
|
||||
traces. Also creaftable in form of *stairs* and *walls*. Like the IE contrete tiles,
|
||||
traces. Also creaftable in form of *stairs* and *walls*. Like the IE contrete *tiles*,
|
||||
you can craft rebar concrete tiles with corresponding stairs. Reverse recipes
|
||||
available for all blocks crafted from rebar concrete.
|
||||
|
||||
|
@ -43,11 +54,6 @@ no tile entities or user interactions are used. Current feature set:
|
|||
explosion resistance than bricks. Also available as stairs and wall, also with
|
||||
reverse recipes.
|
||||
|
||||
- *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
|
||||
storage slots on the left side of the crafting grid. Crafted 2x2 with three
|
||||
treated wood planks and one vanilla crafting table.
|
||||
|
||||
- *Treated wood ladder*: Crafted 3x3 with the known ladder pattern, items are
|
||||
treated wood sticks. Climbing is faster if looking up/down and not sneaking.
|
||||
|
||||
|
@ -59,6 +65,10 @@ no tile entities or user interactions are used. Current feature set:
|
|||
zip pattern. Crafted 3x3 with six iron or steel rods in a zip pattern. Climbing
|
||||
is faster when looking up/down and not sneaking.
|
||||
|
||||
- *Panzer glass*: Reinforced, dark gray tinted glass block. Explosion-proof.
|
||||
Faint structural lines are visible, multiple texture variations for seemless
|
||||
look. Crafted 3x3 with four metal rods, four glass blocks, and one diamond.
|
||||
|
||||
- *Treated wood table*: Four leg table made out of treated wood. Crafted 3x3
|
||||
with three treated wood slabs and four treated wood poles. Guess the pattern.
|
||||
|
||||
|
@ -70,9 +80,9 @@ 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.
|
||||
|
||||
- *Panzer glass*: Reinforced, dark gray tinted glass block. Explosion-proof.
|
||||
Faint structural lines are visible, multiple texture variations for seemless
|
||||
look. Crafted 3x3 with four metal rods, four glass blocks, and one diamond.
|
||||
- *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.
|
||||
|
||||
More to come slowly but steadily.
|
||||
|
||||
|
|
3
tasks.js
|
@ -56,7 +56,8 @@ tasks["sync-main-repository"] = function() {
|
|||
sys.shell("cp -f .gitignore build.gradle gradle.properties gradlew gradlew.bat Makefile readme.md tasks.js signing.* \"" + main_repo_local + "/1.12/\"")
|
||||
sys.shell("cp -r src gradle meta \"" + main_repo_local + "/1.12/\"")
|
||||
//@todo uncomment after alpha code cleanup.
|
||||
//cd_dev("1.13");
|
||||
cd_dev("1.13");
|
||||
sys.shell("cp -f .gitignore readme.md tasks.js \"" + main_repo_local + "/1.13/\"")
|
||||
//sys.shell("cp -f .gitignore build.gradle gradle.properties gradlew gradlew.bat Makefile readme.md tasks.js signing.* \"" + main_repo_local + "/1.13/\"")
|
||||
//sys.shell("cp -r src gradle meta \"" + main_repo_local + "/1.13/\"")
|
||||
cd_main();
|
||||
|
|