Compare commits

...

22 Commits

Author SHA1 Message Date
TheBrokenRail 9dde7b4288 1.0.4
EnergonRelics/pipeline/head This commit looks good Details
2020-09-10 19:10:56 -04:00
TheBrokenRail 40de5445d1 1.0.3
EnergonRelics/pipeline/head This commit looks good Details
2020-09-06 10:41:30 -04:00
TheBrokenRail 643e287e23 1.0.2
EnergonRelics/pipeline/head This commit looks good Details
2020-08-31 19:19:54 -04:00
TheBrokenRail e5135deef1 Add Veridium Block To Beacon Base Blocks Tag
EnergonRelics/pipeline/head This commit looks good Details
2020-08-30 19:10:33 -04:00
TheBrokenRail 7cb97d4bb6 1.0.1
EnergonRelics/pipeline/head This commit looks good Details
2020-08-30 17:18:29 -04:00
TheBrokenRail a754b43b7c Merge pull request 'fix up ru_ru.lang' (#3) from Yoghurt4C/EnergonRelics:webedit-1 into master
EnergonRelics/pipeline/head This commit looks good Details
2020-08-29 21:37:00 +00:00
Yoghurt4C 89b42442fd Either Hot Shit or Total Bollocks 2020-08-27 13:48:32 +00:00
Yoghurt4C ac1c09cc5f Update 'src/main/resources/assets/energonrelics/lang/ru_ru.json' 2020-08-27 13:21:16 +00:00
TheBrokenRail 8e1712e64c 1.0.0
EnergonRelics/pipeline/head This commit looks good Details
2020-08-26 21:12:47 -04:00
TheBrokenRail 3f59e506a4 0.2.2
EnergonRelics/pipeline/head This commit looks good Details
2020-08-22 12:17:00 -04:00
TheBrokenRail 6382869176 0.2.1
EnergonRelics/pipeline/head This commit looks good Details
2020-08-21 18:34:25 -04:00
TheBrokenRail 8941461874 0.2.0
EnergonRelics/pipeline/head This commit looks good Details
2020-08-21 12:54:25 -04:00
TheBrokenRail 973f92cc35 Add Russian Translations
EnergonRelics/pipeline/head This commit looks good Details
2020-08-21 12:29:06 -04:00
TheBrokenRail e8940acb39 Add New Textures
EnergonRelics/pipeline/head This commit looks good Details
2020-08-21 12:26:37 -04:00
TheBrokenRail c095f7da28 Small Optimization
EnergonRelics/pipeline/head This commit looks good Details
2020-08-20 21:21:35 -04:00
TheBrokenRail c484e6d78a 0.1.9
EnergonRelics/pipeline/head This commit looks good Details
2020-08-20 20:53:33 -04:00
TheBrokenRail fbb1020ce8 0.1.8
EnergonRelics/pipeline/head This commit looks good Details
2020-08-20 19:03:47 -04:00
TheBrokenRail 5258a235b5 Add Proper Culling
EnergonRelics/pipeline/head This commit looks good Details
2020-08-20 16:02:09 -04:00
TheBrokenRail f38f6fbced Add Check
EnergonRelics/pipeline/head This commit looks good Details
2020-08-20 15:58:18 -04:00
TheBrokenRail ce2e2df2d5 Improve Energy Portal
EnergonRelics/pipeline/head This commit looks good Details
2020-08-20 15:46:48 -04:00
TheBrokenRail 91fab233a4 0.1.7
EnergonRelics/pipeline/head This commit looks good Details
2020-08-20 15:24:52 -04:00
TheBrokenRail 4ebb0279fe 0.1.6
EnergonRelics/pipeline/head This commit looks good Details
2020-08-20 14:53:53 -04:00
106 changed files with 779 additions and 280 deletions

View File

@ -1,5 +1,44 @@
# Changelog
**1.0.4**
* Fix Crash When Sneak-Using Dye On A Block
**1.0.3**
* Fix Gravity Crash
**1.0.2**
* Attempt To Fix Structure Generation Crash
**1.0.1**
* Add Advancements
* Industrial Laser Can Smelt Nether Gold Ore
* Rework Network Chip Recipe
**1.0.8**
* Update Textures
**Beta 0.2.2**
* Update To Fabric Structure API
**Beta 0.2.1**
* Fix Solar Panel Crash
**Beta 0.2.0**
* Add New Textures
* Add Russian Translations
**Beta 0.1.9**
* Fix Profiling
**Beta 0.1.8**
* Fix Creative Inventory Breaking
**Beta 0.1.7**
* Improve Industrial Laser Fire
**Beta 0.1.6**
* Improve Energy Teleporter Reliability
**Beta 0.1.5**
* Fix Energy Teleporter Y Issues Again

View File

@ -17,4 +17,5 @@ Using RoughlyEnoughItems with this mod is highly recommended.
## Credits
- ``@PoeticRainbow#5928`` on Discord For The Logo And Poster
- ``@PoeticRainbow#5928`` on Discord For Their Texture Set
- ``@azazelthedemonlord#2563`` on Discord For Their Texture Set
- ``@azazelthedemonlord#2563`` on Discord For Their Texture Set
- ``kazmurenko`` on CurseForge For Translating To Russian

View File

@ -45,9 +45,6 @@ dependencies {
modImplementation "me.sargunvohra.mcmods:autoconfig1u:${project.autoconfig_version}"
include "me.sargunvohra.mcmods:autoconfig1u:${project.autoconfig_version}"
modImplementation "net.earthcomputer:libstructure:${project.libstructure_version}"
include "net.earthcomputer:libstructure:${project.libstructure_version}"
compileOnly "org.jetbrains:annotations:${project.jetbrains_annotations_version}"
}

27
docs/API.md Normal file
View File

@ -0,0 +1,27 @@
# API
The public API is in the package ``com.thebrokenrail.energonrelics.api``. Any registries are located in the package ``com.thebrokenrail.energonrelics.registry``. Anything else should be treated as unstable and may change at any moment.
## Setup
### ``build.gradle``
```gradle
repositories {
maven { url 'https://maven.thebrokenrail.com' }
}
dependencies {
modImplementation 'com.thebrokenrail:energonrelics:VERSION'
// VERSION = "<Mod Version>+<MC Version>", for example "1.0.0+1.16.2"
}
```
### ``fabric.mod.json``
```json
{
"depends": {
"energonrelics": "1.0.x"
}
}
```
## JavaDoc
[View JavaDoc](https://jenkins.thebrokenrail.com/job/EnergonRelics/job/master/JavaDoc/)

View File

@ -6,4 +6,6 @@
[View Blocks](BLOCKS.md)
[View Structures](STRUCTURES.md)
[View Structures](STRUCTURES.md)
[View API](API.md)

View File

@ -6,19 +6,18 @@ org.gradle.jvmargs = -Xmx1G
minecraft_version = 1.16.2
curseforge_id = 398250
simple_minecraft_version = 1.16.2
yarn_build = 6
fabric_loader_version = 0.9.0+build.204
yarn_build = 21
fabric_loader_version = 0.9.2+build.206
# Mod Properties
mod_version = 0.1.5
mod_version = 1.0.4
maven_group = com.thebrokenrail
# Dependencies
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
fabric_api_version = 0.17.2+build.396-1.16
fabric_api_version = 0.19.0+build.398-1.16
modmenu_version = 1.14.6+build.31
cloth_config_version = 4.7.0-unstable
autoconfig_version = 3.2.0-unstable
libstructure_version = 1.5
roughlyenoughitems_version = 5.2.3
jetbrains_annotations_version = 19.0.0

View File

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

View File

@ -53,7 +53,7 @@ public class SimpleBlock extends Block {
@SuppressWarnings("SameReturnValue")
@ApiStatus.OverrideOnly
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);
if (entity instanceof EnergyProviderBlockEntity && ((EnergyProviderBlockEntity) entity).isEnergyProvider()) {
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 (!world.isClient()) {
((EnergyProviderBlockEntity) entity).placeStack(stack, world);
stack.setCount(0);
}
EnergonRelics.playBeep(world, pos);
EnergonRelics.Extras.playBeep(world, pos);
return ActionResult.SUCCESS;
} else {
return ActionResult.FAIL;
@ -77,7 +77,7 @@ public abstract class EnergyBlock extends SimpleBlockWithEntity {
ItemStack newStack = ((EnergyProviderBlockEntity) entity).takeStack(world);
player.setStackInHand(hand, newStack);
}
EnergonRelics.playBeep(world, pos);
EnergonRelics.Extras.playBeep(world, pos);
return ActionResult.SUCCESS;
} else {
return ActionResult.FAIL;

View File

@ -54,7 +54,7 @@ public class EnergyProviderBlockEntity extends BlockEntity implements BlockEntit
*/
@ApiStatus.Internal
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
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()));
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()))) {
takeStack(getWorld());
}
@ -145,9 +145,9 @@ public class EnergyProviderBlockEntity extends BlockEntity implements BlockEntit
NetworkComponent component = NetworkComponent.getInstance(serverWorld);
BlockPosWithDimension newPos = new BlockPosWithDimension(pos, world.getRegistryKey());
if (remove) {
component.removeSource(EnergonRelics.NETWORK_CHIP_ITEM.getID(stack), newPos);
component.removeSource(EnergonRelics.Items.NETWORK_CHIP_ITEM.getID(stack), newPos);
} else {
component.addSource(EnergonRelics.NETWORK_CHIP_ITEM.getID(stack), newPos);
component.addSource(EnergonRelics.Items.NETWORK_CHIP_ITEM.getID(stack), newPos);
}
}

View File

@ -14,8 +14,7 @@ import java.util.Objects;
/**
* Energy Ticker
*/
@ApiStatus.Internal
public class EnergyTicker {
public final class EnergyTicker {
private static final List<EnergyTickable> scheduled = new ArrayList<>();
private static List<EnergyTickable> allLoaded = Collections.emptyList();
@ -33,6 +32,7 @@ public class EnergyTicker {
* Schedule For Next Energy Tick
* @param tickable Object To Tick
*/
@ApiStatus.Internal
public static void schedule(EnergyTickable tickable) {
scheduled.add(tickable);
}
@ -41,12 +41,15 @@ public class EnergyTicker {
* Tick Energy
* @param world World
*/
@ApiStatus.Internal
public static void tick(World world) {
if (Objects.requireNonNull(world.getServer()).getThread() == Thread.currentThread()) {
world.getProfiler().push(EnergonRelics.NAMESPACE);
NetworkComponent.getInstance((ServerWorld) world).clearCache();
world.getProfiler().push("startTick");
List<EnergyTickable> started = new ArrayList<>();
List<EnergyTickable> temp = new ArrayList<>(scheduled);
@ -54,7 +57,7 @@ public class EnergyTicker {
while (!temp.isEmpty()) {
for (EnergyTickable tickable : temp) {
if (!started.contains(tickable)) {
world.getProfiler().push(() -> tickable.getID() + " startTick");
world.getProfiler().push(tickable::getID);
temp2.addAll(tickable.startTick());
started.add(tickable);
@ -62,19 +65,25 @@ public class EnergyTicker {
world.getProfiler().pop();
}
}
temp.clear();
temp.addAll(temp2);
List<EnergyTickable> temp3 = temp;
temp = temp2;
temp2 = temp3;
temp2.clear();
}
allLoaded = Collections.unmodifiableList(started);
world.getProfiler().visit("shuffle");
world.getProfiler().push("shuffle");
Collections.shuffle(started, world.random);
world.getProfiler().pop();
world.getProfiler().pop();
world.getProfiler().push("logicTick");
for (EnergyTickable tickable : started) {
world.getProfiler().push(() -> tickable.getID() + " logicTick");
world.getProfiler().push(tickable::getID);
tickable.logicTick();
@ -82,6 +91,8 @@ public class EnergyTicker {
}
world.getProfiler().pop();
world.getProfiler().pop();
}
scheduled.clear();

View File

@ -3,7 +3,7 @@ package com.thebrokenrail.energonrelics.api.item;
import net.minecraft.text.MutableText;
/**
* Implement To Provide Extra Information In Multimeter
* Implement To Provide Extra Information In Multimeter Output
*/
public interface MultimeterExtra {
/**

View File

@ -106,15 +106,17 @@ public class PhaseShifterBlock extends EnergyBlock {
UseBlockCallback.EVENT.register((player, world, hand, hit) -> {
if (!player.isSpectator() && player.shouldCancelInteraction()) {
BlockState state = world.getBlockState(hit.getBlockPos());
ItemStack stack = player.getStackInHand(hand);
if (stack.getItem() instanceof DyeItem) {
DyeColor newColor = ((DyeItem) stack.getItem()).getColor();
if (state.get(PhaseShifterBlock.COLOR) != newColor) {
world.setBlockState(hit.getBlockPos(), state.with(PhaseShifterBlock.COLOR, newColor));
if (!player.isCreative()) {
stack.decrement(1);
if (state.getBlock() == PhaseShifterBlock.this) {
ItemStack stack = player.getStackInHand(hand);
if (stack.getItem() instanceof DyeItem) {
DyeColor newColor = ((DyeItem) stack.getItem()).getColor();
if (state.get(PhaseShifterBlock.COLOR) != newColor) {
world.setBlockState(hit.getBlockPos(), state.with(PhaseShifterBlock.COLOR, newColor));
if (!player.isCreative()) {
stack.decrement(1);
}
return ActionResult.SUCCESS;
}
return ActionResult.SUCCESS;
}
}
}

View File

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

View File

@ -26,7 +26,7 @@ public class SolarPanelBlockEntity extends EnergyGeneratorBlockEntity {
for (Direction side : Direction.values()) {
light = Math.max(light, getLight(side));
}
return (int) (((float) light) * MathHelper.cos(Objects.requireNonNull(getWorld()).getSkyAngleRadians(1f)));
return (int) (((float) light) * Math.max(0, MathHelper.cos(Objects.requireNonNull(getWorld()).getSkyAngleRadians(1f))));
}
@Override

View File

@ -63,7 +63,7 @@ public class PassiveBatteryControllerBlockEntity extends EnergyReceiverBlockEnti
}
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

View File

@ -21,14 +21,14 @@ import net.minecraft.world.explosion.Explosion;
import java.util.Objects;
public class IndustrialLaserBlockEntity extends FieldProjectorBlockEntity {
public class IndustrialLaserProjectorBlockEntity extends FieldProjectorBlockEntity {
private BlockPos targetPos;
private BlockState targetState;
private int progress = 0;
public IndustrialLaserBlockEntity(BlockEntityType<?> type) {
super(type, state -> EnergonRelics.INDUSTRIAL_LASER_BLOCK);
public IndustrialLaserProjectorBlockEntity(BlockEntityType<?> type) {
super(type, state -> EnergonRelics.Blocks.INDUSTRIAL_LASER);
}
@Override
@ -66,7 +66,7 @@ public class IndustrialLaserBlockEntity extends FieldProjectorBlockEntity {
Block.dropStack(getWorld(), targetPos, IndustrialLaserRegistry.get(targetState.getBlock(), getWorld().random));
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.setRadius(1.2f);
areaEffectCloudEntity.setRadiusOnUse(-0.5f);

View File

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

View File

@ -11,6 +11,6 @@ public class ForcefieldBlock extends AbstractFieldBlock {
@Override
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 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 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));
}

View File

@ -3,7 +3,6 @@ package com.thebrokenrail.energonrelics.block.forcefield.laser;
import com.thebrokenrail.energonrelics.EnergonRelics;
import com.thebrokenrail.energonrelics.block.forcefield.util.AbstractFieldBlock;
import com.thebrokenrail.energonrelics.config.HardcodedConfig;
import net.minecraft.block.AbstractFireBlock;
import net.minecraft.block.BlockState;
import net.minecraft.block.ShapeContext;
import net.minecraft.entity.Entity;
@ -11,7 +10,6 @@ import net.minecraft.entity.ItemEntity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.damage.DamageSource;
import net.minecraft.entity.mob.CreeperEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.util.math.BlockPos;
@ -28,7 +26,7 @@ public class IndustrialLaserBlock extends AbstractFieldBlock {
@Override
protected BlockState getProjectorBlockState() {
return EnergonRelics.INDUSTRIAL_LASER_PROJECTOR_BLOCK.getDefaultState();
return EnergonRelics.Blocks.INDUSTRIAL_LASER_PROJECTOR.getDefaultState();
}
private static class IndustrialLaserDamageSource extends DamageSource {
@ -50,10 +48,7 @@ public class IndustrialLaserBlock extends AbstractFieldBlock {
((CreeperEntity) entity).ignite();
} else if (entity instanceof LivingEntity) {
if (!entity.isFireImmune()) {
entity.setFireTicks(entity.getFireTicks() + 1);
if (entity.getFireTicks() == 0) {
entity.setOnFireFor(8);
}
entity.setOnFireFor(8);
entity.damage(DAMAGE_SOURCE, HardcodedConfig.INDUSTRIAL_LASER_BEAM_DAMAGE);
}

View File

@ -1,6 +1,6 @@
package com.thebrokenrail.energonrelics.block.forcefield.laser;
import com.thebrokenrail.energonrelics.block.entity.forcefield.laser.IndustrialLaserBlockEntity;
import com.thebrokenrail.energonrelics.block.entity.forcefield.laser.IndustrialLaserProjectorBlockEntity;
import com.thebrokenrail.energonrelics.block.forcefield.util.FieldProjectorBlock;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.block.entity.BlockEntityType;
@ -14,6 +14,6 @@ public class IndustrialLaserProjectorBlock extends FieldProjectorBlock {
@Override
protected Function<BlockEntityType<BlockEntity>, BlockEntity> getFactory() {
return IndustrialLaserBlockEntity::new;
return IndustrialLaserProjectorBlockEntity::new;
}
}

View File

@ -31,7 +31,7 @@ public abstract class AbstractFieldBlock extends SimpleBlock {
public static final DirectionProperty FACING = Properties.FACING;
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));
}

View File

@ -21,7 +21,7 @@ public class BeamBlock extends AbstractFieldBlock {
@Override
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")

View File

@ -70,7 +70,7 @@ public class LightningRodBaseBlock extends EnergyBlock {
@Override
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, WorldAccess world, BlockPos pos, BlockPos posFrom) {
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;
}
@ -85,8 +85,8 @@ public class LightningRodBaseBlock extends EnergyBlock {
public void onPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack 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(1), EnergonRelics.LIGHTNING_ROD_BLOCK.getDefaultState().with(LightningRodBlock.HALF, DoubleBlockHalf.LOWER));
world.setBlockState(pos.up(2), EnergonRelics.Blocks.LIGHTNING_ROD.getDefaultState().with(LightningRodBlock.HALF, DoubleBlockHalf.UPPER));
world.setBlockState(pos.up(1), EnergonRelics.Blocks.LIGHTNING_ROD.getDefaultState().with(LightningRodBlock.HALF, DoubleBlockHalf.LOWER));
}
@Override

View File

@ -30,7 +30,7 @@ public class LightningRodBlock extends SimpleBlock {
public static final EnumProperty<DoubleBlockHalf> HALF = Properties.DOUBLE_BLOCK_HALF;
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));
}
@ -91,16 +91,16 @@ public class LightningRodBlock extends SimpleBlock {
if (state.get(HALF) == DoubleBlockHalf.LOWER) {
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;
}
} else if (direction == Direction.DOWN) {
if (newState.getBlock() != EnergonRelics.LIGHTNING_ROD_BASE_BLOCK) {
if (newState.getBlock() != EnergonRelics.Blocks.LIGHTNING_ROD_BASE) {
valid = false;
}
}
} 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;
}
}
@ -120,7 +120,7 @@ public class LightningRodBlock extends SimpleBlock {
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);
}
}
@ -130,6 +130,6 @@ public class LightningRodBlock extends SimpleBlock {
@Override
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) {
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);
for (Direction side : Direction.values()) {
if (targetPos.offset(side).equals(pos)) {

View File

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

View File

@ -7,10 +7,12 @@ import net.fabricmc.api.Environment;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.block.Material;
import net.minecraft.block.ShapeContext;
import net.minecraft.block.piston.PistonBehavior;
import net.minecraft.entity.Entity;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.sound.BlockSoundGroup;
import net.minecraft.sound.SoundCategory;
import net.minecraft.sound.SoundEvents;
import net.minecraft.util.function.BooleanBiFunction;
@ -27,7 +29,7 @@ import java.util.Random;
@SuppressWarnings("deprecation")
public class EnergyPortalBlock extends SimpleBlock {
public EnergyPortalBlock() {
super(FabricBlockSettings.copy(Blocks.NETHER_PORTAL).dropsNothing().emissiveLighting((state, world, pos) -> true).noCollision());
super(FabricBlockSettings.of(Material.PORTAL).strength(-1f, 3600000.8f).lightLevel(11).sounds(BlockSoundGroup.GLASS).dropsNothing().emissiveLighting((state, world, pos) -> true).noCollision());
}
@Override
@ -47,7 +49,7 @@ public class EnergyPortalBlock extends SimpleBlock {
}
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) {
@ -56,7 +58,7 @@ public class EnergyPortalBlock extends SimpleBlock {
if (isValidDirection(side)) {
BlockPos energizedPos = centerPos.offset(side, 2);
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 obsidian2 = world.getBlockState(energizedPos.offset(side.rotateYCounterclockwise(), 1));
if (isObsidian(obsidian1) && isObsidian(obsidian2)) {
@ -72,7 +74,7 @@ public class EnergyPortalBlock extends SimpleBlock {
BlockPos centerPos = pos;
for (Direction side : Direction.values()) {
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());
}
}
@ -85,7 +87,7 @@ public class EnergyPortalBlock extends SimpleBlock {
BlockPos startPos = centerPos.add(-1, 0, -1);
for (int x = 0; x < 3; x++) {
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;
break;
}
@ -99,7 +101,7 @@ public class EnergyPortalBlock extends SimpleBlock {
for (int x = 0; x < 3; x++) {
for (int z = 0; z < 3; 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;
}
}
@ -107,7 +109,7 @@ public class EnergyPortalBlock extends SimpleBlock {
for (int x = 0; x < 3; x++) {
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);
}
}
}
@ -140,11 +142,13 @@ public class EnergyPortalBlock extends SimpleBlock {
public void onEntityCollision(BlockState state, World world, BlockPos pos, Entity entity) {
super.onEntityCollision(state, world, pos, entity);
if (!world.isClient() && !entity.hasVehicle() && entity.canUsePortals() && VoxelShapes.matchesAnywhere(VoxelShapes.cuboid(entity.getBoundingBox().offset(-pos.getX(), -pos.getY(), -pos.getZ())), state.getOutlineShape(world, pos), BooleanBiFunction.AND)) {
World entityWorld = entity.getEntityWorld();
if (entityWorld == world && !entityWorld.isClient() && !entity.hasVehicle() && entity.canUsePortals() && VoxelShapes.matchesAnywhere(VoxelShapes.cuboid(entity.getBoundingBox().offset(-pos.getX(), -pos.getY(), -pos.getZ())), state.getOutlineShape(entityWorld, pos), BooleanBiFunction.AND)) {
boolean cooling = ((PortalCooldownEntity) entity).isEnergyPortalCooldown();
((PortalCooldownEntity) entity).resetEnergyPortalCooldown();
if (!cooling) {
EnergyTeleporter.teleport((ServerWorld) world, entity.getPos(), pos, entity);
EnergyTeleporter.teleport((ServerWorld) entityWorld, entity.getPos(), pos, entity);
}
}
}

View File

@ -2,6 +2,7 @@ package com.thebrokenrail.energonrelics.block.portal;
import com.mojang.brigadier.exceptions.CommandSyntaxException;
import com.thebrokenrail.energonrelics.config.HardcodedConfig;
import com.thebrokenrail.energonrelics.mixin.ServerPlayerEntityAccessor;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
@ -19,13 +20,19 @@ import net.minecraft.world.Heightmap;
import net.minecraft.world.World;
import java.util.EnumSet;
import java.util.UUID;
class EnergyTeleporter {
private static void teleport(Entity entity, ServerWorld to, Vec3d pos) {
if (entity instanceof ServerPlayerEntity) {
((ServerPlayerEntityAccessor) entity).setInTeleportationState(true);
}
try {
TeleportCommand.teleport(null, entity, to, pos.getX(), pos.getY(), pos.getZ(), EnumSet.noneOf(PlayerPositionLookS2CPacket.Flag.class), entity.yaw, entity.pitch, null);
} catch (CommandSyntaxException ignored) {
} catch (CommandSyntaxException e) {
throw new RuntimeException(e);
}
if (entity instanceof ServerPlayerEntity) {
((ServerPlayerEntity) entity).networkHandler.syncWithPlayerPosition();
}
}
@ -33,8 +40,6 @@ class EnergyTeleporter {
BlockPos center = EnergyPortalBlock.getCenterPos(world, blockPos);
Vec3d offset = pos.subtract(Vec3d.ofBottomCenter(center));
UUID uuid = entity.getUuid();
RegistryKey<World> worldKey = world.getRegistryKey();
if (worldKey == World.OVERWORLD) {
teleportWithMultiplier(world, entity, center, offset, World.NETHER, 1d / HardcodedConfig.ENERGY_PORTAL_MULTIPLIER);
@ -45,15 +50,12 @@ class EnergyTeleporter {
}
if (entity instanceof ServerPlayerEntity) {
ServerPlayerEntity player = world.getServer().getPlayerManager().getPlayer(uuid);
if (player != null) {
player.playSound(SoundEvents.BLOCK_PORTAL_TRAVEL, SoundCategory.PLAYERS, 0.25f, world.random.nextFloat() * 0.4f + 0.8f);
}
((ServerPlayerEntity) entity).playSound(SoundEvents.BLOCK_PORTAL_TRAVEL, SoundCategory.PLAYERS, 0.25f, world.random.nextFloat() * 0.4f + 0.8f);
}
}
private static int convertY(int y, int oldHeight, int newHeight) {
int newY = (int) (((float) y / (float) oldHeight) * (float) newHeight);
int newY = (int) (((float) newHeight / (float) oldHeight) * (float) y);
int bottomY = HardcodedConfig.ENERGY_PORTAL_Y_PADDING;
int topY = newHeight - (bottomY + HardcodedConfig.ENERGY_PORTAL_Y_PADDING_EXTRA_TOP);

View File

@ -5,8 +5,8 @@ import com.thebrokenrail.energonrelics.block.entity.structure.StructureGenerator
import com.thebrokenrail.energonrelics.api.block.SimpleBlockWithEntity;
import com.thebrokenrail.energonrelics.structure.researchcomplex.ResearchComplexStartPart;
import com.thebrokenrail.energonrelics.structure.researchcomplex.ResearchComplexState;
import net.earthcomputer.libstructure.LibStructure;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.fabricmc.fabric.api.structure.v1.FabricStructureBuilder;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
@ -23,9 +23,9 @@ import net.minecraft.util.Identifier;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.util.registry.Registry;
import net.minecraft.world.StructureWorldAccess;
import net.minecraft.world.World;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.GenerationSettings;
import net.minecraft.world.gen.GenerationStep;
import net.minecraft.world.gen.chunk.StructureConfig;
import net.minecraft.world.gen.feature.ConfiguredStructureFeature;
@ -100,10 +100,12 @@ public class StructureGeneratorBlock extends SimpleBlockWithEntity {
@Override
public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify) {
super.onBlockAdded(state, world, pos, oldState, notify);
schedule(world, pos);
if (world instanceof ServerWorld) {
schedule((ServerWorld) world, pos);
}
}
public void schedule(World world, BlockPos pos) {
public void schedule(StructureWorldAccess world, BlockPos pos) {
world.getBlockTickScheduler().schedule(pos, this, 0);
}
@ -118,7 +120,7 @@ public class StructureGeneratorBlock extends SimpleBlockWithEntity {
blocks.put(name, block);
Registry.register(Registry.STRUCTURE_PIECE, new Identifier(EnergonRelics.NAMESPACE, name + "_piece"), block.piece);
LibStructure.registerStructure(new Identifier(EnergonRelics.NAMESPACE, name), block.feature, GenerationStep.Feature.UNDERGROUND_STRUCTURES, block.structureConfig, block.feature.configure(FeatureConfig.DEFAULT));
FabricStructureBuilder.create(new Identifier(EnergonRelics.NAMESPACE, name), block.feature).step(GenerationStep.Feature.UNDERGROUND_STRUCTURES).defaultConfig(block.structureConfig).superflatFeature(block.feature.configure(FeatureConfig.DEFAULT)).register();
}
public static void registerBlocks() {

View File

@ -19,17 +19,23 @@ class StructureGeneratorPiece extends StructurePiece {
private final StructureGeneratorBlock block;
private final BlockRotation rotation;
private final BlockPos pos;
private boolean placed;
StructureGeneratorPiece(StructureGeneratorBlock block, BlockRotation rotation, BlockPos pos) {
private StructureGeneratorPiece(StructureGeneratorBlock block, BlockRotation rotation, BlockPos pos, boolean placed) {
super(block.piece, 0);
this.block = block;
this.rotation = rotation;
this.pos = pos;
this.placed = placed;
boundingBox = BlockBox.create(pos.getX(), pos.getY(), pos.getZ(), pos.getX() + 1, pos.getY() + 1, pos.getZ() + 1);
}
StructureGeneratorPiece(StructureGeneratorBlock block, BlockRotation rotation, BlockPos pos) {
this(block, rotation, pos, false);
}
StructureGeneratorPiece(StructureGeneratorBlock block, CompoundTag tag) {
this(block, BlockRotation.valueOf(tag.getString("Rot")), new BlockPos(tag.getInt("X"), tag.getInt("Y"), tag.getInt("Z")));
this(block, BlockRotation.valueOf(tag.getString("Rot")), new BlockPos(tag.getInt("X"), tag.getInt("Y"), tag.getInt("Z")), tag.getBoolean("Placed"));
}
@Override
@ -38,19 +44,24 @@ class StructureGeneratorPiece extends StructurePiece {
tag.putInt("X", pos.getX());
tag.putInt("Y", pos.getY());
tag.putInt("Z", pos.getZ());
tag.putBoolean("Placed", placed);
}
@Override
public boolean generate(StructureWorldAccess world, StructureAccessor structureAccessor, ChunkGenerator chunkGenerator, Random random, BlockBox boundingBox, ChunkPos chunkPos, BlockPos blockPos) {
BlockState state = block.getDefaultState().rotate(rotation);
if (!placed) {
BlockState state = block.getDefaultState().rotate(rotation);
world.setBlockState(pos, state, 3);
BlockEntity entity = world.getBlockEntity(pos);
if (entity instanceof StructureGeneratorBlockEntity) {
((StructureGeneratorBlockEntity) entity).setSeed(random.nextLong());
world.setBlockState(pos, state, 3);
BlockEntity entity = world.getBlockEntity(pos);
if (entity instanceof StructureGeneratorBlockEntity) {
((StructureGeneratorBlockEntity) entity).setSeed(random.nextLong());
}
block.schedule(world, pos);
placed = true;
}
block.schedule(world.toServerWorld(), pos);
return true;
}
}

View File

@ -43,26 +43,26 @@ public final class EnergonRelicsClient implements ClientModInitializer {
public void onInitializeClient() {
EnergyBlock.initRenderer();
BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.THERMAL_GLASS_BLOCK, RenderLayer.getCutout());
BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.DEFENSIVE_LASER_BLOCK, RenderLayer.getCutout());
BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.Blocks.THERMAL_GLASS, RenderLayer.getCutout());
BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.Blocks.DEFENSIVE_LASER, RenderLayer.getCutout());
BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.FORCEFIELD_BLOCK, RenderLayer.getTranslucent());
BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.TRACTOR_BEAM_BLOCK, RenderLayer.getTranslucent());
BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.REPULSOR_BEAM_BLOCK, RenderLayer.getTranslucent());
BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.INDUSTRIAL_LASER_BLOCK, RenderLayer.getTranslucent());
BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.Blocks.FORCEFIELD, RenderLayer.getTranslucent());
BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.Blocks.TRACTOR_BEAM, RenderLayer.getTranslucent());
BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.Blocks.REPULSOR_BEAM, RenderLayer.getTranslucent());
BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.Blocks.INDUSTRIAL_LASER, RenderLayer.getTranslucent());
BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.ENERGY_PORTAL_BLOCK, RenderLayer.getTranslucent());
BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.ENERGY_BEAM_BLOCK, RenderLayer.getTranslucent());
BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.Blocks.ENERGY_PORTAL, RenderLayer.getTranslucent());
BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.Blocks.ENERGY_BEAM, RenderLayer.getTranslucent());
BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.PHASE_SHIFTER_BLOCK, RenderLayer.getCutoutMipped());
ColorProviderRegistry.BLOCK.register((state, world, pos, tintIndex) -> state.get(PhaseShifterBlock.COLOR).getFireworkColor(), EnergonRelics.PHASE_SHIFTER_BLOCK);
BlockRenderLayerMap.INSTANCE.putBlock(EnergonRelics.Blocks.PHASE_SHIFTER, RenderLayer.getCutoutMipped());
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);
AutoConfig.register(UserConfig.class, ReloadSerializer::new);
AttackBlockCallback.EVENT.register((playerEntity, world, hand, blockPos, direction) -> {
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;
} else {
return ActionResult.PASS;

View File

@ -43,7 +43,7 @@ public class DefensiveLaserBlockEntityRenderer extends HighlightBlockEntityRende
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();

View File

@ -5,6 +5,8 @@ import com.thebrokenrail.energonrelics.api.block.entity.core.EnergyReceiverBlock
import com.thebrokenrail.energonrelics.mixin.RenderPhaseAccessor;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.render.RenderLayer;
@ -22,6 +24,8 @@ import net.minecraft.util.Identifier;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.Matrix4f;
import java.util.Objects;
@Environment(EnvType.CLIENT)
public class HighlightBlockEntityRenderer extends BlockEntityRenderer<BlockEntity> {
public HighlightBlockEntityRenderer(BlockEntityRenderDispatcher dispatcher) {
@ -42,19 +46,24 @@ public class HighlightBlockEntityRenderer extends BlockEntityRenderer<BlockEntit
MinecraftClient client = MinecraftClient.getInstance();
assert client.player != null;
ItemStack stack = client.player.getStackInHand(Hand.MAIN_HAND);
if (stack.getItem() == EnergonRelics.NETWORK_CHIP_ITEM) {
boolean contains = ((EnergyReceiverBlockEntity) entity).contains(EnergonRelics.NETWORK_CHIP_ITEM.getID(stack));
if (stack.getItem() == EnergonRelics.Items.NETWORK_CHIP_ITEM) {
boolean contains = ((EnergyReceiverBlockEntity) entity).contains(EnergonRelics.Items.NETWORK_CHIP_ITEM.getID(stack));
if (!contains) {
renderCuboid(matrices, vertexConsumers.getBuffer(UNSELECTED_LAYER));
renderCuboid(entity, matrices, vertexConsumers.getBuffer(UNSELECTED_LAYER));
} else {
renderCuboid(matrices, vertexConsumers.getBuffer(SELECTED_LAYER));
renderCuboid(entity, matrices, vertexConsumers.getBuffer(SELECTED_LAYER));
}
}
}
matrices.pop();
}
protected static void renderCuboid(MatrixStack matrices, VertexConsumer consumer) {
private static boolean shouldDrawSide(BlockEntity entity, Direction side) {
BlockState state = entity.getCachedState();
return Block.shouldDrawSide(state, Objects.requireNonNull(entity.getWorld()), entity.getPos(), side);
}
protected static void renderCuboid(BlockEntity entity, MatrixStack matrices, VertexConsumer consumer) {
float sizeX = 1f;
float sizeY = 1f;
float sizeZ = 1f;
@ -62,21 +71,24 @@ public class HighlightBlockEntityRenderer extends BlockEntityRenderer<BlockEntit
matrices.translate(0.5d, 0.5d, 0.5d);
for (Direction side : Direction.values()) {
matrices.push();
if (shouldDrawSide(entity, side)) {
matrices.push();
multiply(matrices, side);
multiply(matrices, side);
Matrix4f model = matrices.peek().getModel();
Matrix4f model = matrices.peek().getModel();
vertex(consumer, model, -0.5f, -0.5f, -0.5f);
vertex(consumer, model, -0.5f, -0.5f + sizeY, -0.5f);
vertex(consumer, model, -0.5f + sizeX, -0.5f + sizeY, -0.5f);
vertex(consumer, model, -0.5f + sizeX, -0.5f, -0.5f);
vertex(consumer, model, -0.5f, -0.5f, -0.5f);
vertex(consumer, model, -0.5f, -0.5f + sizeY, -0.5f);
vertex(consumer, model, -0.5f + sizeX, -0.5f + sizeY, -0.5f);
vertex(consumer, model, -0.5f + sizeX, -0.5f, -0.5f);
matrices.pop();
matrices.pop();
}
}
}
@SuppressWarnings("SameParameterValue")
private static void vertex(VertexConsumer consumer, Matrix4f model, float x, float y, float z) {
consumer.vertex(model, x, y, z).color(1f, 1f, 1f, 1f).next();
}

View File

@ -67,7 +67,7 @@ public class HolographicSkyBlockEntityRenderer extends HighlightBlockEntityRende
if (entity instanceof HolographicSkyBlockEntity && entity.getCachedState().get(HolographicSkyBlock.POWERED)) {
matrixStack.push();
Matrix4f matrix4f = matrixStack.peek().getModel();
renderCuboid(matrixStack, vertexConsumerProvider.getBuffer(LAYER));
renderCuboid(entity, matrixStack, vertexConsumerProvider.getBuffer(LAYER));
matrixStack.pop();
}
super.render(entity, f, matrixStack, vertexConsumerProvider, i, j);

View File

@ -28,13 +28,13 @@ public final class EnergonRelicsPlugin implements REIPluginV0 {
@Override
public void registerOthers(RecipeHelper recipeHelper) {
recipeHelper.registerWorkingStations(INFUSING, EntryStack.create(EnergonRelics.INFUSER_BLOCK));
recipeHelper.registerWorkingStations(REACTOR_FUEL, EntryStack.create(EnergonRelics.REACTOR_INPUT_BLOCK));
recipeHelper.registerWorkingStations(INFUSING, EntryStack.create(EnergonRelics.Blocks.INFUSER));
recipeHelper.registerWorkingStations(REACTOR_FUEL, EntryStack.create(EnergonRelics.Blocks.REACTOR_INPUT));
recipeHelper.removeAutoCraftButton(INFUSING);
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);
newTexts.add(new TranslatableText("category.rei." + EnergonRelics.NAMESPACE + ".information.structure_generation.research_complex"));
return newTexts;

View File

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

View File

@ -54,7 +54,7 @@ public class ReactorFuelCategory implements RecipeCategory<ReactorFuelDisplay> {
@Override
public EntryStack getLogo() {
return EntryStack.create(EnergonRelics.REACTOR_INPUT_BLOCK);
return EntryStack.create(EnergonRelics.Blocks.REACTOR_INPUT);
}
@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 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) {
@ -72,7 +72,7 @@ public class MultimeterItem extends Item {
if (!world.isClient()) {
Objects.requireNonNull(context.getPlayer()).sendMessage(text, true);
}
EnergonRelics.playBeep(world, context.getBlockPos());
EnergonRelics.Extras.playBeep(world, context.getBlockPos());
return ActionResult.SUCCESS;
} else {
return ActionResult.PASS;

View File

@ -24,7 +24,7 @@ import java.util.List;
public class NetworkChipItem extends Item {
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) {
@ -86,7 +86,7 @@ public class NetworkChipItem extends Item {
NetworkComponent component = NetworkComponent.getInstance(serverWorld);
((EnergyReceiverBlockEntity) entity).toggle(getOrCreateID(context.getStack(), component));
}
EnergonRelics.playBeep(world, context.getBlockPos());
EnergonRelics.Extras.playBeep(world, context.getBlockPos());
return ActionResult.SUCCESS;
} else {
return ActionResult.PASS;

View File

@ -1,6 +1,6 @@
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.gen.GenerationStep;
import net.minecraft.world.gen.feature.DefaultBiomeFeatures;
@ -13,6 +13,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
public class MixinDefaultBiomeFeatures {
@Inject(at = @At("RETURN"), method = "addDefaultOres")
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

@ -5,6 +5,7 @@ import com.thebrokenrail.energonrelics.block.forcefield.util.BeamBlock;
import com.thebrokenrail.energonrelics.block.portal.PortalCooldownEntity;
import com.thebrokenrail.energonrelics.config.HardcodedConfig;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.entity.Entity;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.server.MinecraftServer;
@ -26,6 +27,8 @@ import java.util.function.Predicate;
public abstract class MixinEntity implements PortalCooldownEntity {
@Unique
private int energyPortalCooldown = 0;
@Unique
private boolean touchingBeam = false;
@Shadow
public abstract Box getBoundingBox();
@ -53,7 +56,8 @@ public abstract class MixinEntity implements PortalCooldownEntity {
for (int q = k; q < l; ++q) {
for (int r = m; r < n; ++r) {
pos.set(p, q, r);
if (test.test(getEntityWorld().getBlockState(pos).getBlock())) {
BlockState state = getEntityWorld().getBlockState(pos);
if (state.getCollisionShape(getEntityWorld(), pos).isEmpty() && test.test(state.getBlock())) {
getEntityWorld().getProfiler().pop();
return true;
}
@ -71,7 +75,7 @@ public abstract class MixinEntity implements PortalCooldownEntity {
@Inject(at = @At("HEAD"), method = "hasNoGravity", cancellable = true)
public void hasNoGravity(CallbackInfoReturnable<Boolean> info) {
if (!saving && isTouching(block -> block instanceof BeamBlock)) {
if (!saving && touchingBeam) {
info.setReturnValue(true);
}
}
@ -92,8 +96,13 @@ public abstract class MixinEntity implements PortalCooldownEntity {
energyPortalCooldown = tag.getInt(EnergonRelics.NAMESPACE + ":EnergyPortalCooldown");
}
@Inject(at = @At("HEAD"), method = "tick")
public void tickHead(CallbackInfo info) {
touchingBeam = isTouching(block -> block instanceof BeamBlock);
}
@Inject(at = @At("RETURN"), method = "tick")
public void tick(CallbackInfo info) {
public void tickReturn(CallbackInfo info) {
energyPortalCooldown--;
}

View File

@ -0,0 +1,11 @@
package com.thebrokenrail.energonrelics.mixin;
import net.minecraft.server.network.ServerPlayerEntity;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;
@Mixin(ServerPlayerEntity.class)
public interface ServerPlayerEntityAccessor {
@Accessor
void setInTeleportationState(boolean inTeleportationState);
}

View File

@ -50,7 +50,7 @@ public class CustomPotions {
}
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);
}

View File

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

View File

@ -103,12 +103,14 @@ 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.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.IRON_NUGGET, new InfuserEntry(260, 0.3d, new InfuserAction[]{new InfuserAction.ItemAction(Items.IRON_INGOT)}, new InfuserAction[]{new InfuserAction.ParticleAction()}));
add(Items.IRON_ORE, new InfuserEntry(270, 0.42d, new InfuserAction[]{new InfuserAction.ItemAction(Items.GOLD_ORE)}, new InfuserAction[]{new InfuserAction.ItemAction(Items.IRON_ORE), new InfuserAction.ItemAction(Items.STONE)}));
}
private static Item[] getWool() {

View File

@ -34,7 +34,9 @@ public class IndustrialLaserRegistry {
return new ItemStack(ingot, count);
});
map.put(storage, random -> new ItemStack(ingot, HardcodedConfig.INDUSTRIAL_LASER_INGOTS_FROM_STORAGE));
if (storage != null) {
map.put(storage, random -> new ItemStack(ingot, HardcodedConfig.INDUSTRIAL_LASER_INGOTS_FROM_STORAGE));
}
}
/**
@ -62,8 +64,9 @@ public class IndustrialLaserRegistry {
add(Blocks.COAL_ORE, Items.COAL, Blocks.COAL_BLOCK);
add(Blocks.IRON_ORE, Items.IRON_INGOT, Blocks.IRON_BLOCK);
add(Blocks.GOLD_ORE, Items.GOLD_INGOT, Blocks.GOLD_BLOCK);
add(Blocks.NETHER_GOLD_ORE, Items.GOLD_INGOT, null);
add(Blocks.DIAMOND_ORE, Items.DIAMOND, Blocks.DIAMOND_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 {
add(EnergonRelics.VERIDIUM_INGOT_ITEM, 1f);
add(EnergonRelics.VERIDIUM_BLOCK_BLOCK.asItem(), 9f);
add(EnergonRelics.VERIDIUM_POWDER_ITEM, 0.25f);
add(EnergonRelics.Items.VERIDIUM_INGOT, 1f);
add(EnergonRelics.Blocks.VERIDIUM_BLOCK.asItem(), 9f);
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);
BlockState light = EnergonRelics.ENERGON_LIGHT_BLOCK.getDefaultState();
BlockState light = EnergonRelics.Blocks.ENERGON_LIGHT.getDefaultState();
List<BlockPos> list = getLights();
for (BlockPos pos : list) {
set(pos, light);

View File

@ -17,7 +17,7 @@ public abstract class BaseResearchComplexPart extends StructurePart<ResearchComp
@Override
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);
if (entity instanceof EnergonLightBlockEntity) {
((EnergonLightBlockEntity) entity).toggle(getState().getMainNetwork());

View File

@ -62,7 +62,7 @@ public class ResearchComplexHallwayPart extends BaseResearchComplexPart {
}
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) {

View File

@ -74,19 +74,19 @@ public class ResearchComplexStartPart extends BaseResearchComplexPart {
}
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() {
set(new BlockPos(0, 1, 0), EnergonRelics.THERMAL_CASING_BLOCK.getDefaultState());
set(new BlockPos(1, 2, 0), EnergonRelics.THERMAL_CASING_BLOCK.getDefaultState());
set(new BlockPos(0, 2, 0), EnergonRelics.REACTOR_CORE_BLOCK.getDefaultState());
set(new BlockPos(-1, 2, 0), EnergonRelics.THERMAL_CASING_BLOCK.getDefaultState());
set(new BlockPos(0, 3, 0), EnergonRelics.REACTOR_INPUT_BLOCK.getDefaultState());
set(new BlockPos(0, 2, -1), EnergonRelics.REACTOR_CONTROLLER_BLOCK.getDefaultState());
set(new BlockPos(0, 1, 0), EnergonRelics.Blocks.THERMAL_CASING.getDefaultState());
set(new BlockPos(1, 2, 0), EnergonRelics.Blocks.THERMAL_CASING.getDefaultState());
set(new BlockPos(0, 2, 0), EnergonRelics.Blocks.REACTOR_CORE.getDefaultState());
set(new BlockPos(-1, 2, 0), EnergonRelics.Blocks.THERMAL_CASING.getDefaultState());
set(new BlockPos(0, 3, 0), EnergonRelics.Blocks.REACTOR_INPUT.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, 2, 1), EnergonRelics.THERMAL_GLASS_BLOCK.getDefaultState());
set(new BlockPos(0, 2, 1), EnergonRelics.Blocks.THERMAL_GLASS.getDefaultState());
}
@Override
@ -105,10 +105,10 @@ public class ResearchComplexStartPart extends BaseResearchComplexPart {
@Override
protected void handleBlockPlace(World world, BlockPos pos, BlockState 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);
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);
}
}
}

View File

@ -2,9 +2,11 @@ package com.thebrokenrail.energonrelics.util;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import org.jetbrains.annotations.ApiStatus;
import java.util.function.Consumer;
@ApiStatus.Internal
@Environment(EnvType.CLIENT)
public class BooleanIterator {
public static void run(Consumer<Boolean> function) {

View File

@ -1,7 +1,7 @@
{
"parent": "minecraft:block/block",
"textures": {
"0": "energonrelics:block/gold_block",
"0": "minecraft:block/gold_block",
"1": "energonrelics:block/lightning_rod_base",
"particle": "#1"
},

View File

@ -2,7 +2,7 @@
"credit": "Made by Azazelthedemonlord",
"textures": {
"0": "energonrelics:block/lightning_rod",
"particle": "energonrelics:block/gold_block"
"particle": "minecraft:block/gold_block"
},
"elements": [
{

View File

@ -3,7 +3,7 @@
"textures": {
"0": "energonrelics:block/lightning_rod",
"1": "energonrelics:block/lightning_rod_base",
"particle": "energonrelics:block/gold_block"
"particle": "minecraft:block/gold_block"
},
"elements": [
{

Binary file not shown.

Before

Width:  |  Height:  |  Size: 416 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 497 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 508 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 509 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 708 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -0,0 +1,3 @@
{
"animation": {}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 728 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 793 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 858 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 912 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 863 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 804 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 779 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1009 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 933 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 940 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 944 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 936 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 735 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 782 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 735 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 789 B

View File

@ -65,5 +65,21 @@
"block.energonrelics.phase_shifter": "Phase Shifter",
"text.energonrelics.phase_shifter_extra": "Phased Items: %s",
"category.rei.energonrelics.information.structure_generation.title": "Structures",
"category.rei.energonrelics.information.structure_generation.research_complex": "Found In The Research Complex Underground Structure"
"category.rei.energonrelics.information.structure_generation.research_complex": "Found In The Research Complex Underground Structure",
"advancements.energonrelics.root.title": "EnergonRelics",
"advancements.energonrelics.root.description": "A Simple Technology Mod",
"advancements.energonrelics.find_circuit_board.title": "Mysterious Machines",
"advancements.energonrelics.find_circuit_board.description": "Find a Circuit Board",
"advancements.energonrelics.craft_solar_panel.title": "Power of The Sun",
"advancements.energonrelics.craft_solar_panel.description": "Craft a Solar Panel",
"advancements.energonrelics.craft_network_chip.title": "Invisible Wires",
"advancements.energonrelics.craft_network_chip.description": "Craft a Network Chip",
"advancements.energonrelics.smelt_veridium_ore.title": "Hidden Power",
"advancements.energonrelics.smelt_veridium_ore.description": "Smelt Veridium Ore",
"advancements.energonrelics.craft_switch.title": "Logical Constellations",
"advancements.energonrelics.craft_switch.description": "Craft a Switch",
"advancements.energonrelics.craft_multimeter.title": "Measuring Madness",
"advancements.energonrelics.craft_multimeter.description": "Craft a Multimeter",
"advancements.energonrelics.craft_reactor_core.title": "Artificial Star",
"advancements.energonrelics.craft_reactor_core.description": "Craft a Reactor Core"
}

View File

@ -0,0 +1,65 @@
{
"item.energonrelics.network_chip": "Сетевой чип",
"block.energonrelics.energon_light": "Энергоновая лампа",
"block.energonrelics.solar_panel": "Солнечная панель",
"block.energonrelics.switch": "Переключатель",
"item.energonrelics.multimeter": "Мультиметр",
"text.energonrelics.energy_required": "Требуемая энергия: %s Энергон",
"text.energonrelics.energy_available": "Доступная энергия: %s Энергон",
"block.energonrelics.thermal_casing": "Термальнй кожух",
"block.energonrelics.thermal_glass": "Термостекло",
"block.energonrelics.battery_core": "Ядро батареи",
"block.energonrelics.passive_battery_controller": "Пассивный контроллер батареи",
"block.energonrelics.active_battery_controller": "Активный контроллер батареи",
"item.energonrelics.circuit_board": "Печатная плата",
"block.energonrelics.reactor_controller": "Контроллер реактора",
"block.energonrelics.reactor_input": "Порт реактора",
"block.energonrelics.reactor_core": "Ядро реактора",
"item.energonrelics.veridium_ingot": "Веридиумный слиток",
"block.energonrelics.veridium_ore": "Веридиумная руда",
"block.energonrelics.veridium_block": "Веридиумный блок",
"item.energonrelics.defensive_laser_core": "Защитное лазерное ядро",
"block.energonrelics.defensive_laser": "Защитный лазер",
"text.autoconfig.energonrelics.option.textureSet": "Набор текстур",
"death.attack.energonrelics.defensive_laser": "%s был испарен защитным лазером",
"death.attack.energonrelics.defensive_laser.player": "%s был испарен защитным лазером во время боя с %s",
"block.energonrelics.research_complex_generator": "Генератор исследовательского комплекса",
"block.energonrelics.block_breaker": "Ломатель блоков",
"item.energonrelics.veridium_powder": "Веридиумный порошок",
"effect.energonrelics.veridium_poison": "Веридиумный яд",
"item.minecraft.potion.effect.energonrelics.veridium_poison": "Зелье деградации",
"item.minecraft.splash_potion.effect.energonrelics.veridium_poison": "Взрывное зелье деградации",
"item.minecraft.lingering_potion.effect.energonrelics.veridium_poison": "Туманное зелье деградации",
"item.minecraft.tipped_arrow.effect.energonrelics.veridium_poison": "Стрела деградации",
"block.energonrelics.lightning_rod_base": "Молниеотвод",
"block.energonrelics.forcefield": "Силовое поле",
"block.energonrelics.forcefield_projector": "Проектор силового поля",
"block.energonrelics.creative_energy_source": "Креативный источник энергии",
"block.energonrelics.holographic_sky": "Голографическое небо",
"block.energonrelics.tractor_beam_projector": "Проектор тягового луча",
"block.energonrelics.tractor_beam": "Тяговый луч",
"block.energonrelics.repulsor_beam": "Репульсорный луч",
"block.energonrelics.industrial_laser_projector": "Промышленный лазерный проектор",
"block.energonrelics.industrial_laser": "Промышленный лазер",
"death.attack.energonrelics.industrial_laser": "%s был расплавлен промышленным лазером",
"death.attack.energonrelics.industrial_laser.player": "%s был расплавлен промышленным лазером во время боя с %s",
"block.energonrelics.infuser": "Насыщатель",
"text.energonrelics.infuser_progress": "Прогресс насыщения: %s%%",
"text.energonrelics.battery_core_tooltip": "%s Энергон",
"category.rei.energonrelics.infusing.chance": "%s%% Шанс",
"category.rei.energonrelics.infusing.cost": "%s Энергон",
"category.rei.energonrelics.infusing.name": "Насыщатель",
"item.energonrelics.veridium_orb": "Веридиумная сфера",
"block.energonrelics.energy_projector": "Энергетический проектор",
"block.energonrelics.energy_beam": "Энергетический луч",
"block.energonrelics.energy_portal": "Энергетический портал",
"block.energonrelics.energized_obsidian": "Заряженный обсидиан",
"category.rei.energonrelics.infusing.display_item.minecraft.tnt": "Взрыв",
"category.rei.energonrelics.infusing.display_item.minecraft.fire_charge": "Ничего",
"category.rei.energonrelics.reactor_fuel.name": "Реакторное топливо",
"category.rei.energonrelics.reactor_fuel.multiplier": "%sx Реакция",
"block.energonrelics.phase_shifter": "Фазовращатель",
"text.energonrelics.phase_shifter_extra": "Фазированные предметы: %s",
"category.rei.energonrelics.information.structure_generation.title": "Структуры",
"category.rei.energonrelics.information.structure_generation.research_complex": "Найдено в подземной структуре исследовательского комплекса"
}

View File

@ -1,7 +1,7 @@
{
"parent": "minecraft:block/block",
"textures": {
"1": "energonrelics:block/lightning_rod_base",
"1": "minecraft:block/blackstone",
"particle": "#1"
},
"elements": [

Binary file not shown.

Before

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 575 B

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -0,0 +1,26 @@
{
"display": {
"icon": {
"item": "energonrelics:multimeter"
},
"title": {
"translate": "advancements.energonrelics.craft_multimeter.title"
},
"description": {
"translate": "advancements.energonrelics.craft_multimeter.description"
}
},
"parent": "energonrelics:craft_network_chip",
"criteria": {
"chest_boat": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "energonrelics:multimeter"
}
]
}
}
}
}

View File

@ -0,0 +1,26 @@
{
"display": {
"icon": {
"item": "energonrelics:network_chip"
},
"title": {
"translate": "advancements.energonrelics.craft_network_chip.title"
},
"description": {
"translate": "advancements.energonrelics.craft_network_chip.description"
}
},
"parent": "energonrelics:find_circuit_board",
"criteria": {
"chest_boat": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "energonrelics:network_chip"
}
]
}
}
}
}

View File

@ -0,0 +1,30 @@
{
"display": {
"icon": {
"item": "energonrelics:reactor_core"
},
"title": {
"translate": "advancements.energonrelics.craft_reactor_core.title"
},
"description": {
"translate": "advancements.energonrelics.craft_reactor_core.description"
},
"frame": "goal"
},
"parent": "energonrelics:smelt_veridium_ore",
"rewards": {
"experience": 100
},
"criteria": {
"chest_boat": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "energonrelics:reactor_core"
}
]
}
}
}
}

View File

@ -0,0 +1,26 @@
{
"display": {
"icon": {
"item": "energonrelics:solar_panel"
},
"title": {
"translate": "advancements.energonrelics.craft_solar_panel.title"
},
"description": {
"translate": "advancements.energonrelics.craft_solar_panel.description"
}
},
"parent": "energonrelics:find_circuit_board",
"criteria": {
"chest_boat": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "energonrelics:solar_panel"
}
]
}
}
}
}

View File

@ -0,0 +1,26 @@
{
"display": {
"icon": {
"item": "energonrelics:switch"
},
"title": {
"translate": "advancements.energonrelics.craft_switch.title"
},
"description": {
"translate": "advancements.energonrelics.craft_switch.description"
}
},
"parent": "energonrelics:craft_network_chip",
"criteria": {
"chest_boat": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "energonrelics:switch"
}
]
}
}
}
}

View File

@ -0,0 +1,57 @@
{
"display": {
"icon": {
"item": "energonrelics:circuit_board"
},
"title": {
"translate": "advancements.energonrelics.find_circuit_board.title"
},
"description": {
"translate": "advancements.energonrelics.find_circuit_board.description"
},
"frame": "challenge"
},
"parent": "energonrelics:root",
"rewards": {
"experience": 100,
"recipes": [
"energonrelics:active_battery_controller",
"energonrelics:battery_core",
"energonrelics:block_breaker",
"energonrelics:defensive_laser_core",
"energonrelics:defensive_laser",
"energonrelics:duplicate_network_chip",
"energonrelics:energon_light",
"energonrelics:energy_projector",
"energonrelics:forcefield_projector",
"energonrelics:holographic_sky",
"energonrelics:industrial_laser_projector",
"energonrelics:infuser",
"energonrelics:lightning_rod_base",
"energonrelics:multimeter",
"energonrelics:network_chip",
"energonrelics:passive_battery_controller",
"energonrelics:phase_shifter",
"energonrelics:reactor_controller",
"energonrelics:reactor_core",
"energonrelics:reactor_input",
"energonrelics:solar_panel",
"energonrelics:switch",
"energonrelics:thermal_casing",
"energonrelics:thermal_glass",
"energonrelics:tractor_beam_projector"
]
},
"criteria": {
"chest_boat": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "energonrelics:circuit_board"
}
]
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More