0.1.8
All checks were successful
EnergonRelics/pipeline/head This commit looks good

This commit is contained in:
TheBrokenRail 2020-08-20 19:03:47 -04:00
parent 5258a235b5
commit fbb1020ce8
41 changed files with 216 additions and 192 deletions

View File

@ -1,5 +1,8 @@
# Changelog # Changelog
**Beta 0.1.8**
* Fix Creative Inventory Breaking
**Beta 0.1.7** **Beta 0.1.7**
* Improve Industrial Laser Fire * Improve Industrial Laser Fire

View File

@ -10,7 +10,7 @@ org.gradle.jvmargs = -Xmx1G
fabric_loader_version = 0.9.0+build.204 fabric_loader_version = 0.9.0+build.204
# Mod Properties # Mod Properties
mod_version = 0.1.7 mod_version = 0.1.8
maven_group = com.thebrokenrail maven_group = com.thebrokenrail
# Dependencies # Dependencies

View File

@ -33,6 +33,7 @@ import com.thebrokenrail.energonrelics.block.EnergonLightBlock;
import com.thebrokenrail.energonrelics.block.SolarPanelBlock; import com.thebrokenrail.energonrelics.block.SolarPanelBlock;
import com.thebrokenrail.energonrelics.block.SwitchBlock; import com.thebrokenrail.energonrelics.block.SwitchBlock;
import com.thebrokenrail.energonrelics.api.block.SimpleBlock; import com.thebrokenrail.energonrelics.api.block.SimpleBlock;
import com.thebrokenrail.energonrelics.feature.CustomFeatures;
import com.thebrokenrail.energonrelics.item.MultimeterItem; import com.thebrokenrail.energonrelics.item.MultimeterItem;
import com.thebrokenrail.energonrelics.item.NetworkChipItem; import com.thebrokenrail.energonrelics.item.NetworkChipItem;
import com.thebrokenrail.energonrelics.potion.CustomPotions; import com.thebrokenrail.energonrelics.potion.CustomPotions;
@ -51,155 +52,162 @@ import net.minecraft.sound.SoundEvent;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;
import net.minecraft.util.Rarity; import net.minecraft.util.Rarity;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.registry.BuiltinRegistries;
import net.minecraft.util.registry.Registry; import net.minecraft.util.registry.Registry;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraft.world.gen.feature.ConfiguredFeature;
import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.OreFeatureConfig;
public final class EnergonRelics implements ModInitializer { public final class EnergonRelics implements ModInitializer {
public static final String NAMESPACE = "energonrelics"; public static final String NAMESPACE = "energonrelics";
public static NetworkChipItem NETWORK_CHIP_ITEM; public static final class Items {
static {
if (ItemGroup.BUILDING_BLOCKS == null) {
throw new RuntimeException("Items Loaded Too Early");
}
}
public static final ItemGroup ITEM_GROUP = FabricItemGroupBuilder.build(new Identifier(NAMESPACE, "item_group"), () -> new ItemStack(NETWORK_CHIP_ITEM)); public static final NetworkChipItem NETWORK_CHIP_ITEM;
public static final EnergonLightBlock ENERGON_LIGHT_BLOCK = new EnergonLightBlock(); public static final ItemGroup ITEM_GROUP = FabricItemGroupBuilder.build(new Identifier(NAMESPACE, "item_group"), () -> new ItemStack(Items.NETWORK_CHIP_ITEM));
public static final SolarPanelBlock SOLAR_PANEL_BLOCK = new SolarPanelBlock();
public static final SwitchBlock SWITCH_BLOCk = new SwitchBlock();
public static final MultimeterItem MULTIMETER_ITEM = new MultimeterItem();
public static final ThermalCasingBlock THERMAL_CASING_BLOCK = new ThermalCasingBlock(); static {
public static final ThermalGlassBlock THERMAL_GLASS_BLOCK = new ThermalGlassBlock(); NETWORK_CHIP_ITEM = new NetworkChipItem();
}
public static final BatteryCoreBlock BATTERY_CORE_BLOCk = new BatteryCoreBlock(); public static final MultimeterItem MULTIMETER = new MultimeterItem();
public static final PassiveBatteryControllerBlock PASSIVE_BATTERY_CONTROLLER_BLOCk = new PassiveBatteryControllerBlock(); public static final Item VERIDIUM_ORB = new Item(new Item.Settings().group(ITEM_GROUP).rarity(Rarity.UNCOMMON));
public static final ActiveBatteryControllerBlock ACTIVE_BATTERY_CONTROLLER_BLOCK = new ActiveBatteryControllerBlock(); public static final Item VERIDIUM_POWDER = new Item(new Item.Settings().group(ITEM_GROUP));
public static final Item DEFENSIVE_LASER_CORE = new Item(new Item.Settings().group(ITEM_GROUP));
public static final Item CIRCUIT_BOARD = new Item(new Item.Settings().group(ITEM_GROUP));
public static final Item VERIDIUM_INGOT = new Item(new Item.Settings().group(ITEM_GROUP));
}
public static final ReactorCoreBlock REACTOR_CORE_BLOCK = new ReactorCoreBlock(); public static final class Blocks {
public static final ReactorInputBlock REACTOR_INPUT_BLOCK = new ReactorInputBlock(); public static final EnergonLightBlock ENERGON_LIGHT = new EnergonLightBlock();
public static final ReactorControllerBlock REACTOR_CONTROLLER_BLOCK = new ReactorControllerBlock(); public static final SolarPanelBlock SOLAR_PANEL = new SolarPanelBlock();
public static final SwitchBlock SWITCH = new SwitchBlock();
public static final Item VERIDIUM_INGOT_ITEM = new Item(new Item.Settings().group(ITEM_GROUP)); public static final ThermalCasingBlock THERMAL_CASING = new ThermalCasingBlock();
public static final SimpleBlock VERIDIUM_ORE_BLOCK = new SimpleBlock(FabricBlockSettings.of(Material.STONE).requiresTool().strength(3f, 3f)); public static final ThermalGlassBlock THERMAL_GLASS = new ThermalGlassBlock();
public static final SimpleBlock VERIDIUM_BLOCK_BLOCK = new VeridiumBlockBlock();
public static final ConfiguredFeature<?, ?> VERIDIUM_ORE_FEATURE = Feature.ORE.configure(new OreFeatureConfig(OreFeatureConfig.Rules.BASE_STONE_OVERWORLD, EnergonRelics.VERIDIUM_ORE_BLOCK.getDefaultState(), 9)).method_30377(32).spreadHorizontally().repeat(2);
public static final Item CIRCUIT_BOARD_ITEM = new Item(new Item.Settings().group(ITEM_GROUP)); public static final BatteryCoreBlock BATTERY_CORE = new BatteryCoreBlock();
public static final PassiveBatteryControllerBlock PASSIVE_BATTERY_CONTROLLER = new PassiveBatteryControllerBlock();
public static final ActiveBatteryControllerBlock ACTIVE_BATTERY_CONTROLLER = new ActiveBatteryControllerBlock();
public static final Item DEFENSIVE_LASER_CORE_ITEM = new Item(new Item.Settings().group(ITEM_GROUP)); public static final ReactorCoreBlock REACTOR_CORE = new ReactorCoreBlock();
public static final DefensiveLaserBlock DEFENSIVE_LASER_BLOCK = new DefensiveLaserBlock(); public static final ReactorInputBlock REACTOR_INPUT = new ReactorInputBlock();
public static final ReactorControllerBlock REACTOR_CONTROLLER = new ReactorControllerBlock();
public static final BlockBreakerBlock BLOCK_BREAKER_BLOCK = new BlockBreakerBlock(); public static final SimpleBlock VERIDIUM_ORE = new SimpleBlock(FabricBlockSettings.of(Material.STONE).requiresTool().strength(3f, 3f));
public static final SimpleBlock VERIDIUM_BLOCK = new VeridiumBlockBlock();
public static final Item VERIDIUM_POWDER_ITEM = new Item(new Item.Settings().group(ITEM_GROUP)); public static final DefensiveLaserBlock DEFENSIVE_LASER = new DefensiveLaserBlock();
public static final BlockBreakerBlock BLOCK_BREAKER = new BlockBreakerBlock();
public static final LightningRodBaseBlock LIGHTNING_ROD_BASE_BLOCK = new LightningRodBaseBlock(); public static final LightningRodBaseBlock LIGHTNING_ROD_BASE = new LightningRodBaseBlock();
public static final LightningRodBlock LIGHTNING_ROD_BLOCK = new LightningRodBlock(); public static final LightningRodBlock LIGHTNING_ROD = new LightningRodBlock();
public static final SpecialRecipeSerializer<DuplicateNetworkChipRecipe> DUPLICATE_NETWORK_CHIP_RECIPE = new SpecialRecipeSerializer<>(DuplicateNetworkChipRecipe::new); public static final ForcefieldBlock FORCEFIELD = new ForcefieldBlock();
public static final ForcefieldProjectorBlock FORCEFIELD_PROJECTOR = new ForcefieldProjectorBlock();
public static final Material FIELD_MATERIAL = new Material.Builder(MaterialColor.CLEAR).replaceable().build(); public static final TractorBeamBlock TRACTOR_BEAM = new TractorBeamBlock();
public static final RepulsorBeamBlock REPULSOR_BEAM = new RepulsorBeamBlock();
public static final TractorBeamProjectorBlock TRACTOR_BEAM_PROJECTOR = new TractorBeamProjectorBlock();
public static final ForcefieldBlock FORCEFIELD_BLOCK = new ForcefieldBlock(); public static final IndustrialLaserBlock INDUSTRIAL_LASER = new IndustrialLaserBlock();
public static final ForcefieldProjectorBlock FORCEFIELD_PROJECTOR_BLOCK = new ForcefieldProjectorBlock(); public static final IndustrialLaserProjectorBlock INDUSTRIAL_LASER_PROJECTOR = new IndustrialLaserProjectorBlock();
public static final TractorBeamBlock TRACTOR_BEAM_BLOCK = new TractorBeamBlock(); public static final CreativeEnergySourceBlock CREATIVE_ENERGY_SOURCE = new CreativeEnergySourceBlock();
public static final RepulsorBeamBlock REPULSOR_BEAM_BLOCK = new RepulsorBeamBlock(); public static final HolographicSkyBlock HOLOGRAPHIC_SKY = new HolographicSkyBlock();
public static final TractorBeamProjectorBlock TRACTOR_BEAM_PROJECTOR_BLOCK = new TractorBeamProjectorBlock(); public static final InfuserBlock INFUSER = new InfuserBlock();
public static final IndustrialLaserBlock INDUSTRIAL_LASER_BLOCK = new IndustrialLaserBlock(); public static final EnergizedObsidianBlock ENERGIZED_OBSIDIAN = new EnergizedObsidianBlock();
public static final IndustrialLaserProjectorBlock INDUSTRIAL_LASER_PROJECTOR_BLOCK = new IndustrialLaserProjectorBlock(); public static final EnergyBeamBlock ENERGY_BEAM = new EnergyBeamBlock();
public static final EnergyPortalBlock ENERGY_PORTAL = new EnergyPortalBlock();
public static final EnergyProjectorBlock ENERGY_PROJECTOR = new EnergyProjectorBlock();
private static final Identifier BEEP_SOUND_ID = new Identifier(NAMESPACE, "beep"); public static final PhaseShifterBlock PHASE_SHIFTER = new PhaseShifterBlock();
private static final SoundEvent BEEP_SOUND_EVENT = new SoundEvent(BEEP_SOUND_ID); }
public static final CreativeEnergySourceBlock CREATIVE_ENERGY_SOURCE_BLOCK = new CreativeEnergySourceBlock(); public static final class Extras {
public static final SpecialRecipeSerializer<DuplicateNetworkChipRecipe> DUPLICATE_NETWORK_CHIP_RECIPE = new SpecialRecipeSerializer<>(DuplicateNetworkChipRecipe::new);
public static final HolographicSkyBlock HOLOGRAPHIC_SKY_BLOCK = new HolographicSkyBlock(); public static final Material FIELD_MATERIAL = new Material.Builder(MaterialColor.CLEAR).replaceable().build();
public static final InfuserBlock INFUSER_BLOCK = new InfuserBlock(); private static final Identifier BEEP_SOUND_ID = new Identifier(NAMESPACE, "beep");
private static final SoundEvent BEEP_SOUND_EVENT = new SoundEvent(BEEP_SOUND_ID);
public static final EnergizedObsidianBlock ENERGIZED_OBSIDIAN_BLOCK = new EnergizedObsidianBlock(); public static void playBeep(World world, BlockPos pos) {
public static final EnergyBeamBlock ENERGY_BEAM_BLOCK = new EnergyBeamBlock(); if (!world.isClient()) {
public static final EnergyPortalBlock ENERGY_PORTAL_BLOCK = new EnergyPortalBlock(); world.playSound(null, pos, BEEP_SOUND_EVENT, SoundCategory.BLOCKS, 0.3f, 1f);
public static final EnergyProjectorBlock ENERGY_PROJECTOR_BLOCK = new EnergyProjectorBlock(); }
public static final Item VERIDIUM_ORB_ITEM = new Item(new Item.Settings().group(ITEM_GROUP).rarity(Rarity.UNCOMMON)); }
}
public static final PhaseShifterBlock PHASE_SHIFTER_BLOCK = new PhaseShifterBlock();
@Override @Override
public void onInitialize() { public void onInitialize() {
Registry.register(Registry.ITEM, new Identifier(NAMESPACE, "veridium_ingot"), VERIDIUM_INGOT_ITEM); Registry.register(Registry.ITEM, new Identifier(NAMESPACE, "veridium_ingot"), Items.VERIDIUM_INGOT);
VERIDIUM_ORE_BLOCK.register("veridium_ore"); Blocks.VERIDIUM_ORE.register("veridium_ore");
VERIDIUM_BLOCK_BLOCK.register("veridium_block"); Blocks.VERIDIUM_BLOCK.register("veridium_block");
Registry.register(BuiltinRegistries.CONFIGURED_FEATURE, new Identifier(NAMESPACE, "veridium_ore"), VERIDIUM_ORE_FEATURE); CustomFeatures.register();
Registry.register(Registry.ITEM, new Identifier(NAMESPACE, "veridium_powder"), VERIDIUM_POWDER_ITEM); Registry.register(Registry.ITEM, new Identifier(NAMESPACE, "veridium_powder"), Items.VERIDIUM_POWDER);
Registry.register(Registry.ITEM, new Identifier(NAMESPACE, "veridium_orb"), VERIDIUM_ORB_ITEM); Registry.register(Registry.ITEM, new Identifier(NAMESPACE, "veridium_orb"), Items.VERIDIUM_ORB);
NETWORK_CHIP_ITEM = Registry.register(Registry.ITEM, new Identifier(NAMESPACE, "network_chip"), new NetworkChipItem()); Registry.register(Registry.ITEM, new Identifier(NAMESPACE, "network_chip"), Items.NETWORK_CHIP_ITEM);
Registry.register(Registry.ITEM, new Identifier(NAMESPACE, "multimeter"), MULTIMETER_ITEM); Registry.register(Registry.ITEM, new Identifier(NAMESPACE, "multimeter"), Items.MULTIMETER);
Registry.register(Registry.ITEM, new Identifier(NAMESPACE, "circuit_board"), CIRCUIT_BOARD_ITEM); Registry.register(Registry.ITEM, new Identifier(NAMESPACE, "circuit_board"), Items.CIRCUIT_BOARD);
ENERGON_LIGHT_BLOCK.register("energon_light"); Blocks.ENERGON_LIGHT.register("energon_light");
SOLAR_PANEL_BLOCK.register("solar_panel"); Blocks.SOLAR_PANEL.register("solar_panel");
SWITCH_BLOCk.register("switch"); Blocks.SWITCH.register("switch");
THERMAL_CASING_BLOCK.register("thermal_casing"); Blocks.THERMAL_CASING.register("thermal_casing");
THERMAL_GLASS_BLOCK.register("thermal_glass"); Blocks.THERMAL_GLASS.register("thermal_glass");
BATTERY_CORE_BLOCk.register("battery_core"); Blocks.BATTERY_CORE.register("battery_core");
PASSIVE_BATTERY_CONTROLLER_BLOCk.register("passive_battery_controller"); Blocks.PASSIVE_BATTERY_CONTROLLER.register("passive_battery_controller");
ACTIVE_BATTERY_CONTROLLER_BLOCK.register("active_battery_controller"); Blocks.ACTIVE_BATTERY_CONTROLLER.register("active_battery_controller");
REACTOR_CORE_BLOCK.register("reactor_core"); Blocks.REACTOR_CORE.register("reactor_core");
REACTOR_INPUT_BLOCK.register("reactor_input"); Blocks.REACTOR_INPUT.register("reactor_input");
REACTOR_CONTROLLER_BLOCK.register("reactor_controller"); Blocks.REACTOR_CONTROLLER.register("reactor_controller");
Registry.register(Registry.ITEM, new Identifier(NAMESPACE, "defensive_laser_core"), DEFENSIVE_LASER_CORE_ITEM); Registry.register(Registry.ITEM, new Identifier(NAMESPACE, "defensive_laser_core"), Items.DEFENSIVE_LASER_CORE);
DEFENSIVE_LASER_BLOCK.register("defensive_laser"); Blocks.DEFENSIVE_LASER.register("defensive_laser");
StructureGeneratorBlock.registerBlocks(); StructureGeneratorBlock.registerBlocks();
BLOCK_BREAKER_BLOCK.register("block_breaker"); Blocks.BLOCK_BREAKER.register("block_breaker");
CustomPotions.register(); CustomPotions.register();
LIGHTNING_ROD_BASE_BLOCK.register("lightning_rod_base"); Blocks.LIGHTNING_ROD_BASE.register("lightning_rod_base");
LIGHTNING_ROD_BLOCK.register("lightning_rod"); Blocks.LIGHTNING_ROD.register("lightning_rod");
Registry.register(Registry.RECIPE_SERIALIZER, new Identifier(NAMESPACE, "duplicate_network_chip"), DUPLICATE_NETWORK_CHIP_RECIPE); Registry.register(Registry.RECIPE_SERIALIZER, new Identifier(NAMESPACE, "duplicate_network_chip"), Extras.DUPLICATE_NETWORK_CHIP_RECIPE);
FORCEFIELD_BLOCK.register("forcefield"); Blocks.FORCEFIELD.register("forcefield");
FORCEFIELD_PROJECTOR_BLOCK.register("forcefield_projector"); Blocks.FORCEFIELD_PROJECTOR.register("forcefield_projector");
TRACTOR_BEAM_BLOCK.register("tractor_beam"); Blocks.TRACTOR_BEAM.register("tractor_beam");
REPULSOR_BEAM_BLOCK.register("repulsor_beam"); Blocks.REPULSOR_BEAM.register("repulsor_beam");
TRACTOR_BEAM_PROJECTOR_BLOCK.register("tractor_beam_projector"); Blocks.TRACTOR_BEAM_PROJECTOR.register("tractor_beam_projector");
INDUSTRIAL_LASER_BLOCK.register("industrial_laser"); Blocks.INDUSTRIAL_LASER.register("industrial_laser");
INDUSTRIAL_LASER_PROJECTOR_BLOCK.register("industrial_laser_projector"); Blocks.INDUSTRIAL_LASER_PROJECTOR.register("industrial_laser_projector");
Registry.register(Registry.SOUND_EVENT, BEEP_SOUND_ID, BEEP_SOUND_EVENT); Registry.register(Registry.SOUND_EVENT, Extras.BEEP_SOUND_ID, Extras.BEEP_SOUND_EVENT);
CREATIVE_ENERGY_SOURCE_BLOCK.register("creative_energy_source"); Blocks.CREATIVE_ENERGY_SOURCE.register("creative_energy_source");
HOLOGRAPHIC_SKY_BLOCK.register("holographic_sky"); Blocks.HOLOGRAPHIC_SKY.register("holographic_sky");
INFUSER_BLOCK.register("infuser"); Blocks.INFUSER.register("infuser");
ENERGIZED_OBSIDIAN_BLOCK.register("energized_obsidian"); Blocks.ENERGIZED_OBSIDIAN.register("energized_obsidian");
ENERGY_BEAM_BLOCK.register("energy_beam"); Blocks.ENERGY_BEAM.register("energy_beam");
ENERGY_PORTAL_BLOCK.register("energy_portal"); Blocks.ENERGY_PORTAL.register("energy_portal");
ENERGY_PROJECTOR_BLOCK.register("energy_projector"); Blocks.ENERGY_PROJECTOR.register("energy_projector");
PHASE_SHIFTER_BLOCK.register("phase_shifter"); Blocks.PHASE_SHIFTER.register("phase_shifter");
}
public static void playBeep(World world, BlockPos pos) {
if (!world.isClient()) {
world.playSound(null, pos, BEEP_SOUND_EVENT, SoundCategory.BLOCKS, 0.3f, 1f);
}
} }
} }

View File

@ -53,7 +53,7 @@ public class SimpleBlock extends Block {
@SuppressWarnings("SameReturnValue") @SuppressWarnings("SameReturnValue")
@ApiStatus.OverrideOnly @ApiStatus.OverrideOnly
protected ItemGroup getItemGroup() { protected ItemGroup getItemGroup() {
return EnergonRelics.ITEM_GROUP; return EnergonRelics.Items.ITEM_GROUP;
} }
/** /**

View File

@ -60,13 +60,13 @@ public abstract class EnergyBlock extends SimpleBlockWithEntity {
BlockEntity entity = world.getBlockEntity(pos); BlockEntity entity = world.getBlockEntity(pos);
if (entity instanceof EnergyProviderBlockEntity && ((EnergyProviderBlockEntity) entity).isEnergyProvider()) { if (entity instanceof EnergyProviderBlockEntity && ((EnergyProviderBlockEntity) entity).isEnergyProvider()) {
ItemStack stack = player.getStackInHand(hand); ItemStack stack = player.getStackInHand(hand);
if (stack.getItem() == EnergonRelics.NETWORK_CHIP_ITEM) { if (stack.getItem() == EnergonRelics.Items.NETWORK_CHIP_ITEM) {
if (!((EnergyProviderBlockEntity) entity).hasStack()) { if (!((EnergyProviderBlockEntity) entity).hasStack()) {
if (!world.isClient()) { if (!world.isClient()) {
((EnergyProviderBlockEntity) entity).placeStack(stack, world); ((EnergyProviderBlockEntity) entity).placeStack(stack, world);
stack.setCount(0); stack.setCount(0);
} }
EnergonRelics.playBeep(world, pos); EnergonRelics.Extras.playBeep(world, pos);
return ActionResult.SUCCESS; return ActionResult.SUCCESS;
} else { } else {
return ActionResult.FAIL; return ActionResult.FAIL;
@ -77,7 +77,7 @@ public abstract class EnergyBlock extends SimpleBlockWithEntity {
ItemStack newStack = ((EnergyProviderBlockEntity) entity).takeStack(world); ItemStack newStack = ((EnergyProviderBlockEntity) entity).takeStack(world);
player.setStackInHand(hand, newStack); player.setStackInHand(hand, newStack);
} }
EnergonRelics.playBeep(world, pos); EnergonRelics.Extras.playBeep(world, pos);
return ActionResult.SUCCESS; return ActionResult.SUCCESS;
} else { } else {
return ActionResult.FAIL; return ActionResult.FAIL;

View File

@ -54,7 +54,7 @@ public class EnergyProviderBlockEntity extends BlockEntity implements BlockEntit
*/ */
@ApiStatus.Internal @ApiStatus.Internal
public final boolean isNetwork(int network) { public final boolean isNetwork(int network) {
return isEnergyProvider() && EnergonRelics.NETWORK_CHIP_ITEM.getID(stack) == network; return isEnergyProvider() && EnergonRelics.Items.NETWORK_CHIP_ITEM.getID(stack) == network;
} }
/** /**
@ -123,9 +123,9 @@ public class EnergyProviderBlockEntity extends BlockEntity implements BlockEntit
@Override @Override
public List<EnergyTickable> startTick() { public List<EnergyTickable> startTick() {
if (isEnergyProvider() && stack.getItem() == EnergonRelics.NETWORK_CHIP_ITEM) { if (isEnergyProvider() && stack.getItem() == EnergonRelics.Items.NETWORK_CHIP_ITEM) {
NetworkComponent component = NetworkComponent.getInstance((ServerWorld) Objects.requireNonNull(getWorld())); NetworkComponent component = NetworkComponent.getInstance((ServerWorld) Objects.requireNonNull(getWorld()));
List<BlockPosWithDimension> sources = component.getSourcesPos(EnergonRelics.NETWORK_CHIP_ITEM.getID(stack)); List<BlockPosWithDimension> sources = component.getSourcesPos(EnergonRelics.Items.NETWORK_CHIP_ITEM.getID(stack));
if (!sources.contains(new BlockPosWithDimension(getPos(), getWorld().getRegistryKey()))) { if (!sources.contains(new BlockPosWithDimension(getPos(), getWorld().getRegistryKey()))) {
takeStack(getWorld()); takeStack(getWorld());
} }
@ -145,9 +145,9 @@ public class EnergyProviderBlockEntity extends BlockEntity implements BlockEntit
NetworkComponent component = NetworkComponent.getInstance(serverWorld); NetworkComponent component = NetworkComponent.getInstance(serverWorld);
BlockPosWithDimension newPos = new BlockPosWithDimension(pos, world.getRegistryKey()); BlockPosWithDimension newPos = new BlockPosWithDimension(pos, world.getRegistryKey());
if (remove) { if (remove) {
component.removeSource(EnergonRelics.NETWORK_CHIP_ITEM.getID(stack), newPos); component.removeSource(EnergonRelics.Items.NETWORK_CHIP_ITEM.getID(stack), newPos);
} else { } else {
component.addSource(EnergonRelics.NETWORK_CHIP_ITEM.getID(stack), newPos); component.addSource(EnergonRelics.Items.NETWORK_CHIP_ITEM.getID(stack), newPos);
} }
} }

View File

@ -48,7 +48,7 @@ public class DefensiveLaserBlockEntity extends EnergyReceiverBlockEntity {
if (hasWorld()) { if (hasWorld()) {
return super.getCachedState(); return super.getCachedState();
} else { } else {
return EnergonRelics.DEFENSIVE_LASER_BLOCK.getDefaultState(); return EnergonRelics.Blocks.DEFENSIVE_LASER.getDefaultState();
} }
} }

View File

@ -63,7 +63,7 @@ public class PassiveBatteryControllerBlockEntity extends EnergyReceiverBlockEnti
} }
public static boolean isInvalidBlock(BlockState block) { public static boolean isInvalidBlock(BlockState block) {
return !block.isOf(EnergonRelics.THERMAL_GLASS_BLOCK) && !block.isOf(EnergonRelics.THERMAL_CASING_BLOCK); return !block.isOf(EnergonRelics.Blocks.THERMAL_GLASS) && !block.isOf(EnergonRelics.Blocks.THERMAL_CASING);
} }
@Override @Override

View File

@ -28,7 +28,7 @@ public class IndustrialLaserBlockEntity extends FieldProjectorBlockEntity {
private int progress = 0; private int progress = 0;
public IndustrialLaserBlockEntity(BlockEntityType<?> type) { public IndustrialLaserBlockEntity(BlockEntityType<?> type) {
super(type, state -> EnergonRelics.INDUSTRIAL_LASER_BLOCK); super(type, state -> EnergonRelics.Blocks.INDUSTRIAL_LASER);
} }
@Override @Override
@ -66,7 +66,7 @@ public class IndustrialLaserBlockEntity extends FieldProjectorBlockEntity {
Block.dropStack(getWorld(), targetPos, IndustrialLaserRegistry.get(targetState.getBlock(), getWorld().random)); Block.dropStack(getWorld(), targetPos, IndustrialLaserRegistry.get(targetState.getBlock(), getWorld().random));
getWorld().breakBlock(targetPos, false); getWorld().breakBlock(targetPos, false);
if (targetState.getBlock() == EnergonRelics.VERIDIUM_ORE_BLOCK) { if (targetState.getBlock() == EnergonRelics.Blocks.VERIDIUM_ORE) {
AreaEffectCloudEntity areaEffectCloudEntity = new AreaEffectCloudEntity(getWorld(), targetPos.getX() + 0.5d, targetPos.getY() + 0.5d, targetPos.getZ() + 0.5d); AreaEffectCloudEntity areaEffectCloudEntity = new AreaEffectCloudEntity(getWorld(), targetPos.getX() + 0.5d, targetPos.getY() + 0.5d, targetPos.getZ() + 0.5d);
areaEffectCloudEntity.setRadius(1.2f); areaEffectCloudEntity.setRadius(1.2f);
areaEffectCloudEntity.setRadiusOnUse(-0.5f); areaEffectCloudEntity.setRadiusOnUse(-0.5f);

View File

@ -18,7 +18,7 @@ public class EnergyProjectorBlockEntity extends FieldProjectorBlockEntity {
private BlockState targetState; private BlockState targetState;
public EnergyProjectorBlockEntity(BlockEntityType<?> type) { public EnergyProjectorBlockEntity(BlockEntityType<?> type) {
super(type, state -> EnergonRelics.ENERGY_BEAM_BLOCK); super(type, state -> EnergonRelics.Blocks.ENERGY_BEAM);
} }
@Override @Override
@ -44,10 +44,10 @@ public class EnergyProjectorBlockEntity extends FieldProjectorBlockEntity {
boolean isObsidian; boolean isObsidian;
if (targetState.getBlock() == Blocks.OBSIDIAN) { if (targetState.getBlock() == Blocks.OBSIDIAN) {
isObsidian = true; isObsidian = true;
targetState = EnergonRelics.ENERGIZED_OBSIDIAN_BLOCK.getDefaultState(); targetState = EnergonRelics.Blocks.ENERGIZED_OBSIDIAN.getDefaultState();
getWorld().setBlockState(targetPos, targetState); getWorld().setBlockState(targetPos, targetState);
} else { } else {
isObsidian = targetState.getBlock() == EnergonRelics.ENERGIZED_OBSIDIAN_BLOCK; isObsidian = targetState.getBlock() == EnergonRelics.Blocks.ENERGIZED_OBSIDIAN;
} }
if (isObsidian) { if (isObsidian) {

View File

@ -11,6 +11,6 @@ public class ForcefieldBlock extends AbstractFieldBlock {
@Override @Override
protected BlockState getProjectorBlockState() { protected BlockState getProjectorBlockState() {
return EnergonRelics.FORCEFIELD_PROJECTOR_BLOCK.getDefaultState(); return EnergonRelics.Blocks.FORCEFIELD_PROJECTOR.getDefaultState();
} }
} }

View File

@ -5,6 +5,6 @@ import com.thebrokenrail.energonrelics.block.forcefield.util.FieldProjectorBlock
public class ForcefieldProjectorBlock extends FieldProjectorBlock { public class ForcefieldProjectorBlock extends FieldProjectorBlock {
public ForcefieldProjectorBlock() { public ForcefieldProjectorBlock() {
super(state -> EnergonRelics.FORCEFIELD_BLOCK); super(state -> EnergonRelics.Blocks.FORCEFIELD);
} }
} }

View File

@ -19,7 +19,7 @@ public class TractorBeamProjectorBlock extends FieldProjectorBlock {
public static final BooleanProperty IS_REPULSOR = BooleanProperty.of("is_repulsor"); public static final BooleanProperty IS_REPULSOR = BooleanProperty.of("is_repulsor");
public TractorBeamProjectorBlock() { public TractorBeamProjectorBlock() {
super(state -> state.get(IS_REPULSOR) ? EnergonRelics.REPULSOR_BEAM_BLOCK : EnergonRelics.TRACTOR_BEAM_BLOCK); super(state -> state.get(IS_REPULSOR) ? EnergonRelics.Blocks.REPULSOR_BEAM : EnergonRelics.Blocks.TRACTOR_BEAM);
setDefaultState(getDefaultState().with(IS_REPULSOR, false)); setDefaultState(getDefaultState().with(IS_REPULSOR, false));
} }

View File

@ -3,7 +3,6 @@ package com.thebrokenrail.energonrelics.block.forcefield.laser;
import com.thebrokenrail.energonrelics.EnergonRelics; import com.thebrokenrail.energonrelics.EnergonRelics;
import com.thebrokenrail.energonrelics.block.forcefield.util.AbstractFieldBlock; import com.thebrokenrail.energonrelics.block.forcefield.util.AbstractFieldBlock;
import com.thebrokenrail.energonrelics.config.HardcodedConfig; import com.thebrokenrail.energonrelics.config.HardcodedConfig;
import net.minecraft.block.AbstractFireBlock;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.ShapeContext; import net.minecraft.block.ShapeContext;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
@ -11,8 +10,6 @@ import net.minecraft.entity.ItemEntity;
import net.minecraft.entity.LivingEntity; import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.damage.DamageSource; import net.minecraft.entity.damage.DamageSource;
import net.minecraft.entity.mob.CreeperEntity; import net.minecraft.entity.mob.CreeperEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.projectile.SmallFireballEntity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.Items; import net.minecraft.item.Items;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
@ -29,7 +26,7 @@ public class IndustrialLaserBlock extends AbstractFieldBlock {
@Override @Override
protected BlockState getProjectorBlockState() { protected BlockState getProjectorBlockState() {
return EnergonRelics.INDUSTRIAL_LASER_PROJECTOR_BLOCK.getDefaultState(); return EnergonRelics.Blocks.INDUSTRIAL_LASER_PROJECTOR.getDefaultState();
} }
private static class IndustrialLaserDamageSource extends DamageSource { private static class IndustrialLaserDamageSource extends DamageSource {

View File

@ -31,7 +31,7 @@ public abstract class AbstractFieldBlock extends SimpleBlock {
public static final DirectionProperty FACING = Properties.FACING; public static final DirectionProperty FACING = Properties.FACING;
public AbstractFieldBlock(boolean hasCollision) { public AbstractFieldBlock(boolean hasCollision) {
super((hasCollision ? FabricBlockSettings.of(EnergonRelics.FIELD_MATERIAL) : FabricBlockSettings.of(EnergonRelics.FIELD_MATERIAL).noCollision()).strength(-1.0F, 3600000.8F).dropsNothing().nonOpaque().lightLevel(4).emissiveLighting((state, world, pos) -> true).nonOpaque().sounds(BlockSoundGroup.GLASS).allowsSpawning((state, world, pos, type) -> false).solidBlock((state, world, pos) -> false).suffocates((state, world, pos) -> hasCollision).blockVision((state, world, pos) -> false)); super((hasCollision ? FabricBlockSettings.of(EnergonRelics.Extras.FIELD_MATERIAL) : FabricBlockSettings.of(EnergonRelics.Extras.FIELD_MATERIAL).noCollision()).strength(-1.0F, 3600000.8F).dropsNothing().nonOpaque().lightLevel(4).emissiveLighting((state, world, pos) -> true).nonOpaque().sounds(BlockSoundGroup.GLASS).allowsSpawning((state, world, pos, type) -> false).solidBlock((state, world, pos) -> false).suffocates((state, world, pos) -> hasCollision).blockVision((state, world, pos) -> false));
setDefaultState(getDefaultState().with(FACING, Direction.NORTH)); setDefaultState(getDefaultState().with(FACING, Direction.NORTH));
} }

View File

@ -21,7 +21,7 @@ public class BeamBlock extends AbstractFieldBlock {
@Override @Override
protected BlockState getProjectorBlockState() { protected BlockState getProjectorBlockState() {
return EnergonRelics.TRACTOR_BEAM_PROJECTOR_BLOCK.getDefaultState().with(TractorBeamProjectorBlock.IS_REPULSOR, isRepulsor); return EnergonRelics.Blocks.TRACTOR_BEAM_PROJECTOR.getDefaultState().with(TractorBeamProjectorBlock.IS_REPULSOR, isRepulsor);
} }
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")

View File

@ -70,7 +70,7 @@ public class LightningRodBaseBlock extends EnergyBlock {
@Override @Override
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, WorldAccess world, BlockPos pos, BlockPos posFrom) { public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, WorldAccess world, BlockPos pos, BlockPos posFrom) {
boolean valid = true; boolean valid = true;
if (direction == Direction.UP && (newState.getBlock() != EnergonRelics.LIGHTNING_ROD_BLOCK || newState.get(LightningRodBlock.HALF) != DoubleBlockHalf.LOWER)) { if (direction == Direction.UP && (newState.getBlock() != EnergonRelics.Blocks.LIGHTNING_ROD || newState.get(LightningRodBlock.HALF) != DoubleBlockHalf.LOWER)) {
valid = false; valid = false;
} }
@ -85,8 +85,8 @@ public class LightningRodBaseBlock extends EnergyBlock {
public void onPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) { public void onPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) {
super.onPlaced(world, pos, state, placer, itemStack); super.onPlaced(world, pos, state, placer, itemStack);
world.setBlockState(pos.up(2), EnergonRelics.LIGHTNING_ROD_BLOCK.getDefaultState().with(LightningRodBlock.HALF, DoubleBlockHalf.UPPER)); world.setBlockState(pos.up(2), EnergonRelics.Blocks.LIGHTNING_ROD.getDefaultState().with(LightningRodBlock.HALF, DoubleBlockHalf.UPPER));
world.setBlockState(pos.up(1), EnergonRelics.LIGHTNING_ROD_BLOCK.getDefaultState().with(LightningRodBlock.HALF, DoubleBlockHalf.LOWER)); world.setBlockState(pos.up(1), EnergonRelics.Blocks.LIGHTNING_ROD.getDefaultState().with(LightningRodBlock.HALF, DoubleBlockHalf.LOWER));
} }
@Override @Override

View File

@ -30,7 +30,7 @@ public class LightningRodBlock extends SimpleBlock {
public static final EnumProperty<DoubleBlockHalf> HALF = Properties.DOUBLE_BLOCK_HALF; public static final EnumProperty<DoubleBlockHalf> HALF = Properties.DOUBLE_BLOCK_HALF;
public LightningRodBlock() { public LightningRodBlock() {
super(FabricBlockSettings.copy(EnergonRelics.LIGHTNING_ROD_BASE_BLOCK).dropsNothing().emissiveLighting((state, world, pos) -> true).lightLevel(state -> 10)); super(FabricBlockSettings.copy(EnergonRelics.Blocks.LIGHTNING_ROD_BASE).dropsNothing().emissiveLighting((state, world, pos) -> true).lightLevel(state -> 10));
setDefaultState(getDefaultState().with(HALF, DoubleBlockHalf.LOWER)); setDefaultState(getDefaultState().with(HALF, DoubleBlockHalf.LOWER));
} }
@ -91,16 +91,16 @@ public class LightningRodBlock extends SimpleBlock {
if (state.get(HALF) == DoubleBlockHalf.LOWER) { if (state.get(HALF) == DoubleBlockHalf.LOWER) {
if (direction == Direction.UP) { if (direction == Direction.UP) {
if (newState.getBlock() != EnergonRelics.LIGHTNING_ROD_BLOCK || newState.get(HALF) != DoubleBlockHalf.UPPER) { if (newState.getBlock() != EnergonRelics.Blocks.LIGHTNING_ROD || newState.get(HALF) != DoubleBlockHalf.UPPER) {
valid = false; valid = false;
} }
} else if (direction == Direction.DOWN) { } else if (direction == Direction.DOWN) {
if (newState.getBlock() != EnergonRelics.LIGHTNING_ROD_BASE_BLOCK) { if (newState.getBlock() != EnergonRelics.Blocks.LIGHTNING_ROD_BASE) {
valid = false; valid = false;
} }
} }
} else if (state.get(HALF) == DoubleBlockHalf.UPPER && direction == Direction.DOWN) { } else if (state.get(HALF) == DoubleBlockHalf.UPPER && direction == Direction.DOWN) {
if (newState.getBlock() != EnergonRelics.LIGHTNING_ROD_BLOCK || newState.get(HALF) != DoubleBlockHalf.LOWER) { if (newState.getBlock() != EnergonRelics.Blocks.LIGHTNING_ROD || newState.get(HALF) != DoubleBlockHalf.LOWER) {
valid = false; valid = false;
} }
} }
@ -120,7 +120,7 @@ public class LightningRodBlock extends SimpleBlock {
BlockState targetState = world.getBlockState(targetPos); BlockState targetState = world.getBlockState(targetPos);
if (targetState.getBlock() == EnergonRelics.LIGHTNING_ROD_BASE_BLOCK) { if (targetState.getBlock() == EnergonRelics.Blocks.LIGHTNING_ROD_BASE) {
world.breakBlock(targetPos, false, player); world.breakBlock(targetPos, false, player);
} }
} }
@ -130,6 +130,6 @@ public class LightningRodBlock extends SimpleBlock {
@Override @Override
public Item asItem() { public Item asItem() {
return EnergonRelics.LIGHTNING_ROD_BASE_BLOCK.asItem(); return EnergonRelics.Blocks.LIGHTNING_ROD_BASE.asItem();
} }
} }

View File

@ -35,7 +35,7 @@ public class EnergizedObsidianBlock extends SimpleBlock {
private static boolean faces(WorldAccess world, BlockPos targetPos, BlockPos pos) { private static boolean faces(WorldAccess world, BlockPos targetPos, BlockPos pos) {
BlockState state = world.getBlockState(targetPos); BlockState state = world.getBlockState(targetPos);
if ((state.getBlock() == EnergonRelics.ENERGY_BEAM_BLOCK || state.getBlock() == EnergonRelics.ENERGY_PROJECTOR_BLOCK) && state.contains(Properties.FACING)) { if ((state.getBlock() == EnergonRelics.Blocks.ENERGY_BEAM || state.getBlock() == EnergonRelics.Blocks.ENERGY_PROJECTOR) && state.contains(Properties.FACING)) {
Direction facing = state.get(Properties.FACING); Direction facing = state.get(Properties.FACING);
for (Direction side : Direction.values()) { for (Direction side : Direction.values()) {
if (targetPos.offset(side).equals(pos)) { if (targetPos.offset(side).equals(pos)) {

View File

@ -11,6 +11,6 @@ public class EnergyBeamBlock extends AbstractFieldBlock {
@Override @Override
protected BlockState getProjectorBlockState() { protected BlockState getProjectorBlockState() {
return EnergonRelics.ENERGY_PROJECTOR_BLOCK.getDefaultState(); return EnergonRelics.Blocks.ENERGY_PROJECTOR.getDefaultState();
} }
} }

View File

@ -49,7 +49,7 @@ public class EnergyPortalBlock extends SimpleBlock {
} }
private static boolean isObsidian(BlockState state) { private static boolean isObsidian(BlockState state) {
return state.getBlock() == Blocks.OBSIDIAN || state.getBlock() == EnergonRelics.ENERGIZED_OBSIDIAN_BLOCK; return state.getBlock() == Blocks.OBSIDIAN || state.getBlock() == EnergonRelics.Blocks.ENERGIZED_OBSIDIAN;
} }
public static boolean isValidFrame(WorldAccess world, BlockPos centerPos) { public static boolean isValidFrame(WorldAccess world, BlockPos centerPos) {
@ -58,7 +58,7 @@ public class EnergyPortalBlock extends SimpleBlock {
if (isValidDirection(side)) { if (isValidDirection(side)) {
BlockPos energizedPos = centerPos.offset(side, 2); BlockPos energizedPos = centerPos.offset(side, 2);
BlockState energizedObsidian = world.getBlockState(energizedPos); BlockState energizedObsidian = world.getBlockState(energizedPos);
if (energizedObsidian.getBlock() == EnergonRelics.ENERGIZED_OBSIDIAN_BLOCK) { if (energizedObsidian.getBlock() == EnergonRelics.Blocks.ENERGIZED_OBSIDIAN) {
BlockState obsidian1 = world.getBlockState(energizedPos.offset(side.rotateYClockwise(), 1)); BlockState obsidian1 = world.getBlockState(energizedPos.offset(side.rotateYClockwise(), 1));
BlockState obsidian2 = world.getBlockState(energizedPos.offset(side.rotateYCounterclockwise(), 1)); BlockState obsidian2 = world.getBlockState(energizedPos.offset(side.rotateYCounterclockwise(), 1));
if (isObsidian(obsidian1) && isObsidian(obsidian2)) { if (isObsidian(obsidian1) && isObsidian(obsidian2)) {
@ -74,7 +74,7 @@ public class EnergyPortalBlock extends SimpleBlock {
BlockPos centerPos = pos; BlockPos centerPos = pos;
for (Direction side : Direction.values()) { for (Direction side : Direction.values()) {
if (isValidDirection(side)) { if (isValidDirection(side)) {
if (world.getBlockState(pos.offset(side)).getBlock() != EnergonRelics.ENERGY_PORTAL_BLOCK) { if (world.getBlockState(pos.offset(side)).getBlock() != EnergonRelics.Blocks.ENERGY_PORTAL) {
centerPos = centerPos.offset(side.getOpposite()); centerPos = centerPos.offset(side.getOpposite());
} }
} }
@ -87,7 +87,7 @@ public class EnergyPortalBlock extends SimpleBlock {
BlockPos startPos = centerPos.add(-1, 0, -1); BlockPos startPos = centerPos.add(-1, 0, -1);
for (int x = 0; x < 3; x++) { for (int x = 0; x < 3; x++) {
for (int z = 0; z < 3; z++) { for (int z = 0; z < 3; z++) {
if (world.getBlockState(startPos.add(x, 0, z)).getBlock() != EnergonRelics.ENERGY_PORTAL_BLOCK) { if (world.getBlockState(startPos.add(x, 0, z)).getBlock() != EnergonRelics.Blocks.ENERGY_PORTAL) {
valid = false; valid = false;
break; break;
} }
@ -101,7 +101,7 @@ public class EnergyPortalBlock extends SimpleBlock {
for (int x = 0; x < 3; x++) { for (int x = 0; x < 3; x++) {
for (int z = 0; z < 3; z++) { for (int z = 0; z < 3; z++) {
BlockState state = world.getBlockState(startPos.add(x, 0, z)); BlockState state = world.getBlockState(startPos.add(x, 0, z));
if (state.getBlock() != EnergonRelics.ENERGY_PORTAL_BLOCK && !state.isAir()) { if (state.getBlock() != EnergonRelics.Blocks.ENERGY_PORTAL && !state.isAir()) {
return; return;
} }
} }
@ -109,7 +109,7 @@ public class EnergyPortalBlock extends SimpleBlock {
for (int x = 0; x < 3; x++) { for (int x = 0; x < 3; x++) {
for (int z = 0; z < 3; z++) { for (int z = 0; z < 3; z++) {
world.setBlockState(startPos.add(x, 0, z), EnergonRelics.ENERGY_PORTAL_BLOCK.getDefaultState(), 3 | 16); world.setBlockState(startPos.add(x, 0, z), EnergonRelics.Blocks.ENERGY_PORTAL.getDefaultState(), 3 | 16);
} }
} }
} }

View File

@ -25,7 +25,6 @@ import net.minecraft.util.math.Direction;
import net.minecraft.util.registry.Registry; import net.minecraft.util.registry.Registry;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraft.world.biome.Biome; import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.GenerationSettings;
import net.minecraft.world.gen.GenerationStep; import net.minecraft.world.gen.GenerationStep;
import net.minecraft.world.gen.chunk.StructureConfig; import net.minecraft.world.gen.chunk.StructureConfig;
import net.minecraft.world.gen.feature.ConfiguredStructureFeature; import net.minecraft.world.gen.feature.ConfiguredStructureFeature;

View File

@ -43,26 +43,26 @@ public final class EnergonRelicsClient implements ClientModInitializer {
public void onInitializeClient() { public void onInitializeClient() {
EnergyBlock.initRenderer(); EnergyBlock.initRenderer();
BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.THERMAL_GLASS_BLOCK, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.Blocks.THERMAL_GLASS, RenderLayer.getCutout());
BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.DEFENSIVE_LASER_BLOCK, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.Blocks.DEFENSIVE_LASER, RenderLayer.getCutout());
BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.FORCEFIELD_BLOCK, RenderLayer.getTranslucent()); BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.Blocks.FORCEFIELD, RenderLayer.getTranslucent());
BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.TRACTOR_BEAM_BLOCK, RenderLayer.getTranslucent()); BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.Blocks.TRACTOR_BEAM, RenderLayer.getTranslucent());
BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.REPULSOR_BEAM_BLOCK, RenderLayer.getTranslucent()); BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.Blocks.REPULSOR_BEAM, RenderLayer.getTranslucent());
BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.INDUSTRIAL_LASER_BLOCK, RenderLayer.getTranslucent()); BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.Blocks.INDUSTRIAL_LASER, RenderLayer.getTranslucent());
BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.ENERGY_PORTAL_BLOCK, RenderLayer.getTranslucent()); BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.Blocks.ENERGY_PORTAL, RenderLayer.getTranslucent());
BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.ENERGY_BEAM_BLOCK, RenderLayer.getTranslucent()); BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.Blocks.ENERGY_BEAM, RenderLayer.getTranslucent());
BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.PHASE_SHIFTER_BLOCK, RenderLayer.getCutoutMipped()); BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.Blocks.PHASE_SHIFTER, RenderLayer.getCutoutMipped());
ColorProviderRegistry.BLOCK.register((state, world, pos, tintIndex) -> state.get(PhaseShifterBlock.COLOR).getFireworkColor(), EnergonRelics.PHASE_SHIFTER_BLOCK); ColorProviderRegistry.BLOCK.register((state, world, pos, tintIndex) -> state.get(PhaseShifterBlock.COLOR).getFireworkColor(), EnergonRelics.Blocks.PHASE_SHIFTER);
ColorProviderRegistry.ITEM.register((stack, tintIndex) -> tintIndex == 0 ? HardcodedConfig.PHASE_SHIFTER_DEFAULT_COLOR.getFireworkColor() : -1); ColorProviderRegistry.ITEM.register((stack, tintIndex) -> tintIndex == 0 ? HardcodedConfig.PHASE_SHIFTER_DEFAULT_COLOR.getFireworkColor() : -1);
AutoConfig.register(UserConfig.class, ReloadSerializer::new); AutoConfig.register(UserConfig.class, ReloadSerializer::new);
AttackBlockCallback.EVENT.register((playerEntity, world, hand, blockPos, direction) -> { AttackBlockCallback.EVENT.register((playerEntity, world, hand, blockPos, direction) -> {
BlockState state = world.getBlockState(blockPos); BlockState state = world.getBlockState(blockPos);
if (state.getBlock() instanceof AbstractFieldBlock || state.getBlock() == EnergonRelics.ENERGY_PORTAL_BLOCK) { if (state.getBlock() instanceof AbstractFieldBlock || state.getBlock() == EnergonRelics.Blocks.ENERGY_PORTAL) {
return ActionResult.FAIL; return ActionResult.FAIL;
} else { } else {
return ActionResult.PASS; return ActionResult.PASS;

View File

@ -43,7 +43,7 @@ public class DefensiveLaserBlockEntityRenderer extends HighlightBlockEntityRende
MinecraftClient client = MinecraftClient.getInstance(); MinecraftClient client = MinecraftClient.getInstance();
client.getItemRenderer().renderItem(new ItemStack(EnergonRelics.DEFENSIVE_LASER_CORE_ITEM), ModelTransformation.Mode.FIXED, light, overlay, matrices, vertexConsumers); client.getItemRenderer().renderItem(new ItemStack(EnergonRelics.Items.DEFENSIVE_LASER_CORE), ModelTransformation.Mode.FIXED, light, overlay, matrices, vertexConsumers);
matrices.pop(); matrices.pop();

View File

@ -46,8 +46,8 @@ public class HighlightBlockEntityRenderer extends BlockEntityRenderer<BlockEntit
MinecraftClient client = MinecraftClient.getInstance(); MinecraftClient client = MinecraftClient.getInstance();
assert client.player != null; assert client.player != null;
ItemStack stack = client.player.getStackInHand(Hand.MAIN_HAND); ItemStack stack = client.player.getStackInHand(Hand.MAIN_HAND);
if (stack.getItem() == EnergonRelics.NETWORK_CHIP_ITEM) { if (stack.getItem() == EnergonRelics.Items.NETWORK_CHIP_ITEM) {
boolean contains = ((EnergyReceiverBlockEntity) entity).contains(EnergonRelics.NETWORK_CHIP_ITEM.getID(stack)); boolean contains = ((EnergyReceiverBlockEntity) entity).contains(EnergonRelics.Items.NETWORK_CHIP_ITEM.getID(stack));
if (!contains) { if (!contains) {
renderCuboid(entity, matrices, vertexConsumers.getBuffer(UNSELECTED_LAYER)); renderCuboid(entity, matrices, vertexConsumers.getBuffer(UNSELECTED_LAYER));
} else { } else {

View File

@ -28,13 +28,13 @@ public final class EnergonRelicsPlugin implements REIPluginV0 {
@Override @Override
public void registerOthers(RecipeHelper recipeHelper) { public void registerOthers(RecipeHelper recipeHelper) {
recipeHelper.registerWorkingStations(INFUSING, EntryStack.create(EnergonRelics.INFUSER_BLOCK)); recipeHelper.registerWorkingStations(INFUSING, EntryStack.create(EnergonRelics.Blocks.INFUSER));
recipeHelper.registerWorkingStations(REACTOR_FUEL, EntryStack.create(EnergonRelics.REACTOR_INPUT_BLOCK)); recipeHelper.registerWorkingStations(REACTOR_FUEL, EntryStack.create(EnergonRelics.Blocks.REACTOR_INPUT));
recipeHelper.removeAutoCraftButton(INFUSING); recipeHelper.removeAutoCraftButton(INFUSING);
recipeHelper.removeAutoCraftButton(REACTOR_FUEL); recipeHelper.removeAutoCraftButton(REACTOR_FUEL);
BuiltinPlugin.getInstance().registerInformation(EntryStack.create(EnergonRelics.CIRCUIT_BOARD_ITEM), new TranslatableText("category.rei." + EnergonRelics.NAMESPACE + ".information.structure_generation.title"), texts -> { BuiltinPlugin.getInstance().registerInformation(EntryStack.create(EnergonRelics.Items.CIRCUIT_BOARD), new TranslatableText("category.rei." + EnergonRelics.NAMESPACE + ".information.structure_generation.title"), texts -> {
List<Text> newTexts = new ArrayList<>(texts); List<Text> newTexts = new ArrayList<>(texts);
newTexts.add(new TranslatableText("category.rei." + EnergonRelics.NAMESPACE + ".information.structure_generation.research_complex")); newTexts.add(new TranslatableText("category.rei." + EnergonRelics.NAMESPACE + ".information.structure_generation.research_complex"));
return newTexts; return newTexts;

View File

@ -66,7 +66,7 @@ public class InfuserCategory implements RecipeCategory<InfuserDisplay> {
@Override @Override
public EntryStack getLogo() { public EntryStack getLogo() {
return EntryStack.create(EnergonRelics.INFUSER_BLOCK); return EntryStack.create(EnergonRelics.Blocks.INFUSER);
} }
@Override @Override

View File

@ -54,7 +54,7 @@ public class ReactorFuelCategory implements RecipeCategory<ReactorFuelDisplay> {
@Override @Override
public EntryStack getLogo() { public EntryStack getLogo() {
return EntryStack.create(EnergonRelics.REACTOR_INPUT_BLOCK); return EntryStack.create(EnergonRelics.Blocks.REACTOR_INPUT);
} }
@Override @Override

View File

@ -0,0 +1,17 @@
package com.thebrokenrail.energonrelics.feature;
import com.thebrokenrail.energonrelics.EnergonRelics;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.BuiltinRegistries;
import net.minecraft.util.registry.Registry;
import net.minecraft.world.gen.feature.ConfiguredFeature;
import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.OreFeatureConfig;
public class CustomFeatures {
public static final ConfiguredFeature<?, ?> VERIDIUM_ORE_FEATURE = Feature.ORE.configure(new OreFeatureConfig(OreFeatureConfig.Rules.BASE_STONE_OVERWORLD, EnergonRelics.Blocks.VERIDIUM_ORE.getDefaultState(), 9)).method_30377(32).spreadHorizontally().repeat(2);
public static void register() {
Registry.register(BuiltinRegistries.CONFIGURED_FEATURE, new Identifier(EnergonRelics.NAMESPACE, "veridium_ore"), VERIDIUM_ORE_FEATURE);
}
}

View File

@ -19,7 +19,7 @@ import java.util.Objects;
public class MultimeterItem extends Item { public class MultimeterItem extends Item {
public MultimeterItem() { public MultimeterItem() {
super(new Settings().maxCount(1).group(EnergonRelics.ITEM_GROUP)); super(new Settings().maxCount(1).group(EnergonRelics.Items.ITEM_GROUP));
} }
public static MutableText format(long value) { public static MutableText format(long value) {
@ -72,7 +72,7 @@ public class MultimeterItem extends Item {
if (!world.isClient()) { if (!world.isClient()) {
Objects.requireNonNull(context.getPlayer()).sendMessage(text, true); Objects.requireNonNull(context.getPlayer()).sendMessage(text, true);
} }
EnergonRelics.playBeep(world, context.getBlockPos()); EnergonRelics.Extras.playBeep(world, context.getBlockPos());
return ActionResult.SUCCESS; return ActionResult.SUCCESS;
} else { } else {
return ActionResult.PASS; return ActionResult.PASS;

View File

@ -24,7 +24,7 @@ import java.util.List;
public class NetworkChipItem extends Item { public class NetworkChipItem extends Item {
public NetworkChipItem() { public NetworkChipItem() {
super(new Settings().maxCount(1).group(EnergonRelics.ITEM_GROUP)); super(new Settings().maxCount(1).group(EnergonRelics.Items.ITEM_GROUP));
} }
private void setID(ItemStack stack, int id) { private void setID(ItemStack stack, int id) {
@ -86,7 +86,7 @@ public class NetworkChipItem extends Item {
NetworkComponent component = NetworkComponent.getInstance(serverWorld); NetworkComponent component = NetworkComponent.getInstance(serverWorld);
((EnergyReceiverBlockEntity) entity).toggle(getOrCreateID(context.getStack(), component)); ((EnergyReceiverBlockEntity) entity).toggle(getOrCreateID(context.getStack(), component));
} }
EnergonRelics.playBeep(world, context.getBlockPos()); EnergonRelics.Extras.playBeep(world, context.getBlockPos());
return ActionResult.SUCCESS; return ActionResult.SUCCESS;
} else { } else {
return ActionResult.PASS; return ActionResult.PASS;

View File

@ -1,6 +1,6 @@
package com.thebrokenrail.energonrelics.mixin; package com.thebrokenrail.energonrelics.mixin;
import com.thebrokenrail.energonrelics.EnergonRelics; import com.thebrokenrail.energonrelics.feature.CustomFeatures;
import net.minecraft.world.biome.GenerationSettings; import net.minecraft.world.biome.GenerationSettings;
import net.minecraft.world.gen.GenerationStep; import net.minecraft.world.gen.GenerationStep;
import net.minecraft.world.gen.feature.DefaultBiomeFeatures; import net.minecraft.world.gen.feature.DefaultBiomeFeatures;
@ -13,6 +13,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
public class MixinDefaultBiomeFeatures { public class MixinDefaultBiomeFeatures {
@Inject(at = @At("RETURN"), method = "addDefaultOres") @Inject(at = @At("RETURN"), method = "addDefaultOres")
private static void addDefaultOres(GenerationSettings.Builder builder, CallbackInfo info) { private static void addDefaultOres(GenerationSettings.Builder builder, CallbackInfo info) {
builder.feature(GenerationStep.Feature.UNDERGROUND_ORES, EnergonRelics.VERIDIUM_ORE_FEATURE); builder.feature(GenerationStep.Feature.UNDERGROUND_ORES, CustomFeatures.VERIDIUM_ORE_FEATURE);
} }
} }

View File

@ -50,7 +50,7 @@ public class CustomPotions {
} }
private static void registerBrewingRecipes() { private static void registerBrewingRecipes() {
BrewingRecipeRegistryAccessor.callRegisterPotionRecipe(Potions.AWKWARD, EnergonRelics.VERIDIUM_POWDER_ITEM, VERIDIUM_POISON_EFFECT.potion); BrewingRecipeRegistryAccessor.callRegisterPotionRecipe(Potions.AWKWARD, EnergonRelics.Items.VERIDIUM_POWDER, VERIDIUM_POISON_EFFECT.potion);
BrewingRecipeRegistryAccessor.callRegisterPotionRecipe(VERIDIUM_POISON_EFFECT.potion, Items.REDSTONE, VERIDIUM_POISON_EFFECT.longPotion); BrewingRecipeRegistryAccessor.callRegisterPotionRecipe(VERIDIUM_POISON_EFFECT.potion, Items.REDSTONE, VERIDIUM_POISON_EFFECT.longPotion);
} }

View File

@ -20,9 +20,9 @@ public class DuplicateNetworkChipRecipe extends SpecialCraftingRecipe {
boolean foundCircuit = false; boolean foundCircuit = false;
for (int i = 0; i < inv.size(); i++) { for (int i = 0; i < inv.size(); i++) {
ItemStack stack = inv.getStack(i); ItemStack stack = inv.getStack(i);
if (stack.getItem() == EnergonRelics.NETWORK_CHIP_ITEM && !foundChip) { if (stack.getItem() == EnergonRelics.Items.NETWORK_CHIP_ITEM && !foundChip) {
foundChip = true; foundChip = true;
} else if (stack.getItem() == EnergonRelics.CIRCUIT_BOARD_ITEM && !foundCircuit) { } else if (stack.getItem() == EnergonRelics.Items.CIRCUIT_BOARD && !foundCircuit) {
foundCircuit = true; foundCircuit = true;
} else if (!stack.isEmpty()) { } else if (!stack.isEmpty()) {
return false; return false;
@ -36,7 +36,7 @@ public class DuplicateNetworkChipRecipe extends SpecialCraftingRecipe {
ItemStack out = ItemStack.EMPTY; ItemStack out = ItemStack.EMPTY;
for (int i = 0; i < inv.size(); i++) { for (int i = 0; i < inv.size(); i++) {
ItemStack stack = inv.getStack(i); ItemStack stack = inv.getStack(i);
if (stack.getItem() == EnergonRelics.NETWORK_CHIP_ITEM) { if (stack.getItem() == EnergonRelics.Items.NETWORK_CHIP_ITEM) {
out = stack.copy(); out = stack.copy();
out.setCount(1); out.setCount(1);
} }
@ -52,7 +52,7 @@ public class DuplicateNetworkChipRecipe extends SpecialCraftingRecipe {
ItemStack stack = inv.getStack(i); ItemStack stack = inv.getStack(i);
if (stack.getItem().hasRecipeRemainder()) { if (stack.getItem().hasRecipeRemainder()) {
defaultedList.set(i, new ItemStack(stack.getItem().getRecipeRemainder())); defaultedList.set(i, new ItemStack(stack.getItem().getRecipeRemainder()));
} else if (stack.getItem() == EnergonRelics.NETWORK_CHIP_ITEM) { } else if (stack.getItem() == EnergonRelics.Items.NETWORK_CHIP_ITEM) {
ItemStack newStack = stack.copy(); ItemStack newStack = stack.copy();
newStack.setCount(1); newStack.setCount(1);
defaultedList.set(i, newStack); defaultedList.set(i, newStack);
@ -69,6 +69,6 @@ public class DuplicateNetworkChipRecipe extends SpecialCraftingRecipe {
@Override @Override
public RecipeSerializer<?> getSerializer() { public RecipeSerializer<?> getSerializer() {
return EnergonRelics.DUPLICATE_NETWORK_CHIP_RECIPE; return EnergonRelics.Extras.DUPLICATE_NETWORK_CHIP_RECIPE;
} }
} }

View File

@ -103,9 +103,9 @@ public final class InfuserRegistry {
add(Items.GOLDEN_APPLE, new InfuserEntry(510, 0.3d, new InfuserAction[]{new InfuserAction.ItemAction(Items.ENCHANTED_GOLDEN_APPLE)}, new InfuserAction[]{new InfuserAction.ExplosionAction()})); add(Items.GOLDEN_APPLE, new InfuserEntry(510, 0.3d, new InfuserAction[]{new InfuserAction.ItemAction(Items.ENCHANTED_GOLDEN_APPLE)}, new InfuserAction[]{new InfuserAction.ExplosionAction()}));
add(Items.COAL, new InfuserEntry(340, 0.2d, new InfuserAction[]{new InfuserAction.ItemAction(Items.DIAMOND)}, new InfuserAction[]{new InfuserAction.ExplosionAction()})); add(Items.COAL, new InfuserEntry(340, 0.2d, new InfuserAction[]{new InfuserAction.ItemAction(Items.DIAMOND)}, new InfuserAction[]{new InfuserAction.ExplosionAction()}));
add(EnergonRelics.VERIDIUM_INGOT_ITEM, new InfuserEntry(240, 0.25d, new InfuserAction[]{new InfuserAction.ItemAction(EnergonRelics.VERIDIUM_ORB_ITEM)}, new InfuserAction[]{new InfuserAction.ParticleAction(), new InfuserAction.ItemAction(EnergonRelics.VERIDIUM_POWDER_ITEM), new InfuserAction.ExplosionAction()})); add(EnergonRelics.Items.VERIDIUM_INGOT, new InfuserEntry(240, 0.25d, new InfuserAction[]{new InfuserAction.ItemAction(EnergonRelics.Items.VERIDIUM_ORB)}, new InfuserAction[]{new InfuserAction.ParticleAction(), new InfuserAction.ItemAction(EnergonRelics.Items.VERIDIUM_POWDER), new InfuserAction.ExplosionAction()}));
add(EnergonRelics.VERIDIUM_POWDER_ITEM, new InfuserEntry(170, 0.27d, new InfuserAction[]{new InfuserAction.ItemAction(new ItemStack(EnergonRelics.VERIDIUM_INGOT_ITEM, 2))}, new InfuserAction[]{new InfuserAction.ParticleAction(), new InfuserAction.ExplosionAction()})); add(EnergonRelics.Items.VERIDIUM_POWDER, new InfuserEntry(170, 0.27d, new InfuserAction[]{new InfuserAction.ItemAction(new ItemStack(EnergonRelics.Items.VERIDIUM_INGOT, 2))}, new InfuserAction[]{new InfuserAction.ParticleAction(), new InfuserAction.ExplosionAction()}));
add(Items.GOLD_NUGGET, new InfuserEntry(260, 0.3d, new InfuserAction[]{new InfuserAction.ItemAction(Items.GOLD_INGOT)}, new InfuserAction[]{new InfuserAction.ItemAction(Items.IRON_NUGGET), new InfuserAction.ParticleAction()})); add(Items.GOLD_NUGGET, new InfuserEntry(260, 0.3d, new InfuserAction[]{new InfuserAction.ItemAction(Items.GOLD_INGOT)}, new InfuserAction[]{new InfuserAction.ItemAction(Items.IRON_NUGGET), new InfuserAction.ParticleAction()}));
add(Items.IRON_NUGGET, new InfuserEntry(260, 0.3d, new InfuserAction[]{new InfuserAction.ItemAction(Items.IRON_INGOT)}, new InfuserAction[]{new InfuserAction.ParticleAction()})); add(Items.IRON_NUGGET, new InfuserEntry(260, 0.3d, new InfuserAction[]{new InfuserAction.ItemAction(Items.IRON_INGOT)}, new InfuserAction[]{new InfuserAction.ParticleAction()}));

View File

@ -64,6 +64,6 @@ public class IndustrialLaserRegistry {
add(Blocks.GOLD_ORE, Items.GOLD_INGOT, Blocks.GOLD_BLOCK); add(Blocks.GOLD_ORE, Items.GOLD_INGOT, Blocks.GOLD_BLOCK);
add(Blocks.DIAMOND_ORE, Items.DIAMOND, Blocks.DIAMOND_BLOCK); add(Blocks.DIAMOND_ORE, Items.DIAMOND, Blocks.DIAMOND_BLOCK);
add(Blocks.EMERALD_ORE, Items.EMERALD, Blocks.EMERALD_BLOCK); add(Blocks.EMERALD_ORE, Items.EMERALD, Blocks.EMERALD_BLOCK);
add(EnergonRelics.VERIDIUM_ORE_BLOCK, EnergonRelics.VERIDIUM_INGOT_ITEM, EnergonRelics.VERIDIUM_BLOCK_BLOCK); add(EnergonRelics.Blocks.VERIDIUM_ORE, EnergonRelics.Items.VERIDIUM_INGOT, EnergonRelics.Blocks.VERIDIUM_BLOCK);
} }
} }

View File

@ -43,8 +43,8 @@ public final class ReactorFuelRegistry {
} }
static { static {
add(EnergonRelics.VERIDIUM_INGOT_ITEM, 1f); add(EnergonRelics.Items.VERIDIUM_INGOT, 1f);
add(EnergonRelics.VERIDIUM_BLOCK_BLOCK.asItem(), 9f); add(EnergonRelics.Blocks.VERIDIUM_BLOCK.asItem(), 9f);
add(EnergonRelics.VERIDIUM_POWDER_ITEM, 0.25f); add(EnergonRelics.Items.VERIDIUM_POWDER, 0.25f);
} }
} }

View File

@ -59,7 +59,7 @@ public abstract class AbstractResearchComplexRoomPart extends BaseResearchComple
set(new BlockPos(0, 0, 2), plate); set(new BlockPos(0, 0, 2), plate);
BlockState light = EnergonRelics.ENERGON_LIGHT_BLOCK.getDefaultState(); BlockState light = EnergonRelics.Blocks.ENERGON_LIGHT.getDefaultState();
List<BlockPos> list = getLights(); List<BlockPos> list = getLights();
for (BlockPos pos : list) { for (BlockPos pos : list) {
set(pos, light); set(pos, light);

View File

@ -17,7 +17,7 @@ public abstract class BaseResearchComplexPart extends StructurePart<ResearchComp
@Override @Override
protected void handleBlockPlace(World world, BlockPos pos, BlockState state) { protected void handleBlockPlace(World world, BlockPos pos, BlockState state) {
if (state.getBlock() == EnergonRelics.ENERGON_LIGHT_BLOCK) { if (state.getBlock() == EnergonRelics.Blocks.ENERGON_LIGHT) {
BlockEntity entity = world.getBlockEntity(pos); BlockEntity entity = world.getBlockEntity(pos);
if (entity instanceof EnergonLightBlockEntity) { if (entity instanceof EnergonLightBlockEntity) {
((EnergonLightBlockEntity) entity).toggle(getState().getMainNetwork()); ((EnergonLightBlockEntity) entity).toggle(getState().getMainNetwork());

View File

@ -62,7 +62,7 @@ public class ResearchComplexHallwayPart extends BaseResearchComplexPart {
} }
if (hasLight) { if (hasLight) {
set(new BlockPos(3, 5, 1), EnergonRelics.ENERGON_LIGHT_BLOCK.getDefaultState()); set(new BlockPos(3, 5, 1), EnergonRelics.Blocks.ENERGON_LIGHT.getDefaultState());
} }
if (leftRoomPadding == 0) { if (leftRoomPadding == 0) {

View File

@ -74,19 +74,19 @@ public class ResearchComplexStartPart extends BaseResearchComplexPart {
} }
if (yOffset == 5) { if (yOffset == 5) {
set(new BlockPos(2, yOffset, 2), EnergonRelics.ENERGON_LIGHT_BLOCK.getDefaultState()); set(new BlockPos(2, yOffset, 2), EnergonRelics.Blocks.ENERGON_LIGHT.getDefaultState());
} }
} }
private void buildReactor() { private void buildReactor() {
set(new BlockPos(0, 1, 0), EnergonRelics.THERMAL_CASING_BLOCK.getDefaultState()); set(new BlockPos(0, 1, 0), EnergonRelics.Blocks.THERMAL_CASING.getDefaultState());
set(new BlockPos(1, 2, 0), EnergonRelics.THERMAL_CASING_BLOCK.getDefaultState()); set(new BlockPos(1, 2, 0), EnergonRelics.Blocks.THERMAL_CASING.getDefaultState());
set(new BlockPos(0, 2, 0), EnergonRelics.REACTOR_CORE_BLOCK.getDefaultState()); set(new BlockPos(0, 2, 0), EnergonRelics.Blocks.REACTOR_CORE.getDefaultState());
set(new BlockPos(-1, 2, 0), EnergonRelics.THERMAL_CASING_BLOCK.getDefaultState()); set(new BlockPos(-1, 2, 0), EnergonRelics.Blocks.THERMAL_CASING.getDefaultState());
set(new BlockPos(0, 3, 0), EnergonRelics.REACTOR_INPUT_BLOCK.getDefaultState()); set(new BlockPos(0, 3, 0), EnergonRelics.Blocks.REACTOR_INPUT.getDefaultState());
set(new BlockPos(0, 2, -1), EnergonRelics.REACTOR_CONTROLLER_BLOCK.getDefaultState()); set(new BlockPos(0, 2, -1), EnergonRelics.Blocks.REACTOR_CONTROLLER.getDefaultState());
set(new BlockPos(0, 1, -1), Blocks.LEVER.getDefaultState().with(LeverBlock.FACE, WallMountLocation.FLOOR)); set(new BlockPos(0, 1, -1), Blocks.LEVER.getDefaultState().with(LeverBlock.FACE, WallMountLocation.FLOOR));
set(new BlockPos(0, 2, 1), EnergonRelics.THERMAL_GLASS_BLOCK.getDefaultState()); set(new BlockPos(0, 2, 1), EnergonRelics.Blocks.THERMAL_GLASS.getDefaultState());
} }
@Override @Override
@ -105,10 +105,10 @@ public class ResearchComplexStartPart extends BaseResearchComplexPart {
@Override @Override
protected void handleBlockPlace(World world, BlockPos pos, BlockState state) { protected void handleBlockPlace(World world, BlockPos pos, BlockState state) {
super.handleBlockPlace(world, pos, state); super.handleBlockPlace(world, pos, state);
if (state.getBlock() == EnergonRelics.REACTOR_CONTROLLER_BLOCK) { if (state.getBlock() == EnergonRelics.Blocks.REACTOR_CONTROLLER) {
BlockEntity entity = world.getBlockEntity(pos); BlockEntity entity = world.getBlockEntity(pos);
if (entity instanceof ReactorControllerBlockEntity) { if (entity instanceof ReactorControllerBlockEntity) {
((ReactorControllerBlockEntity) entity).placeStack(EnergonRelics.NETWORK_CHIP_ITEM.create(getState().getMainNetwork()), world); ((ReactorControllerBlockEntity) entity).placeStack(EnergonRelics.Items.NETWORK_CHIP_ITEM.create(getState().getMainNetwork()), world);
} }
} }
} }