Passive fluid accumulator non-experimental. Electrical furnace non-experimental. Fixed version-check URL. Opt-out configs added.

This commit is contained in:
stfwi 2019-05-08 21:19:08 +02:00
parent 62b4a8c312
commit 86d71c6931
20 changed files with 93 additions and 47 deletions

View file

@ -4,4 +4,4 @@ org.gradle.jvmargs=-Xmx8G
version_minecraft=1.12.2
version_forge=14.23.5.2768
version_jei=4.10.0.198
version_engineersdecor=1.0.4
version_engineersdecor=1.0.5-b1

View file

@ -1,7 +1,8 @@
{
"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.5-b1": "[A] Added passive fluid accumulator.\n[A] Added small electrical passthrough-furnace.\n[F] Fixed version check URL.\n[M] Opt-out config options for valves, passive fluid accumulator, and furni.",
"1.0.4": "[R] Release based on v1.0.4-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 pressurized transfer. * Tool tip 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.",
@ -34,6 +35,6 @@
},
"promos": {
"1.12.2-recommended": "1.0.4",
"1.12.2-latest": "1.0.4"
"1.12.2-latest": "1.0.5-b1"
}
}

View file

@ -10,8 +10,14 @@ Mod sources for Minecraft version 1.12.2.
----
## Revision history
- v1.0.5-b1 [A] Added passive fluid accumulator.
[A] Added small electrical passthrough-furnace.
[F] Fixed version check URL.
[M] Opt-out config options for valves, passive fluid accumulator,
and furni.
-------------------------------------------------------------------
- v1.0.4 [R] Release based on v1.0.3-b9. Release-to-release changes:
- v1.0.4 [R] Release based on v1.0.4-b9. Release-to-release changes:
* Crafting table: Quick crafting history re-fab, JEI integration.
* Rendering improvements and issue fixes (stairs, ambient occlusion,
optifine, etc).
@ -19,8 +25,8 @@ Mod sources for Minecraft version 1.12.2.
* 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.
analog redstone controlled valve. Support pressurized transfer.
* Tool tip documentation (CTRL-SHIFT) for stairs added.
* Internal code cleanups.
* Recipes tuned.
-------------------------------------------------------------------

View file

@ -48,7 +48,7 @@ import javax.annotation.Nonnull;
version = ModEngineersDecor.MODVERSION,
dependencies = "required-after:forge@[14.23.5.2768,);before:immersiveengineering",
useMetadata = true,
updateJSON = "https://raw.githubusercontent.com/stfwi/engineersdecor/develop/meta/update.json",
updateJSON = "https://raw.githubusercontent.com/stfwi/engineers-decor/develop/meta/update.json",
certificateFingerprint = ((ModEngineersDecor.MODFINGERPRINT==("@"+"MOD_SIGNSHA1"+"@")) ? "" : ModEngineersDecor.MODFINGERPRINT)
)
@SuppressWarnings({"unused", "ConstantConditions"})

View file

@ -11,7 +11,6 @@ package wile.engineersdecor.blocks;
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;
import net.minecraft.block.Block;
@ -41,6 +40,7 @@ import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextComponentTranslation;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.*;
import net.minecraft.stats.StatList;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.energy.CapabilityEnergy;
import net.minecraftforge.energy.IEnergyStorage;
@ -109,9 +109,9 @@ public class BlockDecorFurnace extends BlockDecorDirected
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();
if(!(te instanceof BlockDecorFurnace.BTileEntity)) return;
((BlockDecorFurnace.BTileEntity)te).readnbt(inventory_nbt);
((BlockDecorFurnace.BTileEntity)te).markDirty();
}
@Override

View file

@ -4,20 +4,20 @@
* @copyright (C) 2019 Stefan Wilhelm
* @license MIT (see https://opensource.org/licenses/MIT)
*
* ED electrical furnace.
* ED small electrical pass-through 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.entity.EntityLivingBase;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.init.Items;
@ -29,6 +29,7 @@ import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.*;
import net.minecraft.stats.StatList;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.energy.CapabilityEnergy;
import net.minecraftforge.energy.IEnergyStorage;
@ -62,6 +63,20 @@ public class BlockDecorFurnaceElectrical extends BlockDecorFurnace
return true;
}
@Override
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
{
world.setBlockState(pos, state.withProperty(LIT, false));
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 BlockDecorFurnaceElectrical.BTileEntity)) return;
((BlockDecorFurnaceElectrical.BTileEntity)te).readnbt(inventory_nbt);
((BlockDecorFurnaceElectrical.BTileEntity)te).markDirty();
}
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rnd)
@ -382,7 +397,7 @@ public class BlockDecorFurnaceElectrical extends BlockDecorFurnace
{ return 7; }
public boolean isBurning()
{ return burntime_left_ > 0; }
{ return (burntime_left_ > 0); }
private boolean transferItems(final int index_from, final int index_to, int count)
{
@ -622,6 +637,14 @@ public class BlockDecorFurnaceElectrical extends BlockDecorFurnace
return true;
}
private void sync_blockstate()
{
final IBlockState state = world.getBlockState(pos);
if((state.getBlock() instanceof BlockDecorFurnaceElectrical) && (state.getValue(LIT) != isBurning())) {
world.setBlockState(pos, state.withProperty(LIT, isBurning()), 2);
}
}
@Override
public void update()
{
@ -631,7 +654,8 @@ public class BlockDecorFurnaceElectrical extends BlockDecorFurnace
if(was_burning) burntime_left_ -= TICK_INTERVAL;
if(burntime_left_ < 0) burntime_left_ = 0;
if(world.isRemote) return;
boolean dirty = false;
boolean update_blockstate = (was_burning != isBurning());
boolean dirty = update_blockstate;
boolean shift_in = false;
boolean shift_out = false;
if(--fifo_timer_ <= 0) {
@ -649,7 +673,7 @@ public class BlockDecorFurnaceElectrical extends BlockDecorFurnace
} else {
// smelt
if(!isBurning() && can_smelt) {
if(heat_up()) dirty = true;
if(heat_up()) { dirty = true; update_blockstate = true; }
}
if(isBurning() && can_smelt) {
if(heat_up()) dirty = true;
@ -667,14 +691,11 @@ public class BlockDecorFurnaceElectrical extends BlockDecorFurnace
}
} 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(proc_time_elapsed_ < 0) { proc_time_elapsed_ = 0; shift_out = true; update_blockstate = true; }
}
if(was_burning != isBurning()) {
if(update_blockstate) {
dirty = true;
final IBlockState state = world.getBlockState(pos);
if(state.getBlock() instanceof BlockDecorFurnace) {
world.setBlockState(pos, state.withProperty(LIT, isBurning()));
}
sync_blockstate();
}
if(adjacent_inventory_shift(shift_in, shift_out)) dirty = true;
if(dirty) markDirty();

View file

@ -15,8 +15,6 @@ 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;
@ -41,7 +39,7 @@ import javax.annotation.Nonnull;
import javax.annotation.Nullable;
public class BlockDecorPassiveFluidAccumulator extends BlockDecorDirected implements ModAuxiliaries.IExperimentalFeature
public class BlockDecorPassiveFluidAccumulator extends BlockDecorDirected
{
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); }
@ -59,7 +57,7 @@ public class BlockDecorPassiveFluidAccumulator extends BlockDecorDirected implem
if(world.isRemote) return true;
TileEntity te = world.getTileEntity(pos);
if(!(te instanceof BTileEntity)) return true;
((BTileEntity)te).debug_info_dump(player);
((BTileEntity)te).send_device_stats(player);
return true;
}
@ -70,7 +68,7 @@ public class BlockDecorPassiveFluidAccumulator extends BlockDecorDirected implem
// Tile entity
//--------------------------------------------------------------------------------------------------------------------
public static class BTileEntity extends TileEntity implements IFluidHandler, IFluidTankProperties, ICapabilityProvider, ITickable, ModAuxiliaries.IExperimentalFeature
public static class BTileEntity extends TileEntity implements IFluidHandler, IFluidTankProperties, ICapabilityProvider, ITickable
{
protected static int tick_idle_interval = 20; // ca 1000ms, simulates suction delay and saves CPU when not drained.
protected static int max_flowrate = 1000;
@ -83,15 +81,13 @@ public class BlockDecorPassiveFluidAccumulator extends BlockDecorDirected implem
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)
public void send_device_stats(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);
ModAuxiliaries.playerChatMessage(player,"" + t_vol + "mB");
}
public void block_changed()

View file

@ -285,12 +285,12 @@ public class ModBlocks
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
STRAIGHT_CHECK_VALVE, STRAIGHT_REDSTONE_VALVE, STRAIGHT_REDSTONE_ANALOG_VALVE, STRAIGHT_PIPE_VALVE_TEI,
PASSIVE_FLUID_ACCUMULATOR, PASSIVE_FLUID_ACCUMULATOR_TEI,
SMALL_ELECTRICAL_FURNACE, SMALL_ELECTRICAL_FURNACE_TEI
};
private static final Object dev_content[] = {
PASSIVE_FLUID_ACCUMULATOR, PASSIVE_FLUID_ACCUMULATOR_TEI,
SMALL_ELECTRICAL_FURNACE, SMALL_ELECTRICAL_FURNACE_TEI
};
//--------------------------------------------------------------------------------------------------------------------

View file

@ -75,6 +75,11 @@ public class ModConfig
@Config.RequiresMcRestart
public boolean without_lab_furnace = false;
@Config.Comment({"Disable small electrical pass-through furnace."})
@Config.Name("Without electrical furnace")
@Config.RequiresMcRestart
public boolean without_electrical_furnace = false;
@Config.Comment({"Disable treated wood table, stool, windowsill, pole, etc."})
@Config.Name("Without tr. wood furniture")
@Config.RequiresMcRestart
@ -110,6 +115,14 @@ public class ModConfig
@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({"Disable check valve, and redstone controlled valves."})
@Config.Name("Without valves")
public boolean without_valves = false;
@Config.Comment({"Disable the passive fluid accumulator."})
@Config.Name("Without fluid accumulator")
public boolean without_passive_fluid_accumulator = false;
}
@Config.Comment({
@ -276,12 +289,15 @@ public class ModConfig
if(optout.without_ie_concrete_wall && rn.startsWith("concrete_wall")) return true;
if(optout.without_panzer_glass && rn.startsWith("panzerglass_")) return true;
if(optout.without_crafting_table && (block instanceof BlockDecorCraftingTable)) return true;
if(optout.without_lab_furnace && (block instanceof BlockDecorFurnace)) return true;
if(optout.without_lab_furnace && ((block instanceof BlockDecorFurnace)) && (!(block instanceof BlockDecorFurnaceElectrical))) return true;
if(optout.without_electrical_furnace && (block instanceof BlockDecorFurnaceElectrical)) return true;
if(optout.without_passive_fluid_accumulator && (block instanceof BlockDecorPassiveFluidAccumulator)) return true;
if(optout.without_windows && rn.endsWith("_window")) return true;
if(optout.without_light_sources && rn.endsWith("_light")) return true;
if(optout.without_ladders && (block instanceof BlockDecorLadder)) return true;
if(optout.without_walls && rn.endsWith("_wall")) return true;
if(optout.without_stairs && rn.endsWith("_stairs")) return true;
if(optout.without_valves && rn.contains("_pipe_valve")) return true;
if(optout.without_treated_wood_furniture) {
if(block instanceof BlockDecorChair) return true;
if(rn.equals("treated_wood_pole")) return true;

View file

@ -7,6 +7,9 @@
"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":{}}
"lit": { "false":{}, "true":{ "textures": {
"front": "engineersdecor:blocks/furnace/small_electrical_furnace_front_lit",
"back": "engineersdecor:blocks/furnace/small_electrical_furnace_back_lit"
}}}
}
}

View file

@ -7,7 +7,8 @@
"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"
"back": "engineersdecor:blocks/furnace/small_electrical_furnace_back",
"radiator": "engineersdecor:blocks/furnace/small_electrical_furnace_radiator"
},
"elements": [
{
@ -15,9 +16,9 @@
"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"}
"north": {"uv": [0, 0, 1, 5.5], "texture": "#radiator"},
"east": {"uv": [0, 1, 5, 15], "rotation": 90, "texture": "#radiator"},
"south": {"uv": [0, 0, 1, 5.5], "texture": "#radiator"}
}
},
{
@ -25,9 +26,9 @@
"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"}
"north": {"uv": [0, 0, 1, 5.5], "texture": "#radiator"},
"south": {"uv": [0, 0, 1, 5.5], "texture": "#radiator"},
"west": {"uv": [11, 1, 16, 15], "rotation": 270, "texture": "#radiator"}
}
},
{

Binary file not shown.

After

Width:  |  Height:  |  Size: 893 B

View file

@ -0,0 +1 @@
{ "animation":{ "frames": [0,1,2], "frametime":16, "interpolate":true }}

Binary file not shown.

After

Width:  |  Height:  |  Size: 876 B

View file

@ -0,0 +1 @@
{ "animation":{ "frames": [0,1,2], "frametime":16, "interpolate":true }}

View file

@ -1 +0,0 @@
{ "animation":{ "frames": [0,1,2,3,4,5,6,7], "frametime":8, "interpolate":true }}

Binary file not shown.

After

Width:  |  Height:  |  Size: 448 B

View file

@ -1,7 +1,8 @@
{
"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.5-b1": "[A] Added passive fluid accumulator.\n[A] Added small electrical passthrough-furnace.\n[F] Fixed version check URL.\n[M] Opt-out config options for valves, passive fluid accumulator, and furni.",
"1.0.4": "[R] Release based on v1.0.4-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 pressurized transfer. * Tool tip 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.",
@ -43,7 +44,7 @@
},
"promos": {
"1.12.2-recommended": "1.0.4",
"1.12.2-latest": "1.0.4",
"1.12.2-latest": "1.0.5-b1",
"1.13.2-recommended": "",
"1.13.2-latest": "1.0.4-b3"
}