1.12: Factory Hopper. Recipe json file tree structured. Conditional recipe constant fixed. Waste Incinerator shifting improved.

This commit is contained in:
stfwi 2019-10-19 14:09:42 +02:00
parent 97ae2c3af1
commit 0d8c86bf8d
127 changed files with 37 additions and 36 deletions

View file

@ -5,4 +5,4 @@ version_minecraft=1.14.4
version_forge_minecraft=1.14.4-28.1.44
version_fml_mappings=20190719-1.14.3
version_jei=1.14.4:6.0.0.10
version_engineersdecor=1.0.13-b3
version_engineersdecor=1.0.14-b1

View file

@ -1,6 +1,7 @@
{
"homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/",
"1.14.4": {
"1.0.14-b1": "[U] Updated to Forge 1.14.4-28.1.40/20190719-1.14.3.\n[A] Factory Hopper added (configurable hopper and item collector).\n[M] Switched to integrated loot table generation.\n[M] Lang file zh_cn updated (scikirbypoke, PR#53).",
"1.0.13-b2": "[A] Added Steel Mesh Fence.\n[A] Added Broad Window Sill.",
"1.0.12-b3": "[U] Updated to Forge 1.14.4-28.1.10/20190719-1.14.3.\n[A] Crafting Table: Added recipe collision resolver, also applies to crafting history refabrication.\n[A] Crafting Table: Added rendering of placed items on the top surface of the table.\n[A] Waterlogging of non-full-blocks added.",
"1.0.12-b2": "[U] Updated to Forge 1.14.4-28.0.105/20190719-1.14.3.\n[A] Small Solar Panel added.\n[M] Items fall through the Steel Floor Grating like in 1.12.2 version.\n[M] Factory Dropper: Added pulse/continuous mode in GUI (issue #51, thx Aristine for the CR).",
@ -26,6 +27,6 @@
},
"promos": {
"1.14.4-recommended": "",
"1.14.4-latest": "1.0.13-b2"
"1.14.4-latest": "1.0.14-b1"
}
}

View file

@ -11,7 +11,7 @@ Mod sources for Minecraft version 1.14.4.
## Version history
~ v1.0.13-b3 [U] Updated to Forge 1.14.4-28.1.40/20190719-1.14.3.
- v1.0.14-b1 [U] Updated to Forge 1.14.4-28.1.40/20190719-1.14.3.
[A] Factory Hopper added (configurable hopper and item collector).
[M] Switched to integrated loot table generation.
[M] Lang file zh_cn updated (scikirbypoke, PR#53).

View file

@ -465,6 +465,7 @@ public class ModContent
TREATED_WOOD_CRAFTING_TABLE,
SMALL_LAB_FURNACE,
FACTORY_DROPPER,
FACTORY_HOPPER,
SMALL_ELECTRICAL_FURNACE,
SMALL_WASTE_INCINERATOR,
SMALL_MINERAL_SMELTER,
@ -529,7 +530,6 @@ public class ModContent
};
private static final Block devBlocks[] = {
FACTORY_HOPPER,
STRAIGHT_CHECK_VALVE,
STRAIGHT_REDSTONE_VALVE,
STRAIGHT_REDSTONE_ANALOG_VALVE,

View file

@ -505,12 +505,7 @@ public class BlockDecorHopper extends BlockDecorDirected
stacks_.set(current_slot_index_, current_stack);
}
if(!insert_stack.isEmpty()) current_slot_index_ = next_slot(current_slot_index_);
if(num_inserted == 0) {
delay_timer_ += transfer_period_ * 2;
return false;
} else {
return true;
}
return (num_inserted > 0);
}
private boolean try_item_handler_extract(final IItemHandler ih)
@ -559,19 +554,20 @@ public class BlockDecorHopper extends BlockDecorDirected
{
AxisAlignedBB collection_volume;
Vec3d rpos;
if(facing==EnumFacing.UP) {
if(facing==Direction.UP) {
rpos = new Vec3d(0.5+pos.getX(),1.5+pos.getY(),0.5+pos.getZ());
collection_volume = (new AxisAlignedBB(pos.up())).grow(0.1+collection_range_, 0.5, 0.1+collection_range_);
collection_volume = (new AxisAlignedBB(pos.up())).grow(0.1+collection_range_, 0.6, 0.1+collection_range_);
} else {
rpos = new Vec3d(0.5+pos.getX(),-1.5+pos.getY(),0.5+pos.getZ());
collection_volume = (new AxisAlignedBB(pos.down())).grow(0.1+collection_range_, 0.5, 0.1+collection_range_);
collection_volume = (new AxisAlignedBB(pos.down(2))).grow(0.1+collection_range_, 1, 0.1+collection_range_);
}
final List<ItemEntity> items = world.getEntitiesWithinAABB(ItemEntity.class, collection_volume);
if(items.size() <= 0) return false;
final int max_to_collect = 3;
int n_collected = 0;
for(ItemEntity ie:items) {
if((!ie.onGround) || (ie.cannotPickup() && ie.getDistanceSq(rpos)>=0.7)) continue;
boolean is_direct_collection_tange = ie.getDistanceSq(rpos)<0.7;
if(!is_direct_collection_tange && (ie.cannotPickup() || (!ie.onGround))) continue;
ItemStack stack = ie.getItem();
int n_accepted = try_insert_into_hopper(stack);
if(n_accepted <= 0) continue;
@ -580,7 +576,7 @@ public class BlockDecorHopper extends BlockDecorDirected
} else {
stack.shrink(n_accepted);
}
if(++n_collected >= max_to_collect) break;
if((!is_direct_collection_tange) && (++n_collected >= max_to_collect)) break;
}
return (n_collected > 0);
}

View file

@ -9,10 +9,6 @@
package wile.engineersdecor.blocks;
import wile.engineersdecor.detail.ModAuxiliaries;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.fluid.IFluidState;
import net.minecraft.world.Explosion;
import net.minecraft.world.World;
import net.minecraft.entity.EntityType;
import net.minecraft.util.math.BlockPos;
import net.minecraft.block.*;
@ -32,6 +28,9 @@ import java.util.List;
public class BlockDecorStairs extends StairsBlock implements IDecorBlock
{
public BlockDecorStairs(long config, BlockState state, Block.Properties properties)
{ super(()->state, properties); }
public BlockDecorStairs(long config, java.util.function.Supplier<BlockState> state, Block.Properties properties)
{ super(state, properties); }
@Override

View file

@ -4,9 +4,9 @@
"model": "engineersdecor:block/pole/straight_thick_metal_pole_head_model",
"x":-90,
"textures": {
"particle": "engineersdecor:blocks/pole/thick_steel_pole_side_texture",
"side": "engineersdecor:blocks/pole/thick_steel_pole_side_texture",
"top": "engineersdecor:blocks/pole/thick_steel_pole_top_texture"
"particle": "engineersdecor:block/pole/thick_steel_pole_side_texture",
"side": "engineersdecor:block/pole/thick_steel_pole_side_texture",
"top": "engineersdecor:block/pole/thick_steel_pole_top_texture"
}
},
"variants": {

View file

@ -4,9 +4,9 @@
"model": "engineersdecor:block/pole/straight_thin_metal_pole_head_model",
"x":-90,
"textures": {
"particle": "engineersdecor:blocks/pole/thin_steel_pole_side_texture",
"side": "engineersdecor:blocks/pole/thin_steel_pole_side_texture",
"top": "engineersdecor:blocks/pole/thin_steel_pole_top_texture"
"particle": "engineersdecor:block/pole/thin_steel_pole_side_texture",
"side": "engineersdecor:block/pole/thin_steel_pole_side_texture",
"top": "engineersdecor:block/pole/thin_steel_pole_top_texture"
}
},
"variants": {