Crushers and furnaces keep energy.

Fixed crusher crash.
This commit is contained in:
Flanks255 2022-10-19 09:57:56 -05:00
parent e8fee61c91
commit 120721564e
8 changed files with 51 additions and 12 deletions

View file

@ -480,8 +480,8 @@ f3df22f203e8c00ee7ee004bb9b4edfd522f069a data/actuallyadditions/loot_tables/bloc
bf7743c27757cf5b0dbab9b3e15d1d5ca1ece818 data/actuallyadditions/loot_tables/blocks/coal_generator.json bf7743c27757cf5b0dbab9b3e15d1d5ca1ece818 data/actuallyadditions/loot_tables/blocks/coal_generator.json
66ee33930c8392b29710ce2bc117f99907e336df data/actuallyadditions/loot_tables/blocks/coffee.json 66ee33930c8392b29710ce2bc117f99907e336df data/actuallyadditions/loot_tables/blocks/coffee.json
3285202e3f840d091b8d85dc2c721199fcc96240 data/actuallyadditions/loot_tables/blocks/coffee_machine.json 3285202e3f840d091b8d85dc2c721199fcc96240 data/actuallyadditions/loot_tables/blocks/coffee_machine.json
98c2198bf7df995a8c43f08101eb2021a62e1dec data/actuallyadditions/loot_tables/blocks/crusher.json 317d0377327250f2fe15ff549a1ffa1b7bdade14 data/actuallyadditions/loot_tables/blocks/crusher.json
93c16ed7d46e44ceafdc32c2a440f98b8c805723 data/actuallyadditions/loot_tables/blocks/crusher_double.json b087c6f44cf0236f52471ec54c026ee30ba0d273 data/actuallyadditions/loot_tables/blocks/crusher_double.json
6336ca572b8d81f6e06b43bb925b48bb915b6574 data/actuallyadditions/loot_tables/blocks/diamatine_crystal_block.json 6336ca572b8d81f6e06b43bb925b48bb915b6574 data/actuallyadditions/loot_tables/blocks/diamatine_crystal_block.json
b9ed4007fec7a382a02b08b231f072df6aa40049 data/actuallyadditions/loot_tables/blocks/diamatine_crystal_cluster.json b9ed4007fec7a382a02b08b231f072df6aa40049 data/actuallyadditions/loot_tables/blocks/diamatine_crystal_cluster.json
7476dbc0cbb3c1a8ce5a3c1562f73fcfb4adcd10 data/actuallyadditions/loot_tables/blocks/display_stand.json 7476dbc0cbb3c1a8ce5a3c1562f73fcfb4adcd10 data/actuallyadditions/loot_tables/blocks/display_stand.json
@ -559,7 +559,7 @@ d6c0f113ea7c3cc0e8c3a11860792966d516211b data/actuallyadditions/loot_tables/bloc
a365f2f0d80e070d281a7b839c961d36f115abeb data/actuallyadditions/loot_tables/blocks/phantom_redstoneface.json a365f2f0d80e070d281a7b839c961d36f115abeb data/actuallyadditions/loot_tables/blocks/phantom_redstoneface.json
13f0d4587dac4822a26fd063a22f6f46c83e9af6 data/actuallyadditions/loot_tables/blocks/placer.json 13f0d4587dac4822a26fd063a22f6f46c83e9af6 data/actuallyadditions/loot_tables/blocks/placer.json
6d9a73f94513ed92c1697d25c5d89145b016ab5d data/actuallyadditions/loot_tables/blocks/player_interface.json 6d9a73f94513ed92c1697d25c5d89145b016ab5d data/actuallyadditions/loot_tables/blocks/player_interface.json
25a194a62fcad1b0b86540efbe6ca81757a3408a data/actuallyadditions/loot_tables/blocks/powered_furnace.json bb5b9781aa9c64a1330eff6d7bb3e6c2c7f3a645 data/actuallyadditions/loot_tables/blocks/powered_furnace.json
a92f9584164335ecbcf769bc668289d76cea5d6c data/actuallyadditions/loot_tables/blocks/ranged_collector.json a92f9584164335ecbcf769bc668289d76cea5d6c data/actuallyadditions/loot_tables/blocks/ranged_collector.json
d497fdb4936e1f3fdaa556da79e39f6fcbb405ed data/actuallyadditions/loot_tables/blocks/restonia_crystal_block.json d497fdb4936e1f3fdaa556da79e39f6fcbb405ed data/actuallyadditions/loot_tables/blocks/restonia_crystal_block.json
7d025b370ad83e847619627002ca835901faf235 data/actuallyadditions/loot_tables/blocks/restonia_crystal_cluster.json 7d025b370ad83e847619627002ca835901faf235 data/actuallyadditions/loot_tables/blocks/restonia_crystal_cluster.json

View file

@ -13,6 +13,19 @@
{ {
"condition": "minecraft:survives_explosion" "condition": "minecraft:survives_explosion"
} }
],
"functions": [
{
"function": "minecraft:copy_nbt",
"source": "block_entity",
"ops": [
{
"source": "Energy",
"target": "BlockEntityTag.Energy",
"op": "replace"
}
]
}
] ]
} }
] ]

View file

@ -13,6 +13,19 @@
{ {
"condition": "minecraft:survives_explosion" "condition": "minecraft:survives_explosion"
} }
],
"functions": [
{
"function": "minecraft:copy_nbt",
"source": "block_entity",
"ops": [
{
"source": "Energy",
"target": "BlockEntityTag.Energy",
"op": "replace"
}
]
}
] ]
} }
] ]

View file

@ -13,6 +13,19 @@
{ {
"condition": "minecraft:survives_explosion" "condition": "minecraft:survives_explosion"
} }
],
"functions": [
{
"function": "minecraft:copy_nbt",
"source": "block_entity",
"ops": [
{
"source": "Energy",
"target": "BlockEntityTag.Energy",
"op": "replace"
}
]
}
] ]
} }
] ]

View file

@ -57,6 +57,9 @@ public class LootTableGenerator extends LootTableProvider {
dropKeepEnergy(ActuallyBlocks.DISPLAY_STAND); dropKeepEnergy(ActuallyBlocks.DISPLAY_STAND);
dropKeepEnergy(ActuallyBlocks.COAL_GENERATOR); dropKeepEnergy(ActuallyBlocks.COAL_GENERATOR);
dropKeepEnergy(ActuallyBlocks.OIL_GENERATOR); dropKeepEnergy(ActuallyBlocks.OIL_GENERATOR);
dropKeepEnergy(ActuallyBlocks.CRUSHER);
dropKeepEnergy(ActuallyBlocks.CRUSHER_DOUBLE);
dropKeepEnergy(ActuallyBlocks.POWERED_FURNACE);
this.dropSelf(ActuallyBlocks.BATTERY_BOX.get()); this.dropSelf(ActuallyBlocks.BATTERY_BOX.get());
this.dropSelf(ActuallyBlocks.ITEM_INTERFACE_HOPPING.get()); this.dropSelf(ActuallyBlocks.ITEM_INTERFACE_HOPPING.get());
@ -81,9 +84,6 @@ public class LootTableGenerator extends LootTableProvider {
this.dropSelf(ActuallyBlocks.PHANTOM_BREAKER.get()); this.dropSelf(ActuallyBlocks.PHANTOM_BREAKER.get());
this.dropSelf(ActuallyBlocks.FERMENTING_BARREL.get()); this.dropSelf(ActuallyBlocks.FERMENTING_BARREL.get());
this.dropSelf(ActuallyBlocks.FEEDER.get()); this.dropSelf(ActuallyBlocks.FEEDER.get());
this.dropSelf(ActuallyBlocks.CRUSHER.get());
this.dropSelf(ActuallyBlocks.CRUSHER_DOUBLE.get());
this.dropSelf(ActuallyBlocks.POWERED_FURNACE.get());
this.dropSelf(ActuallyBlocks.HEAT_COLLECTOR.get()); this.dropSelf(ActuallyBlocks.HEAT_COLLECTOR.get());
this.dropSelf(ActuallyBlocks.GREENHOUSE_GLASS.get()); this.dropSelf(ActuallyBlocks.GREENHOUSE_GLASS.get());
this.dropSelf(ActuallyBlocks.BREAKER.get()); this.dropSelf(ActuallyBlocks.BREAKER.get());

View file

@ -46,9 +46,9 @@ public final class ActuallyBlocks {
// Machines // Machines
public static final AABlockReg<BlockFeeder, AABlockItem, TileEntityFeeder> FEEDER = new AABlockReg<>("feeder", BlockFeeder::new, (b) -> new AABlockItem(b, defaultBlockItemProperties), TileEntityFeeder::new); public static final AABlockReg<BlockFeeder, AABlockItem, TileEntityFeeder> FEEDER = new AABlockReg<>("feeder", BlockFeeder::new, (b) -> new AABlockItem(b, defaultBlockItemProperties), TileEntityFeeder::new);
public static final AABlockReg<BlockCrusher, AABlockItem, TileEntityCrusher> CRUSHER = new AABlockReg<>("crusher", () -> new BlockCrusher(false), public static final AABlockReg<BlockCrusher, AABlockItem, TileEntityCrusher> CRUSHER = new AABlockReg<>("crusher", () -> new BlockCrusher(false),
(b) -> new AABlockItem(b, defaultBlockItemProperties), TileEntityCrusher::new); (b) -> new AABlockItem.BlockEntityEnergyItem(b, defaultBlockItemProperties), TileEntityCrusher::new);
public static final AABlockReg<BlockCrusher, AABlockItem, TileEntityCrusher> CRUSHER_DOUBLE = new AABlockReg<>("crusher_double", () -> new BlockCrusher(false), public static final AABlockReg<BlockCrusher, AABlockItem, TileEntityCrusher> CRUSHER_DOUBLE = new AABlockReg<>("crusher_double", () -> new BlockCrusher(false),
(b) -> new AABlockItem(b, defaultBlockItemProperties), TileEntityCrusherDouble::new); (b) -> new AABlockItem.BlockEntityEnergyItem(b, defaultBlockItemProperties), TileEntityCrusherDouble::new);
public static final AABlockReg<BlockEnergizer, AABlockItem, TileEntityEnergizer> ENERGIZER = new AABlockReg<>("energizer", () -> new BlockEnergizer(true), public static final AABlockReg<BlockEnergizer, AABlockItem, TileEntityEnergizer> ENERGIZER = new AABlockReg<>("energizer", () -> new BlockEnergizer(true),
(b) -> new AABlockItem(b, defaultBlockItemProperties), TileEntityEnergizer::new); (b) -> new AABlockItem(b, defaultBlockItemProperties), TileEntityEnergizer::new);
@ -108,7 +108,7 @@ public final class ActuallyBlocks {
public static final AABlockReg<BlockCoffeeMachine, AABlockItem, TileEntityCoffeeMachine> COFFEE_MACHINE = new AABlockReg<>("coffee_machine", BlockCoffeeMachine::new, public static final AABlockReg<BlockCoffeeMachine, AABlockItem, TileEntityCoffeeMachine> COFFEE_MACHINE = new AABlockReg<>("coffee_machine", BlockCoffeeMachine::new,
(b) -> new AABlockItem(b, defaultBlockItemProperties), TileEntityCoffeeMachine::new); (b) -> new AABlockItem(b, defaultBlockItemProperties), TileEntityCoffeeMachine::new);
public static final AABlockReg<BlockPoweredFurnace, AABlockItem, TileEntityPoweredFurnace> POWERED_FURNACE = new AABlockReg<>("powered_furnace", BlockPoweredFurnace::new, public static final AABlockReg<BlockPoweredFurnace, AABlockItem, TileEntityPoweredFurnace> POWERED_FURNACE = new AABlockReg<>("powered_furnace", BlockPoweredFurnace::new,
(b) -> new AABlockItem(b, defaultBlockItemProperties), TileEntityPoweredFurnace::new); (b) -> new AABlockItem.BlockEntityEnergyItem(b, defaultBlockItemProperties), TileEntityPoweredFurnace::new);
// Crystal Blocks // Crystal Blocks

View file

@ -83,7 +83,7 @@ public class BlockCrusher extends BlockContainerBase {
@Override @Override
public BlockState getStateForPlacement(BlockItemUseContext context) { public BlockState getStateForPlacement(BlockItemUseContext context) {
return defaultBlockState().setValue(HORIZONTAL_FACING, context.getNearestLookingDirection().getOpposite()).setValue(LIT, false); return defaultBlockState().setValue(HORIZONTAL_FACING, context.getHorizontalDirection().getOpposite()).setValue(LIT, false);
} }
@Override @Override

View file

@ -105,7 +105,7 @@
"block.actuallyadditions.giant_chest_medium": "Medium Storage Crate", "block.actuallyadditions.giant_chest_medium": "Medium Storage Crate",
"block.actuallyadditions.giant_chest_large": "Large Storage Crate", "block.actuallyadditions.giant_chest_large": "Large Storage Crate",
"block.actuallyadditions.crusher": "Crusher", "block.actuallyadditions.crusher": "Crusher",
"block.actuallyadditions.double_crusher": "Double Crusher", "block.actuallyadditions.crusher_double": "Double Crusher",
"block.actuallyadditions.powered_furnace": "Powered Furnace", "block.actuallyadditions.powered_furnace": "Powered Furnace",
"block.actuallyadditions.fishing_net": "Fishing Net", "block.actuallyadditions.fishing_net": "Fishing Net",
"block.actuallyadditions.furnace_solar": "Solar Panel", "block.actuallyadditions.furnace_solar": "Solar Panel",
@ -591,7 +591,7 @@
"container.actuallyadditions.inputter": "ESD", "container.actuallyadditions.inputter": "ESD",
"container.actuallyadditions.inputterAdvanced": "Advanced ESD", "container.actuallyadditions.inputterAdvanced": "Advanced ESD",
"container.actuallyadditions.crusher": "Crusher", "container.actuallyadditions.crusher": "Crusher",
"container.actuallyadditions.double_crusher": "Double Crusher", "container.actuallyadditions.crusher_double": "Double Crusher",
"container.actuallyadditions.powered_furnace": "Powered Furnace", "container.actuallyadditions.powered_furnace": "Powered Furnace",
"container.actuallyadditions.feeder": "Feeder", "container.actuallyadditions.feeder": "Feeder",
"container.actuallyadditions.giantChest": "Small Storage Crate", "container.actuallyadditions.giantChest": "Small Storage Crate",