This commit is contained in:
parent
fb8346ce0d
commit
48c0ee8ebe
@ -68,6 +68,8 @@ public class EnergonRelics implements ModInitializer {
|
||||
|
||||
public static final BlockBreakerBlock BLOCK_BREAKER_BLOCK = new BlockBreakerBlock();
|
||||
|
||||
public static final Item VERIDIUM_POWDER_ITEM = new Item(new Item.Settings().group(ITEM_GROUP));
|
||||
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
NETWORK_CHIP_ITEM = Registry.register(Registry.ITEM, new Identifier(NAMESPACE, "network_chip"), new NetworkChipItem());
|
||||
@ -97,8 +99,10 @@ public class EnergonRelics implements ModInitializer {
|
||||
Registry.register(Registry.ITEM, new Identifier(NAMESPACE, "defensive_laser_core"), DEFENSIVE_LASER_CORE_ITEM);
|
||||
DEFENSIVE_LASER_BLOCK.register("defensive_laser");
|
||||
|
||||
StructureGeneratorBlock.register();
|
||||
|
||||
BLOCK_BREAKER_BLOCK.register("block_breaker");
|
||||
|
||||
StructureGeneratorBlock.register();
|
||||
Registry.register(Registry.ITEM, new Identifier(NAMESPACE, "veridium_powder"), VERIDIUM_POWDER_ITEM);
|
||||
}
|
||||
}
|
||||
|
@ -36,25 +36,27 @@ public class ReactorControllerBlockEntity extends EnergyGeneratorBlockEntity {
|
||||
if (getCachedState().get(ReactorControllerBlock.POWERED)) {
|
||||
Reactor reactor = getReactor();
|
||||
if (reactor != null && !reactor.core.isReacting()) {
|
||||
int fuelMultiplier = 0;
|
||||
float fuelMultiplier = 0f;
|
||||
for (ReactorInputBlockEntity input : reactor.inputs) {
|
||||
if (fuelMultiplier != 0) {
|
||||
if (fuelMultiplier != 0f) {
|
||||
break;
|
||||
}
|
||||
for (int i = 0; i < input.size(); i++) {
|
||||
Item item = input.getStack(i).getItem();
|
||||
if (item == EnergonRelics.VERIDIUM_INGOT_ITEM) {
|
||||
fuelMultiplier = 1;
|
||||
fuelMultiplier = 1f;
|
||||
} else if (item == EnergonRelics.VERIDIUM_BLOCK_BLOCK.asItem()) {
|
||||
fuelMultiplier = 9;
|
||||
fuelMultiplier = 9f;
|
||||
} else if (item == EnergonRelics.VERIDIUM_POWDER_ITEM) {
|
||||
fuelMultiplier = 0.25f;
|
||||
}
|
||||
if (fuelMultiplier != 0) {
|
||||
if (fuelMultiplier != 0f) {
|
||||
input.removeStack(i, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (fuelMultiplier != 0) {
|
||||
if (fuelMultiplier != 0f) {
|
||||
reactor.core.startReaction(fuelMultiplier);
|
||||
}
|
||||
}
|
||||
|
@ -31,8 +31,8 @@ public class ReactorCoreBlockEntity extends BlockEntity implements Tickable {
|
||||
return reactionTime > 0;
|
||||
}
|
||||
|
||||
void startReaction(int fuelMultiplier) {
|
||||
reactionTime = HardcodedConfig.REACTOR_TIME * fuelMultiplier;
|
||||
void startReaction(float fuelMultiplier) {
|
||||
reactionTime = (int) ((float) HardcodedConfig.REACTOR_TIME * fuelMultiplier);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -27,5 +27,6 @@
|
||||
"death.attack.energonrelics.defensive_laser": "%s was evaporated by a laser",
|
||||
"death.attack.energonrelics.defensive_laser.player": "%s was evaporated by a laser whilst fighting %s",
|
||||
"block.energonrelics.research_complex_generator": "Research Complex Generator",
|
||||
"block.energonrelics.block_breaker": "Block Breaker"
|
||||
"block.energonrelics.block_breaker": "Block Breaker",
|
||||
"item.energonrelics.veridium_powder": "Veridium Powder"
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "energonrelics:item/veridium_powder"
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
@ -0,0 +1,8 @@
|
||||
{
|
||||
"type": "minecraft:stonecutting",
|
||||
"ingredient": {
|
||||
"item": "energonrelics:veridium_ingot"
|
||||
},
|
||||
"result": "energonrelics:veridium_powder",
|
||||
"count": 4
|
||||
}
|
Reference in New Issue
Block a user