Compare commits

..

2 Commits

Author SHA1 Message Date
Tom Dodd ec4ad53612 v2o.2.0 2020-04-20 19:14:41 +01:00
Tom Dodd b5e7dbd5b7 Revert "v2o.1.3"
This reverts commit 91a6e2d9b3.
2020-04-20 18:55:05 +01:00
17 changed files with 147 additions and 28 deletions

View File

@ -1,3 +1,32 @@
v2o.2.0
+ Added Molten Salt Reactors!
* Interact with vessels and heaters using their respective filtered ports
* Heaters will not block flux, but contribute none themselves and have zero moderator efficiency
* Remove excess heat from the casing of a heat-positive MSR using emergency coolant via vents
+ Added Quantum Computers!
* Simulate real quantum algorithms using many types of quantum gate on a configurable number of qubits
* Do be careful when using more than five qubits - the memory cost can become large!
+ Batteries and RTGs now form multiblocks
* Moderator lines of zero flux now contribute zero efficiency
* Fixed fission shield managers occasionally not remembering their connected shields
* Vents can now be toggled between input and output mode
* Moved various reactor properties such as heat buffers into logic classes
* Reorganised a huge number of configs
+ Finally added explicit server proxy
* Fixed blindness radiation debuff flickering
* Cleaned up many unnecessary method calls on block updates
* Various other minor fixes, changes and refactors
* Possible other things that I have forgotten
- Removed Paulobrine and Herobrian
v2o.1.2 v2o.1.2
+ Added fission neutron shields and shield managers to turn reactors off! + Added fission neutron shields and shield managers to turn reactors off!

View File

@ -1,22 +1,22 @@
mc_version=1.12.2 mc_version=1.12.2
forge_version=14.23.5.2838 forge_version=14.23.5.2838
mapping_version=stable_39 mapping_version=stable_39
mod_version=2o.1.3 mod_version=2o.2.0
ic2_version=2.8.170-ex112 ic2_version=2.8.197-ex112
jei_version=4.15.0.+ jei_version=4.15.0.293
crafttweaker_version=1.12-4.1.19.+ crafttweaker_version=1.12-4.1.19.+
mantle_version=1.12-1.3.3.55 mantle_version=1.12-1.3.3.55
tic_version=1.12.2-2.12.0.157 tic_version=1.12.2-2.13.0.184
oc_version=MC1.12.2-1.7.4.+ oc_version=MC1.12.2-1.7.5.198
cofh_core_version=1.12.2-4.6.3.+ cofh_core_version=1.12.2-4.6.3.27
common_capabilities_version=2.4.4-309 common_capabilities_version=2.4.6-328
gamestages_version=2.0.+ gamestages_version=2.0.119
baubles_version=1.12:1.5.2 baubles_version=1.12:1.5.2
conarm_version=1.12.2:1.2.4 conarm_version=1.12.2:1.2.5.4
gregtech_version=1.12.2:1.8.4.419 gregtech_version=1.12.2:1.9.0.481
mekanism_version=1.12.2:9.8.0.381 mekanism_version=1.12.2:9.8.3.390
projecte_version=1.12.2:PE1.4.1 projecte_version=1.12.2:PE1.4.1
org.gradle.jvmargs=-Xmx4G org.gradle.jvmargs=-Xmx4G

View File

@ -7,7 +7,7 @@ public class FluidLiquid extends NCFluid {
} }
public FluidLiquid(String fluidName, Boolean opaque, Integer color, Integer density, Integer temperature, Integer viscosity, Integer luminosity) { public FluidLiquid(String fluidName, Boolean opaque, Integer color, Integer density, Integer temperature, Integer viscosity, Integer luminosity) {
super(fluidName, true, opaque ? "liquid_opaque" : "liquid", color); super(fluidName, true, opaque == null ? fluidName : (opaque ? "liquid_opaque" : "liquid"), color);
setDensity(density); setDensity(density);
setTemperature(temperature); setTemperature(temperature);
setViscosity(viscosity); setViscosity(viscosity);

View File

@ -115,7 +115,7 @@ public class NCFluids {
addFluidPair(FluidType.SUGAR, "gelatin", 0xDDD09C); addFluidPair(FluidType.SUGAR, "gelatin", 0xDDD09C);
addFluidPair(FluidType.SUGAR, "hydrated_gelatin", waterBlend(0xDDD09C, 0.8F)); addFluidPair(FluidType.SUGAR, "hydrated_gelatin", waterBlend(0xDDD09C, 0.8F));
addFluidPair(FluidType.CHOCOLATE, "marshmallow", 0xE1E1E3); addFluidPair(FluidType.CHOCOLATE, "marshmallow", 0xE1E1E3);
addFluidPair(FluidType.LIQUID, "milk", true, 0xDEDBCF, 1100, 300, 1000, 0); addFluidPair(FluidType.LIQUID, "milk");
addFluidPair(FluidType.MOLTEN, "lif", 0xCDCDCB); addFluidPair(FluidType.MOLTEN, "lif", 0xCDCDCB);
addFluidPair(FluidType.MOLTEN, "bef2", 0xBEC6AA); addFluidPair(FluidType.MOLTEN, "bef2", 0xBEC6AA);
@ -140,7 +140,7 @@ public class NCFluids {
addFluidPair(FluidType.COOLANT, "nak", 0xFFE5BC); addFluidPair(FluidType.COOLANT, "nak", 0xFFE5BC);
addFluidPair(FluidType.HOT_COOLANT, "nak_hot", 0xFFD5AC); addFluidPair(FluidType.HOT_COOLANT, "nak_hot", 0xFFD5AC);
addFluidPair(FluidType.LIQUID, "emergency_coolant", true, 0x6DD0E7, 2000, 100, 2000, 3); addFluidPair(FluidType.LIQUID, "emergency_coolant", true, 0x6DD0E7, 2000, 100, 2000, 3);
addFluidPair(FluidType.LIQUID, "emergency_coolant_heated", true, 0x6D93E7, 2000, 300, 1500, 9); addFluidPair(FluidType.LIQUID, "emergency_coolant_heated", true, 0xCDBEE7, 2000, 300, 1500, 9);
addFluidPair(FluidType.HOT_GAS, "arsenic", 0x818475); addFluidPair(FluidType.HOT_GAS, "arsenic", 0x818475);
addFluidPair(FluidType.MOLTEN, "bas", 0x9B9B89); addFluidPair(FluidType.MOLTEN, "bas", 0x9B9B89);

View File

@ -1,10 +1,10 @@
package nc.multiblock.fission.block; package nc.multiblock.fission.block;
import static nc.block.property.BlockProperties.ACTIVE;
import static nc.block.property.BlockProperties.FACING_ALL;
import nc.multiblock.fission.tile.TileFissionVent; import nc.multiblock.fission.tile.TileFissionVent;
import nc.util.BlockHelper; import nc.util.BlockHelper;
import static nc.block.property.BlockProperties.FACING_ALL;
import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
@ -19,22 +19,25 @@ public class BlockFissionVent extends BlockFissionPart {
public BlockFissionVent() { public BlockFissionVent() {
super(); super();
setDefaultState(blockState.getBaseState().withProperty(FACING_ALL, EnumFacing.NORTH)); setDefaultState(blockState.getBaseState().withProperty(FACING_ALL, EnumFacing.NORTH).withProperty(ACTIVE, Boolean.valueOf(false)));
} }
@Override @Override
protected BlockStateContainer createBlockState() { protected BlockStateContainer createBlockState() {
return new BlockStateContainer(this, FACING_ALL); return new BlockStateContainer(this, FACING_ALL, ACTIVE);
} }
@Override @Override
public IBlockState getStateFromMeta(int meta) { public IBlockState getStateFromMeta(int meta) {
return getDefaultState().withProperty(FACING_ALL, EnumFacing.byIndex(meta)); EnumFacing enumfacing = EnumFacing.byIndex(meta & 7);
return getDefaultState().withProperty(FACING_ALL, enumfacing).withProperty(ACTIVE, Boolean.valueOf((meta & 8) > 0));
} }
@Override @Override
public int getMetaFromState(IBlockState state) { public int getMetaFromState(IBlockState state) {
return state.getValue(FACING_ALL).getIndex(); int i = state.getValue(FACING_ALL).getIndex();
if (state.getValue(ACTIVE).booleanValue()) i |= 8;
return i;
} }
@Override @Override
@ -44,7 +47,7 @@ public class BlockFissionVent extends BlockFissionPart {
@Override @Override
public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) { public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) {
return getDefaultState().withProperty(FACING_ALL, EnumFacing.getDirectionFromEntityLiving(pos, placer)); return getDefaultState().withProperty(FACING_ALL, EnumFacing.getDirectionFromEntityLiving(pos, placer)).withProperty(ACTIVE, Boolean.valueOf(false));
} }
@Override @Override
@ -59,4 +62,15 @@ public class BlockFissionVent extends BlockFissionPart {
if (hand != EnumHand.MAIN_HAND || player.isSneaking()) return false; if (hand != EnumHand.MAIN_HAND || player.isSneaking()) return false;
return rightClickOnPart(world, pos, player, hand, facing); return rightClickOnPart(world, pos, player, hand, facing);
} }
public void setState(boolean isActive, TileEntity tile) {
World world = tile.getWorld();
BlockPos pos = tile.getPos();
IBlockState state = world.getBlockState(pos);
if (!world.isRemote && state.getBlock() instanceof BlockFissionVent) {
if (isActive != state.getValue(ACTIVE)) {
world.setBlockState(pos, state.withProperty(ACTIVE, isActive), 2);
}
}
}
} }

View File

@ -14,6 +14,7 @@ import nc.ModCheck;
import nc.config.NCConfig; import nc.config.NCConfig;
import nc.multiblock.cuboidal.CuboidalPartPositionType; import nc.multiblock.cuboidal.CuboidalPartPositionType;
import nc.multiblock.fission.FissionReactor; import nc.multiblock.fission.FissionReactor;
import nc.multiblock.fission.block.BlockFissionVent;
import nc.tile.fluid.ITileFluid; import nc.tile.fluid.ITileFluid;
import nc.tile.internal.fluid.FluidConnection; import nc.tile.internal.fluid.FluidConnection;
import nc.tile.internal.fluid.FluidTileWrapper; import nc.tile.internal.fluid.FluidTileWrapper;
@ -23,11 +24,16 @@ import nc.tile.internal.fluid.TankOutputSetting;
import nc.tile.internal.fluid.TankSorption; import nc.tile.internal.fluid.TankSorption;
import nc.tile.passive.ITilePassive; import nc.tile.passive.ITilePassive;
import nc.util.GasHelper; import nc.util.GasHelper;
import nc.util.Lang;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.TextComponentString;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.fluids.capability.CapabilityFluidHandler; import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
@ -37,7 +43,7 @@ public class TileFissionVent extends TileFissionPart implements ITileFluid {
private final @Nonnull List<Tank> backupTanks = Lists.newArrayList(new Tank(1, new ArrayList<>()), new Tank(1, new ArrayList<>())); private final @Nonnull List<Tank> backupTanks = Lists.newArrayList(new Tank(1, new ArrayList<>()), new Tank(1, new ArrayList<>()));
private @Nonnull FluidConnection[] fluidConnections = ITileFluid.fluidConnectionAll(Lists.newArrayList(TankSorption.IN, TankSorption.OUT)); private @Nonnull FluidConnection[] fluidConnections = ITileFluid.fluidConnectionAll(Lists.newArrayList(TankSorption.IN, TankSorption.NON));
private @Nonnull FluidTileWrapper[] fluidSides; private @Nonnull FluidTileWrapper[] fluidSides;
@ -65,6 +71,13 @@ public class TileFissionVent extends TileFissionPart implements ITileFluid {
//getWorld().setBlockState(getPos(), getWorld().getBlockState(getPos()), 2); //getWorld().setBlockState(getPos(), getWorld().getBlockState(getPos()), 2);
} }
public void updateBlockState(boolean isActive) {
if (getBlockType() instanceof BlockFissionVent) {
((BlockFissionVent)getBlockType()).setState(isActive, this);
//world.notifyNeighborsOfStateChange(pos, getBlockType(), true);
}
}
@Override @Override
public boolean shouldRefresh(World world, BlockPos pos, IBlockState oldState, IBlockState newState) { public boolean shouldRefresh(World world, BlockPos pos, IBlockState oldState, IBlockState newState) {
return oldState.getBlock() != newState.getBlock(); return oldState.getBlock() != newState.getBlock();
@ -73,9 +86,10 @@ public class TileFissionVent extends TileFissionPart implements ITileFluid {
@Override @Override
public void update() { public void update() {
super.update(); super.update();
/*if (!world.isRemote && getPartPosition().getFacing() != null && !getTanks().get(1).isEmpty()) { EnumFacing facing = getPartPosition().getFacing();
pushFluidToSide(getPartPosition().getFacing()); if (!world.isRemote && !getTanks().get(1).isEmpty() && facing != null && getTankSorption(facing, 1).canDrain()) {
}*/ pushFluidToSide(facing);
}
} }
// Fluids // Fluids
@ -148,6 +162,38 @@ public class TileFissionVent extends TileFissionPart implements ITileFluid {
@Override @Override
public void setTankOutputSetting(int tankNumber, TankOutputSetting setting) {} public void setTankOutputSetting(int tankNumber, TankOutputSetting setting) {}
@Override
public boolean hasConfigurableFluidConnections() {
return true;
}
//IMultitoolLogic
@Override
public boolean onUseMultitool(ItemStack multitoolStack, EntityPlayer player, World world, EnumFacing facing, float hitX, float hitY, float hitZ) {
if (getMultiblock() != null) {
if (getTankSorption(facing, 0) != TankSorption.IN) {
for (EnumFacing side : EnumFacing.VALUES) {
setTankSorption(side, 0, TankSorption.IN);
setTankSorption(side, 1, TankSorption.NON);
}
updateBlockState(false);
player.sendMessage(new TextComponentString(Lang.localise("nc.block.vent_toggle") + " " + TextFormatting.DARK_AQUA + Lang.localise("nc.block.fission_vent_mode.input") + " " + TextFormatting.WHITE + Lang.localise("nc.block.vent_toggle.mode")));
}
else {
for (EnumFacing side : EnumFacing.VALUES) {
setTankSorption(side, 0, TankSorption.NON);
setTankSorption(side, 1, TankSorption.OUT);
}
updateBlockState(true);
player.sendMessage(new TextComponentString(Lang.localise("nc.block.vent_toggle") + " " + TextFormatting.GOLD + Lang.localise("nc.block.fission_vent_mode.output") + " " + TextFormatting.WHITE + Lang.localise("nc.block.vent_toggle.mode")));
}
markDirtyAndNotify();
return true;
}
return super.onUseMultitool(multitoolStack, player, world, facing, hitX, hitY, hitZ);
}
// NBT // NBT
@Override @Override

View File

@ -116,6 +116,12 @@ public abstract class TileFissionManager<MANAGER extends TileFissionManager<MANA
posCacheArrayY.add(listenerPos.getY()); posCacheArrayY.add(listenerPos.getY());
posCacheArrayZ.add(listenerPos.getZ()); posCacheArrayZ.add(listenerPos.getZ());
} }
for (long posLong : listenerPosCache) {
BlockPos pos = BlockPos.fromLong(posLong);
posCacheArrayX.add(pos.getX());
posCacheArrayY.add(pos.getY());
posCacheArrayZ.add(pos.getZ());
}
nbt.setIntArray("listenerPosCacheX", posCacheArrayX.toIntArray()); nbt.setIntArray("listenerPosCacheX", posCacheArrayX.toIntArray());
nbt.setIntArray("listenerPosCacheY", posCacheArrayY.toIntArray()); nbt.setIntArray("listenerPosCacheY", posCacheArrayY.toIntArray());
nbt.setIntArray("listenerPosCacheZ", posCacheArrayZ.toIntArray()); nbt.setIntArray("listenerPosCacheZ", posCacheArrayZ.toIntArray());

View File

@ -95,6 +95,9 @@ public class RadPotionEffects {
else if (potionName.equals("poison") || potionName.equals("minecraft:poison")) { else if (potionName.equals("poison") || potionName.equals("minecraft:poison")) {
return Math.max(effectTime, 25 >> amplifier); return Math.max(effectTime, 25 >> amplifier);
} }
else if (potionName.equals("blindness") || potionName.equals("minecraft:blindness")) {
return Math.max(effectTime, 25);
}
else return effectTime; else return effectTime;
} }
} }

View File

@ -4,13 +4,21 @@
"model": "nuclearcraft:wall_part", "model": "nuclearcraft:wall_part",
"textures": { "textures": {
"in": "nuclearcraft:blocks/fission/vent_in", "in": "nuclearcraft:blocks/fission/vent_in",
"out": "nuclearcraft:blocks/fission/vent_out", "out": "nuclearcraft:blocks/fission/vent_out_input",
"side": "nuclearcraft:blocks/fission/vent_side", "side": "nuclearcraft:blocks/fission/vent_side",
"top": "nuclearcraft:blocks/fission/vent_side" "top": "nuclearcraft:blocks/fission/vent_side"
} }
}, },
"variants": { "variants": {
"inventory": [{}], "inventory": [{}],
"active": {
"false": {},
"true": {
"textures": {
"out": "nuclearcraft:blocks/fission/vent_out_output"
}
}
},
"facing": { "facing": {
"down": {"x": 90}, "down": {"x": 90},
"up": {"x": 270}, "up": {"x": 270},

View File

@ -275,7 +275,7 @@ tile.nuclearcraft.solid_fission_sink2.cryotheum.desc=Must be adjacent to at leas
tile.nuclearcraft.solid_fission_sink.cooling_rate=Cooling Rate: tile.nuclearcraft.solid_fission_sink.cooling_rate=Cooling Rate:
tile.nuclearcraft.salt_fission_controller.name=Molten Salt Fission Controller (WIP) tile.nuclearcraft.salt_fission_controller.name=Molten Salt Fission Controller
tile.nuclearcraft.salt_fission_vessel.name=Fission Fuel Vessel tile.nuclearcraft.salt_fission_vessel.name=Fission Fuel Vessel
# tile.nuclearcraft.salt_fission_vessel.desc=Where the molten salt nuclear fuel fissions and depletes. Place against another vessel while sneaking to copy across its side configuration. # tile.nuclearcraft.salt_fission_vessel.desc=Where the molten salt nuclear fuel fissions and depletes. Place against another vessel while sneaking to copy across its side configuration.
tile.nuclearcraft.salt_fission_heater.standard.name=Standard Fission Coolant Heater tile.nuclearcraft.salt_fission_heater.standard.name=Standard Fission Coolant Heater
@ -2978,6 +2978,11 @@ zerocore.api.nc.multiblock.validation.invalid_part_for_sides=Block at %1$d, %2$d
zerocore.api.nc.multiblock.validation.invalid_part_for_interior=Block at %1$d, %2$d, %3$d is not valid for use in the machine's interior zerocore.api.nc.multiblock.validation.invalid_part_for_interior=Block at %1$d, %2$d, %3$d is not valid for use in the machine's interior
zerocore.api.nc.multiblock.validation.invalid_logic=This multiblock doesn't show in the archive maps - lost a logic core, you have... how embarassing... how embarassing! Gather round the GitHub repository, clear your mind, and find your missing logic we will. zerocore.api.nc.multiblock.validation.invalid_logic=This multiblock doesn't show in the archive maps - lost a logic core, you have... how embarassing... how embarassing! Gather round the GitHub repository, clear your mind, and find your missing logic we will.
nc.block.vent_toggle=Toggled vent to
nc.block.fission_vent_mode.input=INPUT
nc.block.fission_vent_mode.output=OUTPUT
nc.block.vent_toggle.mode=mode!
nc.block.fluid_toggle=Toggled side to nc.block.fluid_toggle=Toggled side to
nc.block.fluid_toggle_opposite=Toggled opposite side to nc.block.fluid_toggle_opposite=Toggled opposite side to

Binary file not shown.

Before

Width:  |  Height:  |  Size: 491 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 482 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

View File

@ -0,0 +1,5 @@
{
"animation": {
"frametime": 2
}
}