Skip to content

Commit

Permalink
Fix crash when placing creative energy battery, Closes #1397
Browse files Browse the repository at this point in the history
  • Loading branch information
rubensworks committed Sep 23, 2024
1 parent 4015834 commit 1943169
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public class RegistryEntries {
public static final DeferredHolder<Block, Block> BLOCK_DELAY = DeferredHolder.create(Registries.BLOCK, ResourceLocation.parse("integrateddynamics:delay"));
public static final DeferredHolder<Block, BlockDryingBasin> BLOCK_DRYING_BASIN = DeferredHolder.create(Registries.BLOCK, ResourceLocation.parse("integrateddynamics:drying_basin"));
public static final DeferredHolder<Block, BlockEnergyBattery> BLOCK_ENERGY_BATTERY = DeferredHolder.create(Registries.BLOCK, ResourceLocation.parse("integrateddynamics:energy_battery"));
public static final DeferredHolder<Block, BlockEnergyBattery> BLOCK_ENERGY_BATTERY_CREATIVE = DeferredHolder.create(Registries.BLOCK, ResourceLocation.parse("integrateddynamics:energy_battery_creative"));
public static final DeferredHolder<Block, BlockFluidLiquidChorus> BLOCK_FLUID_LIQUID_CHORUS = DeferredHolder.create(Registries.BLOCK, ResourceLocation.parse("integrateddynamics:block_liquid_chorus"));
public static final DeferredHolder<Block, BlockFluidMenrilResin> BLOCK_FLUID_MENRIL_RESIN = DeferredHolder.create(Registries.BLOCK, ResourceLocation.parse("integrateddynamics:block_menril_resin"));
public static final DeferredHolder<Block, Block> BLOCK_INVISIBLE_LIGHT = DeferredHolder.create(Registries.BLOCK, ResourceLocation.parse("integrateddynamics:invisible_light"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
public class BlockCreativeEnergyBattery extends BlockEnergyBatteryBase {

public static final MapCodec<BlockCoalGenerator> CODEC = simpleCodec(BlockCoalGenerator::new);
public static final MapCodec<BlockCreativeEnergyBattery> CODEC = simpleCodec(BlockCreativeEnergyBattery::new);

public BlockCreativeEnergyBattery(Block.Properties properties) {
super(properties);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public BlockEntityEnergyBatteryConfig() {
IntegratedDynamics._instance,
"energy_battery",
(eConfig) -> new BlockEntityType<>(BlockEntityEnergyBattery::new,
Sets.newHashSet(RegistryEntries.BLOCK_ENERGY_BATTERY.get()), null)
Sets.newHashSet(RegistryEntries.BLOCK_ENERGY_BATTERY.get(), RegistryEntries.BLOCK_ENERGY_BATTERY_CREATIVE.get()), null)
);
IntegratedDynamics._instance.getModEventBus().addListener(new BlockEntityEnergyBattery.CapabilityRegistrar(this::getInstance)::register);
}
Expand Down

0 comments on commit 1943169

Please sign in to comment.