Fixed Tree Cutter/Block Breaker not accepting small energy transfers (issue #82).
This commit is contained in:
parent
216c1259e2
commit
66b2390ca5
19 changed files with 95 additions and 87 deletions
|
@ -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.18
|
||||
version_engineersdecor=1.0.19-b1
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/",
|
||||
"1.12.2": {
|
||||
"1.0.19-b1": "[F] Fixed Tree Cutter / Block Breaker not accepting small energy transfers (thx WindFox, issue #82).",
|
||||
"1.0.18": "[R] Release based on v1.0.18-b2. Release-to-release changes: * Tree cutter config fixes. * Treated Wood Crafting Table mouse tweaks. * Lang updates.\n[M] Lang update ru_ru (PR#77, thanks Smollet777).",
|
||||
"1.0.18-b2": "[A] Added Treated Wood Crafting table tweaks (ctrl-shift moves all same stacks from the inventory, mouse wheel over crafting slot increases/decreases crafting grid stacks).\n[F] EN Lang file fixed (issue #76, thx Riverstar907).\n[F] Fixed Tree Cutter not respecting power-required config (thx federsavo, issue #77).",
|
||||
"1.0.18-b1": "[M] Lang ru_ru updated (Smollet777).",
|
||||
|
@ -77,6 +78,6 @@
|
|||
},
|
||||
"promos": {
|
||||
"1.12.2-recommended": "1.0.18",
|
||||
"1.12.2-latest": "1.0.18"
|
||||
"1.12.2-latest": "1.0.19-b1"
|
||||
}
|
||||
}
|
|
@ -10,6 +10,8 @@ Mod sources for Minecraft version 1.12.2.
|
|||
----
|
||||
## Version history
|
||||
|
||||
- v1.0.19-b1 [F] Fixed Tree Cutter / Block Breaker not accepting small energy transfers (thx WindFox, issue #82).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
- v1.0.18 [R] Release based on v1.0.18-b2. Release-to-release changes:
|
||||
* Tree cutter config fixes.
|
||||
|
|
|
@ -116,7 +116,7 @@ public class BlockDecorBreaker extends BlockDecorDirectedHorizontal
|
|||
private int tick_timer_;
|
||||
private int active_timer_;
|
||||
private int proc_time_elapsed_;
|
||||
private int boost_energy_;
|
||||
private int energy_;
|
||||
|
||||
public static void on_config(int boost_energy_per_tick, int breaking_time_per_hardness, int min_breaking_time_ticks, boolean power_required)
|
||||
{
|
||||
|
@ -151,11 +151,11 @@ public class BlockDecorBreaker extends BlockDecorDirectedHorizontal
|
|||
|
||||
@Override
|
||||
public int getMaxEnergyStored()
|
||||
{ return boost_energy_consumption; }
|
||||
{ return boost_energy_consumption*2; }
|
||||
|
||||
@Override
|
||||
public int getEnergyStored()
|
||||
{ return boost_energy_; }
|
||||
{ return energy_; }
|
||||
|
||||
@Override
|
||||
public int extractEnergy(int maxExtract, boolean simulate)
|
||||
|
@ -164,9 +164,9 @@ public class BlockDecorBreaker extends BlockDecorDirectedHorizontal
|
|||
@Override
|
||||
public int receiveEnergy(int maxReceive, boolean simulate)
|
||||
{
|
||||
if((boost_energy_ >= boost_energy_consumption) || (maxReceive < boost_energy_consumption)) return 0;
|
||||
if(!simulate) boost_energy_ = boost_energy_consumption;
|
||||
return boost_energy_consumption;
|
||||
maxReceive = MathHelper.clamp(maxReceive, 0, Math.max((boost_energy_consumption*2) - energy_, 0));
|
||||
if(!simulate) energy_ += maxReceive;
|
||||
return maxReceive;
|
||||
}
|
||||
|
||||
// Capability export ----------------------------------------------------------------------------
|
||||
|
@ -253,9 +253,9 @@ public class BlockDecorBreaker extends BlockDecorDirectedHorizontal
|
|||
tick_timer_ = IDLE_TICK_INTERVAL;
|
||||
return;
|
||||
}
|
||||
int time_needed = (int)(target_state.getBlockHardness(world, pos) * breaking_reluctance) + min_breaking_time;
|
||||
if(boost_energy_ >= boost_energy_consumption) {
|
||||
boost_energy_ = 0;
|
||||
int time_needed = MathHelper.clamp((int)(target_state.getBlockHardness(world, pos) * breaking_reluctance) + min_breaking_time, min_breaking_time, MAX_BREAKING_TIME);
|
||||
if(energy_ >= boost_energy_consumption) {
|
||||
energy_ -= boost_energy_consumption;
|
||||
proc_time_elapsed_ += TICK_INTERVAL * (1+BOOST_FACTOR);
|
||||
time_needed += min_breaking_time * (3*BOOST_FACTOR/5);
|
||||
active_timer_ = 2;
|
||||
|
@ -266,7 +266,9 @@ public class BlockDecorBreaker extends BlockDecorDirectedHorizontal
|
|||
--active_timer_;
|
||||
}
|
||||
boolean active = (active_timer_ > 0);
|
||||
time_needed = MathHelper.clamp(time_needed, min_breaking_time, MAX_BREAKING_TIME);
|
||||
if(requires_power && !active) {
|
||||
proc_time_elapsed_ = Math.max(0, proc_time_elapsed_ - 2*TICK_INTERVAL);
|
||||
}
|
||||
if(proc_time_elapsed_ >= time_needed) {
|
||||
proc_time_elapsed_ = 0;
|
||||
breakBlock(target_state, target_pos, world);
|
||||
|
|
|
@ -344,7 +344,6 @@ public class BlockDecorFluidFunnel extends BlockDecor
|
|||
if(trail.isEmpty()) break; // reset search
|
||||
if(num_adjacent==0) pos = trail.pop();
|
||||
}
|
||||
//println("FAIL=" + steps + " - " + (pos.subtract(collection_pos))); String s = new String(); for(BlockPos p:checked) s += "\n" + p; System.out.println(s);
|
||||
if(intensive_search_counter_ > 2) world.setBlockToAir(pos);
|
||||
last_pick_pos_ = collection_pos;
|
||||
search_offsets_ = null; // try other search order
|
||||
|
|
|
@ -104,7 +104,7 @@ public class BlockDecorTreeCutter extends BlockDecorDirectedHorizontal
|
|||
private int tick_timer_;
|
||||
private int active_timer_;
|
||||
private int proc_time_elapsed_; // small, not saved in nbt.
|
||||
private int boost_energy_; // small, not saved in nbt.
|
||||
private int energy_; // small, not saved in nbt.
|
||||
|
||||
public static void on_config(int boost_energy_per_tick, int cutting_time_seconds, boolean power_required)
|
||||
{
|
||||
|
@ -135,11 +135,11 @@ public class BlockDecorTreeCutter extends BlockDecorDirectedHorizontal
|
|||
|
||||
@Override
|
||||
public int getMaxEnergyStored()
|
||||
{ return boost_energy_consumption; }
|
||||
{ return boost_energy_consumption*2; }
|
||||
|
||||
@Override
|
||||
public int getEnergyStored()
|
||||
{ return boost_energy_; }
|
||||
{ return energy_; }
|
||||
|
||||
@Override
|
||||
public int extractEnergy(int maxExtract, boolean simulate)
|
||||
|
@ -147,10 +147,10 @@ public class BlockDecorTreeCutter extends BlockDecorDirectedHorizontal
|
|||
|
||||
@Override
|
||||
public int receiveEnergy(int maxReceive, boolean simulate)
|
||||
{ // only speedup support, no buffering, not in nbt -> no markdirty
|
||||
if((boost_energy_ >= boost_energy_consumption) || (maxReceive < boost_energy_consumption)) return 0;
|
||||
if(!simulate) boost_energy_ = boost_energy_consumption;
|
||||
return boost_energy_consumption;
|
||||
{
|
||||
maxReceive = MathHelper.clamp(maxReceive, 0, Math.max((boost_energy_consumption*2) - energy_, 0));
|
||||
if(!simulate) energy_ += maxReceive;
|
||||
return maxReceive;
|
||||
}
|
||||
|
||||
// Capability export ----------------------------------------------------------------------------
|
||||
|
@ -197,8 +197,8 @@ public class BlockDecorTreeCutter extends BlockDecorDirectedHorizontal
|
|||
return;
|
||||
}
|
||||
proc_time_elapsed_ += TICK_INTERVAL;
|
||||
if(boost_energy_ >= boost_energy_consumption) {
|
||||
boost_energy_ = 0;
|
||||
if(energy_ >= boost_energy_consumption) {
|
||||
energy_ -= boost_energy_consumption;
|
||||
proc_time_elapsed_ += TICK_INTERVAL*BOOST_FACTOR;
|
||||
active_timer_ = 2;
|
||||
} else if(!requires_power) {
|
||||
|
|
|
@ -5,4 +5,4 @@ version_minecraft=1.14.4
|
|||
version_forge_minecraft=1.14.4-28.1.116
|
||||
version_fml_mappings=20190719-1.14.3
|
||||
version_jei=1.14.4:6.0.0.10
|
||||
version_engineersdecor=1.0.18-b4
|
||||
version_engineersdecor=1.0.19-b1
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/",
|
||||
"1.14.4": {
|
||||
"1.0.19-b1": "[F] Fixed Tree Cutter / Block Breaker not accepting small energy transfers (thx WindFox, issue #82).",
|
||||
"1.0.18-b4": "[M] Lang update ru_ru (PR#77, thanks Smollet777).\n[F] Fixed Milking machine cow path issue, added milking delay cow tracking.\n[F] Slab / Slab Slice placement adapted to vanilla standard.",
|
||||
"1.0.18-b3": "[A] Added Treated Wood Crafting table tweaks (ctrl-shift moves all same stacks from the inventory, mouse wheel over crafting slot increases/decreases crafting grid stacks).\n[F] EN Lang file fixed (issue #76, thx Riverstar907).\n[F] Fixed Tree Cutter not respecting power-required config (thx federsavo, issue #77).\n[F] Fixed Small Solar Panel not exposing energy capability (thx MatthiasMann, issue #78).",
|
||||
"1.0.18-b2": "[F] Fixed JEI integration warning if nothing is opt'ed out (thx @SDUBZ for reporting).\n[M] Lang ru_ru updated (Smollet777).",
|
||||
|
@ -44,6 +45,6 @@
|
|||
},
|
||||
"promos": {
|
||||
"1.14.4-recommended": "",
|
||||
"1.14.4-latest": "1.0.18-b4"
|
||||
"1.14.4-latest": "1.0.19-b1"
|
||||
}
|
||||
}
|
|
@ -11,6 +11,8 @@ Mod sources for Minecraft version 1.14.4.
|
|||
|
||||
## Version history
|
||||
|
||||
- v1.0.19-b1 [F] Fixed Tree Cutter / Block Breaker not accepting small energy transfers (thx WindFox, issue #82).
|
||||
|
||||
- v1.0.18-b4 [M] Lang update ru_ru (PR#77, thanks Smollet777).
|
||||
[F] Fixed Milking machine cow path issue, added milking delay cow tracking.
|
||||
[F] Slab / Slab Slice placement adapted to vanilla standard.
|
||||
|
|
|
@ -126,7 +126,7 @@ public class BlockDecorBreaker extends BlockDecorDirectedHorizontal
|
|||
private int tick_timer_;
|
||||
private int active_timer_;
|
||||
private int proc_time_elapsed_;
|
||||
private int boost_energy_;
|
||||
private int energy_;
|
||||
|
||||
public static void on_config(int boost_energy_per_tick, int breaking_time_per_hardness, int min_breaking_time_ticks, boolean power_required)
|
||||
{
|
||||
|
@ -161,11 +161,11 @@ public class BlockDecorBreaker extends BlockDecorDirectedHorizontal
|
|||
|
||||
@Override
|
||||
public int getMaxEnergyStored()
|
||||
{ return boost_energy_consumption; }
|
||||
{ return boost_energy_consumption*2; }
|
||||
|
||||
@Override
|
||||
public int getEnergyStored()
|
||||
{ return boost_energy_; }
|
||||
{ return energy_; }
|
||||
|
||||
@Override
|
||||
public int extractEnergy(int maxExtract, boolean simulate)
|
||||
|
@ -173,10 +173,10 @@ public class BlockDecorBreaker extends BlockDecorDirectedHorizontal
|
|||
|
||||
@Override
|
||||
public int receiveEnergy(int maxReceive, boolean simulate)
|
||||
{ // only speedup support, no buffering, not in nbt -> no markdirty
|
||||
if((boost_energy_ >= boost_energy_consumption) || (maxReceive < boost_energy_consumption)) return 0;
|
||||
if(!simulate) boost_energy_ = boost_energy_consumption;
|
||||
return boost_energy_consumption;
|
||||
{
|
||||
maxReceive = MathHelper.clamp(maxReceive, 0, Math.max((boost_energy_consumption*2) - energy_, 0));
|
||||
if(!simulate) energy_ += maxReceive;
|
||||
return maxReceive;
|
||||
}
|
||||
|
||||
// Capability export ----------------------------------------------------------------------------
|
||||
|
@ -262,9 +262,9 @@ public class BlockDecorBreaker extends BlockDecorDirectedHorizontal
|
|||
tick_timer_ = IDLE_TICK_INTERVAL;
|
||||
return;
|
||||
}
|
||||
int time_needed = (int)(target_state.getBlockHardness(world, pos) * breaking_reluctance) + min_breaking_time;
|
||||
if(boost_energy_ >= boost_energy_consumption) {
|
||||
boost_energy_ = 0;
|
||||
int time_needed = MathHelper.clamp((int)(target_state.getBlockHardness(world, pos) * breaking_reluctance) + min_breaking_time, min_breaking_time, MAX_BREAKING_TIME);
|
||||
if(energy_ >= boost_energy_consumption) {
|
||||
energy_ -= boost_energy_consumption;
|
||||
proc_time_elapsed_ += TICK_INTERVAL * (1+BOOST_FACTOR);
|
||||
time_needed += min_breaking_time * (3*BOOST_FACTOR/5);
|
||||
active_timer_ = 2;
|
||||
|
@ -275,12 +275,9 @@ public class BlockDecorBreaker extends BlockDecorDirectedHorizontal
|
|||
--active_timer_;
|
||||
}
|
||||
boolean active = (active_timer_ > 0);
|
||||
if(boost_energy_ >= boost_energy_consumption) {
|
||||
boost_energy_ = 0;
|
||||
proc_time_elapsed_ += TICK_INTERVAL * BOOST_FACTOR;
|
||||
time_needed += min_breaking_time * (3*BOOST_FACTOR/5);
|
||||
if(requires_power && !active) {
|
||||
proc_time_elapsed_ = Math.max(0, proc_time_elapsed_ - 2*TICK_INTERVAL);
|
||||
}
|
||||
time_needed = MathHelper.clamp(time_needed, min_breaking_time, MAX_BREAKING_TIME);
|
||||
if(proc_time_elapsed_ >= time_needed) {
|
||||
proc_time_elapsed_ = 0;
|
||||
breakBlock(target_state, target_pos, world);
|
||||
|
|
|
@ -95,7 +95,7 @@ public class BlockDecorTreeCutter extends BlockDecorDirectedHorizontal
|
|||
private int tick_timer_;
|
||||
private int active_timer_;
|
||||
private int proc_time_elapsed_;
|
||||
private int boost_energy_;
|
||||
private int energy_;
|
||||
|
||||
public static void on_config(int boost_energy_per_tick, int cutting_time_seconds, boolean power_required)
|
||||
{
|
||||
|
@ -125,11 +125,11 @@ public class BlockDecorTreeCutter extends BlockDecorDirectedHorizontal
|
|||
|
||||
@Override
|
||||
public int getMaxEnergyStored()
|
||||
{ return boost_energy_consumption; }
|
||||
{ return boost_energy_consumption*2; }
|
||||
|
||||
@Override
|
||||
public int getEnergyStored()
|
||||
{ return boost_energy_; }
|
||||
{ return energy_; }
|
||||
|
||||
@Override
|
||||
public int extractEnergy(int maxExtract, boolean simulate)
|
||||
|
@ -137,10 +137,10 @@ public class BlockDecorTreeCutter extends BlockDecorDirectedHorizontal
|
|||
|
||||
@Override
|
||||
public int receiveEnergy(int maxReceive, boolean simulate)
|
||||
{ // only speedup support, no buffering, not in nbt -> no markdirty
|
||||
if((boost_energy_ >= boost_energy_consumption) || (maxReceive < boost_energy_consumption)) return 0;
|
||||
if(!simulate) boost_energy_ = boost_energy_consumption;
|
||||
return boost_energy_consumption;
|
||||
{
|
||||
maxReceive = MathHelper.clamp(maxReceive, 0, Math.max((boost_energy_consumption*2) - energy_, 0));
|
||||
if(!simulate) energy_ += maxReceive;
|
||||
return maxReceive;
|
||||
}
|
||||
|
||||
// Capability export ----------------------------------------------------------------------------
|
||||
|
@ -182,8 +182,8 @@ public class BlockDecorTreeCutter extends BlockDecorDirectedHorizontal
|
|||
return;
|
||||
}
|
||||
proc_time_elapsed_ += TICK_INTERVAL;
|
||||
if(boost_energy_ >= boost_energy_consumption) {
|
||||
boost_energy_ = 0;
|
||||
if(energy_ >= boost_energy_consumption) {
|
||||
energy_ -= boost_energy_consumption;
|
||||
proc_time_elapsed_ += TICK_INTERVAL*BOOST_FACTOR;
|
||||
active_timer_ = 2;
|
||||
} else if(!requires_power) {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# @file gradle.properties
|
||||
org.gradle.daemon=false
|
||||
org.gradle.jvmargs=-Xmx8G
|
||||
version_minecraft=1.15.1
|
||||
version_forge_minecraft=1.15.1-30.0.51
|
||||
version_minecraft=1.15.2
|
||||
version_forge_minecraft=1.15.2-31.0.1
|
||||
version_fml_mappings=20191105-1.14.3
|
||||
version_jei=1.15.1-6.0.0.1
|
||||
version_engineersdecor=1.0.18-b4
|
||||
version_jei=1.15.2-6.0.0.2
|
||||
version_engineersdecor=1.0.19-b1
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/",
|
||||
"1.15.1": {
|
||||
"1.15.2": {
|
||||
"1.0.19-b1": "[U] Update to 1.15.2.\n[F] Fixed Tree Cutter / Block Breaker not accepting small energy transfers (thx WindFox, issue #82).",
|
||||
"1.0.18-b4": "[A] Ported Treated Wood Crafting Table item rendering.\n[F] Fixed Milking machine cow path issue, added milking delay cow tracking.\n[F] Slab / Slab Slice placement adapted to vanilla standard.\n[M] Lang update ru_ru (PR#77, thanks Smollet777).",
|
||||
"1.0.18-b3": "[A] Added Treated Wood Crafting Table tweaks (ctrl-shift moves all same stacks from the inventory, mouse wheel over crafting slot increases/decreases crafting grid stacks).\n[F] EN Lang file fixed (issue #76, thx Riverstar907).\n[F] Fixed Tree Cutter not respecting power-required config (thx federsavo, issue #77).\n[F] Fixed Small Solar Panel not exposing energy capability (thx MatthiasMann, issue #78).",
|
||||
"1.0.18-b2": "[M] Lang ru_ru updated (Smollet777).",
|
||||
|
@ -8,7 +9,7 @@
|
|||
"1.0.17-b2": "[A] Initial port."
|
||||
},
|
||||
"promos": {
|
||||
"1.15.1-recommended": "",
|
||||
"1.15.1-latest": "1.0.18-b4"
|
||||
"1.15.2-recommended": "",
|
||||
"1.15.2-latest": "1.0.19-b1"
|
||||
}
|
||||
}
|
|
@ -11,6 +11,9 @@ Mod sources for Minecraft version 1.15.1.
|
|||
|
||||
## Version history
|
||||
|
||||
- v1.0.19-b1 [U] Update to 1.15.2.
|
||||
[F] Fixed Tree Cutter / Block Breaker not accepting small energy transfers (thx WindFox, issue #82).
|
||||
|
||||
- v1.0.18-b4 [A] Ported Treated Wood Crafting Table item rendering.
|
||||
[F] Fixed Milking machine cow path issue, added milking delay cow tracking.
|
||||
[F] Slab / Slab Slice placement adapted to vanilla standard.
|
||||
|
|
|
@ -126,7 +126,7 @@ public class BlockDecorBreaker extends BlockDecorDirectedHorizontal
|
|||
private int tick_timer_;
|
||||
private int active_timer_;
|
||||
private int proc_time_elapsed_;
|
||||
private int boost_energy_;
|
||||
private int energy_;
|
||||
|
||||
public static void on_config(int boost_energy_per_tick, int breaking_time_per_hardness, int min_breaking_time_ticks, boolean power_required)
|
||||
{
|
||||
|
@ -161,11 +161,11 @@ public class BlockDecorBreaker extends BlockDecorDirectedHorizontal
|
|||
|
||||
@Override
|
||||
public int getMaxEnergyStored()
|
||||
{ return boost_energy_consumption; }
|
||||
{ return boost_energy_consumption*2; }
|
||||
|
||||
@Override
|
||||
public int getEnergyStored()
|
||||
{ return boost_energy_; }
|
||||
{ return energy_; }
|
||||
|
||||
@Override
|
||||
public int extractEnergy(int maxExtract, boolean simulate)
|
||||
|
@ -173,10 +173,10 @@ public class BlockDecorBreaker extends BlockDecorDirectedHorizontal
|
|||
|
||||
@Override
|
||||
public int receiveEnergy(int maxReceive, boolean simulate)
|
||||
{ // only speedup support, no buffering, not in nbt -> no markdirty
|
||||
if((boost_energy_ >= boost_energy_consumption) || (maxReceive < boost_energy_consumption)) return 0;
|
||||
if(!simulate) boost_energy_ = boost_energy_consumption;
|
||||
return boost_energy_consumption;
|
||||
{
|
||||
maxReceive = MathHelper.clamp(maxReceive, 0, Math.max((boost_energy_consumption*2) - energy_, 0));
|
||||
if(!simulate) energy_ += maxReceive;
|
||||
return maxReceive;
|
||||
}
|
||||
|
||||
// Capability export ----------------------------------------------------------------------------
|
||||
|
@ -262,9 +262,9 @@ public class BlockDecorBreaker extends BlockDecorDirectedHorizontal
|
|||
tick_timer_ = IDLE_TICK_INTERVAL;
|
||||
return;
|
||||
}
|
||||
int time_needed = (int)(target_state.getBlockHardness(world, pos) * breaking_reluctance) + min_breaking_time;
|
||||
if(boost_energy_ >= boost_energy_consumption) {
|
||||
boost_energy_ = 0;
|
||||
int time_needed = MathHelper.clamp((int)(target_state.getBlockHardness(world, pos) * breaking_reluctance) + min_breaking_time, min_breaking_time, MAX_BREAKING_TIME);
|
||||
if(energy_ >= boost_energy_consumption) {
|
||||
energy_ -= boost_energy_consumption;
|
||||
proc_time_elapsed_ += TICK_INTERVAL * (1+BOOST_FACTOR);
|
||||
time_needed += min_breaking_time * (3*BOOST_FACTOR/5);
|
||||
active_timer_ = 2;
|
||||
|
@ -275,12 +275,9 @@ public class BlockDecorBreaker extends BlockDecorDirectedHorizontal
|
|||
--active_timer_;
|
||||
}
|
||||
boolean active = (active_timer_ > 0);
|
||||
if(boost_energy_ >= boost_energy_consumption) {
|
||||
boost_energy_ = 0;
|
||||
proc_time_elapsed_ += TICK_INTERVAL * BOOST_FACTOR;
|
||||
time_needed += min_breaking_time * (3*BOOST_FACTOR/5);
|
||||
if(requires_power && !active) {
|
||||
proc_time_elapsed_ = Math.max(0, proc_time_elapsed_ - 2*TICK_INTERVAL);
|
||||
}
|
||||
time_needed = MathHelper.clamp(time_needed, min_breaking_time, MAX_BREAKING_TIME);
|
||||
if(proc_time_elapsed_ >= time_needed) {
|
||||
proc_time_elapsed_ = 0;
|
||||
breakBlock(target_state, target_pos, world);
|
||||
|
|
|
@ -306,7 +306,7 @@ public class BlockDecorMilker extends BlockDecorDirectedHorizontal
|
|||
private static final HashMap<Integer, Long> tracked_cows_ = new HashMap<Integer, Long>();
|
||||
|
||||
private void log(String s)
|
||||
{ System.out.println("Milker|" + s); } // println("Milker|" + s); may be enabled with config, for dev was println
|
||||
{} // println("Milker|" + s); may be enabled with config, for dev was println
|
||||
|
||||
private static ItemStack milk_filled_container_item(ItemStack stack)
|
||||
{ return milk_containers_.entrySet().stream().filter(e->e.getKey().isItemEqual(stack)).map(Map.Entry::getValue).findFirst().orElse(ItemStack.EMPTY); }
|
||||
|
|
|
@ -95,7 +95,7 @@ public class BlockDecorTreeCutter extends BlockDecorDirectedHorizontal
|
|||
private int tick_timer_;
|
||||
private int active_timer_;
|
||||
private int proc_time_elapsed_;
|
||||
private int boost_energy_;
|
||||
private int energy_;
|
||||
|
||||
public static void on_config(int boost_energy_per_tick, int cutting_time_seconds, boolean power_required)
|
||||
{
|
||||
|
@ -125,11 +125,11 @@ public class BlockDecorTreeCutter extends BlockDecorDirectedHorizontal
|
|||
|
||||
@Override
|
||||
public int getMaxEnergyStored()
|
||||
{ return boost_energy_consumption; }
|
||||
{ return boost_energy_consumption*2; }
|
||||
|
||||
@Override
|
||||
public int getEnergyStored()
|
||||
{ return boost_energy_; }
|
||||
{ return energy_; }
|
||||
|
||||
@Override
|
||||
public int extractEnergy(int maxExtract, boolean simulate)
|
||||
|
@ -137,10 +137,10 @@ public class BlockDecorTreeCutter extends BlockDecorDirectedHorizontal
|
|||
|
||||
@Override
|
||||
public int receiveEnergy(int maxReceive, boolean simulate)
|
||||
{ // only speedup support, no buffering, not in nbt -> no markdirty
|
||||
if((boost_energy_ >= boost_energy_consumption) || (maxReceive < boost_energy_consumption)) return 0;
|
||||
if(!simulate) boost_energy_ = boost_energy_consumption;
|
||||
return boost_energy_consumption;
|
||||
{
|
||||
maxReceive = MathHelper.clamp(maxReceive, 0, Math.max((boost_energy_consumption*2) - energy_, 0));
|
||||
if(!simulate) energy_ += maxReceive;
|
||||
return maxReceive;
|
||||
}
|
||||
|
||||
// Capability export ----------------------------------------------------------------------------
|
||||
|
@ -182,8 +182,8 @@ public class BlockDecorTreeCutter extends BlockDecorDirectedHorizontal
|
|||
return;
|
||||
}
|
||||
proc_time_elapsed_ += TICK_INTERVAL;
|
||||
if(boost_energy_ >= boost_energy_consumption) {
|
||||
boost_energy_ = 0;
|
||||
if(energy_ >= boost_energy_consumption) {
|
||||
energy_ -= boost_energy_consumption;
|
||||
proc_time_elapsed_ += TICK_INTERVAL*BOOST_FACTOR;
|
||||
active_timer_ = 2;
|
||||
} else if(!requires_power) {
|
||||
|
|
|
@ -18,13 +18,13 @@ logoFile="logo.png"
|
|||
[[dependencies.engineersdecor]]
|
||||
modId="forge"
|
||||
mandatory=true
|
||||
versionRange="[30.0.16,)"
|
||||
versionRange="[31.0.1,)"
|
||||
ordering="NONE"
|
||||
side="BOTH"
|
||||
|
||||
[[dependencies.engineersdecor]]
|
||||
modId="minecraft"
|
||||
mandatory=true
|
||||
versionRange="[1.15.1]"
|
||||
versionRange="[1.15.2]"
|
||||
ordering="NONE"
|
||||
side="BOTH"
|
||||
|
|
|
@ -2,13 +2,14 @@
|
|||
"homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/",
|
||||
"promos": {
|
||||
"1.12.2-recommended": "1.0.18",
|
||||
"1.12.2-latest": "1.0.18",
|
||||
"1.12.2-latest": "1.0.19-b1",
|
||||
"1.14.4-recommended": "",
|
||||
"1.14.4-latest": "1.0.18-b4",
|
||||
"1.15.1-recommended": "",
|
||||
"1.15.1-latest": "1.0.18-b4"
|
||||
"1.14.4-latest": "1.0.19-b1",
|
||||
"1.15.2-recommended": "",
|
||||
"1.15.2-latest": "1.0.19-b1"
|
||||
},
|
||||
"1.12.2": {
|
||||
"1.0.19-b1": "[F] Fixed Tree Cutter / Block Breaker not accepting small energy transfers (thx WindFox, issue #82).",
|
||||
"1.0.18": "[R] Release based on v1.0.18-b2. Release-to-release changes: * Tree cutter config fixes. * Treated Wood Crafting Table mouse tweaks. * Lang updates.\n[M] Lang update ru_ru (PR#77, thanks Smollet777).",
|
||||
"1.0.18-b2": "[A] Added Treated Wood Crafting table tweaks (ctrl-shift moves all same stacks from the inventory, mouse wheel over crafting slot increases/decreases crafting grid stacks).\n[F] EN Lang file fixed (issue #76, thx Riverstar907).\n[F] Fixed Tree Cutter not respecting power-required config (thx federsavo, issue #77).",
|
||||
"1.0.18-b1": "[M] Lang ru_ru updated (Smollet777).",
|
||||
|
@ -84,6 +85,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.14.4": {
|
||||
"1.0.19-b1": "[F] Fixed Tree Cutter / Block Breaker not accepting small energy transfers (thx WindFox, issue #82).",
|
||||
"1.0.18-b4": "[M] Lang update ru_ru (PR#77, thanks Smollet777).\n[F] Fixed Milking machine cow path issue, added milking delay cow tracking.\n[F] Slab / Slab Slice placement adapted to vanilla standard.",
|
||||
"1.0.18-b3": "[A] Added Treated Wood Crafting table tweaks (ctrl-shift moves all same stacks from the inventory, mouse wheel over crafting slot increases/decreases crafting grid stacks).\n[F] EN Lang file fixed (issue #76, thx Riverstar907).\n[F] Fixed Tree Cutter not respecting power-required config (thx federsavo, issue #77).\n[F] Fixed Small Solar Panel not exposing energy capability (thx MatthiasMann, issue #78).",
|
||||
"1.0.18-b2": "[F] Fixed JEI integration warning if nothing is opt'ed out (thx @SDUBZ for reporting).\n[M] Lang ru_ru updated (Smollet777).",
|
||||
|
@ -125,7 +127,8 @@
|
|||
"1.0.7-b4": "[U] Updated to Forge BETA 1.14.2-26.0.32/20190608-1.14.2.\n[A] Sitting on the stool ported.\n[A] Ladder climbing speed boost ported.\n[A] Crafting table functionality ported.\n[I] Issue: Scoped recipe constants not working yet with the current Forge version (or somehow changed).",
|
||||
"1.0.7-b3": "[A] Initial 1.14.2 port of decorative blocks."
|
||||
},
|
||||
"1.15.1": {
|
||||
"1.15.2": {
|
||||
"1.0.19-b1": "[U] Update to 1.15.2.\n[F] Fixed Tree Cutter / Block Breaker not accepting small energy transfers (thx WindFox, issue #82).",
|
||||
"1.0.18-b4": "[A] Ported Treated Wood Crafting Table item rendering.\n[F] Fixed Milking machine cow path issue, added milking delay cow tracking.\n[F] Slab / Slab Slice placement adapted to vanilla standard.\n[M] Lang update ru_ru (PR#77, thanks Smollet777).",
|
||||
"1.0.18-b3": "[A] Added Treated Wood Crafting Table tweaks (ctrl-shift moves all same stacks from the inventory, mouse wheel over crafting slot increases/decreases crafting grid stacks).\n[F] EN Lang file fixed (issue #76, thx Riverstar907).\n[F] Fixed Tree Cutter not respecting power-required config (thx federsavo, issue #77).\n[F] Fixed Small Solar Panel not exposing energy capability (thx MatthiasMann, issue #78).",
|
||||
"1.0.18-b2": "[M] Lang ru_ru updated (Smollet777).",
|
||||
|
|
Loading…
Reference in a new issue