mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
a touch too much
This commit is contained in:
parent
03639e2cdb
commit
bc3e643f97
@ -27,9 +27,10 @@
|
||||
* Changed the way bullet spread is calculated. Instead of the gun's innate inaccuracy being reduced by 75% when using sights, guns now have separate stats for innate inaccuracy (only relevant for things like SMG) as well as a hipfire penalty (roughly the same for all guns)
|
||||
* This also includes a multiplier for ammo spread, which mainly concerns sawed-off shotguns (dual lever action shotguns, Broken and Sacred Dragon) and amplifies the inaccuracy for things like buckshot while slugs perform the same
|
||||
* Guns that cannot be aimed (no sights, akimbo) or where aiming is only useful for special effects (missile launcher lockon, quad launcher steering) do not have a hipfire penalty
|
||||
* Malachite now spawns in large deposits similar to hematite or bauxite, malachite veins are slightly smaller than bauxite veins
|
||||
* Malachite now drops malachite chunks, 6-8 by default. Malachite drops are subject to fortune, each level adding 2-3 extra chunks
|
||||
* Malachite obtained by silk touch is now worth 10 ingots
|
||||
* Malachite now spawns in large deposits similar to hematite or bauxite, malachite veins are smaller than the others but way more common
|
||||
* Malachite now drops malachite chunks, 3-4 by default. Malachite drops are subject to fortune, each level adding 1-2 extra chunks
|
||||
* Malachite obtained by silk touch is now worth 6 ingots
|
||||
* Malachite can be acidized with sulfuric acid into copper scraps with a 1:1 yield (instead of the crucible's 2:1)
|
||||
* Limestone veins are now 50% larger
|
||||
* The compressor now has a NEI handler for any non-generic recipe
|
||||
* Removed compression recipes for steam, because why would you ever use those?
|
||||
|
||||
@ -34,7 +34,7 @@ public class BlockResourceStone extends BlockEnumMulti {
|
||||
|
||||
if(meta == BlockEnums.EnumStoneType.MALACHITE.ordinal()) {
|
||||
ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
|
||||
ret.add(DictFrame.fromOne(ModItems.chunk_ore, EnumChunkType.MALACHITE, 6 + fortune * 2 + world.rand.nextInt(fortune + 3)));
|
||||
ret.add(DictFrame.fromOne(ModItems.chunk_ore, EnumChunkType.MALACHITE, 3 + fortune + world.rand.nextInt(fortune + 2)));
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@ -82,7 +82,7 @@ public class MatDistribution extends SerializableRecipe {
|
||||
registerOre(OreDictManager.REDSTONE.ore(), MAT_REDSTONE, INGOT.q(4), MAT_STONE, QUART.q(1));
|
||||
|
||||
registerOre(OreDictManager.HEMATITE.ore(), MAT_HEMATITE, INGOT.q(1));
|
||||
registerOre(OreDictManager.MALACHITE.ore(), MAT_MALACHITE, INGOT.q(10));
|
||||
registerOre(OreDictManager.MALACHITE.ore(), MAT_MALACHITE, INGOT.q(6));
|
||||
|
||||
registerEntry(DictFrame.fromOne(ModBlocks.stone_resource, EnumStoneType.LIMESTONE), MAT_FLUX, DUST.q(10));
|
||||
registerEntry(ModItems.powder_flux, MAT_FLUX, DUST.q(1));
|
||||
|
||||
@ -20,6 +20,8 @@ import com.hbm.inventory.RecipesCommon.OreDictStack;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.material.MaterialShapes;
|
||||
import com.hbm.inventory.material.Mats;
|
||||
import com.hbm.inventory.material.Mats.MaterialStack;
|
||||
import com.hbm.inventory.recipes.loader.SerializableRecipe;
|
||||
import com.hbm.items.ItemEnums.EnumAshType;
|
||||
import com.hbm.items.ItemEnums.EnumPlantType;
|
||||
@ -27,6 +29,7 @@ import com.hbm.items.ItemEnums.EnumTarType;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemChemicalDye.EnumChemDye;
|
||||
import com.hbm.items.machine.ItemFluidIcon;
|
||||
import com.hbm.items.machine.ItemScraps;
|
||||
import com.hbm.items.special.ItemBedrockOreNew;
|
||||
import com.hbm.items.special.ItemBedrockOre.EnumBedrockOre;
|
||||
import com.hbm.items.special.ItemBedrockOreNew.BedrockOreGrade;
|
||||
@ -81,6 +84,8 @@ public class CrystallizerRecipes extends SerializableRecipe {
|
||||
//registerRecipe(STAR.ore(), new CrystallizerRecipe(ModItems.crystal_starmetal, baseTime), sulfur);
|
||||
registerRecipe(CO.ore(), new CrystallizerRecipe(ModItems.crystal_cobalt, baseTime), sulfur);
|
||||
|
||||
registerRecipe(MALACHITE.ingot(), new CrystallizerRecipe(ItemScraps.create(new MaterialStack(Mats.MAT_COPPER, MaterialShapes.INGOT.q(1))), 300), new FluidStack(Fluids.SULFURIC_ACID, 250));
|
||||
|
||||
registerRecipe("oreRareEarth", new CrystallizerRecipe(ModItems.crystal_rare, baseTime), sulfur);
|
||||
registerRecipe("oreCinnabar", new CrystallizerRecipe(ModItems.crystal_cinnebar, baseTime));
|
||||
|
||||
|
||||
@ -876,7 +876,7 @@ public class MainRegistry {
|
||||
new OreCave(ModBlocks.stone_resource, 1).setThreshold(1.75D).setRangeMult(20).setYLevel(25).setMaxRange(20); //asbestos
|
||||
new OreLayer3D(ModBlocks.stone_resource, EnumStoneType.HEMATITE.ordinal()).setScaleH(0.04D).setScaleV(0.25D).setThreshold(230);
|
||||
new OreLayer3D(ModBlocks.stone_resource, EnumStoneType.BAUXITE.ordinal()).setScaleH(0.03D).setScaleV(0.15D).setThreshold(300);
|
||||
new OreLayer3D(ModBlocks.stone_resource, EnumStoneType.MALACHITE.ordinal()).setScaleH(0.03D).setScaleV(0.15D).setThreshold(325);
|
||||
new OreLayer3D(ModBlocks.stone_resource, EnumStoneType.MALACHITE.ordinal()).setScaleH(0.1D).setScaleV(0.15D).setThreshold(275);
|
||||
//new BiomeCave().setThreshold(1.5D).setRangeMult(20).setYLevel(40).setMaxRange(20);
|
||||
//new OreLayer(Blocks.coal_ore, 0.2F).setThreshold(4).setRangeMult(3).setYLevel(70);
|
||||
BedrockOre.init();
|
||||
|
||||
@ -8,6 +8,7 @@ import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemPACoil.EnumCoilType;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.machine.albion.TileEntityPASource.PAState;
|
||||
import com.hbm.tileentity.machine.albion.TileEntityPASource.Particle;
|
||||
import com.hbm.util.EnumUtil;
|
||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||
@ -71,18 +72,19 @@ public class TileEntityPADipole extends TileEntityCooledBase implements IGUIProv
|
||||
type = EnumUtil.grabEnumSafely(EnumCoilType.class, slots[1].getItemDamage());
|
||||
mult = type.diMin > particle.momentum ? 5 : 1;
|
||||
}
|
||||
|
||||
if(!isCool()) particle.crash(PAState.CRASH_NOCOOL);
|
||||
if(this.power < this.usage * mult) particle.crash(PAState.CRASH_NOPOWER);
|
||||
if(type == null) particle.crash(PAState.CRASH_NOCOIL);
|
||||
if(type != null && type.diMax < particle.momentum) particle.crash(PAState.CRASH_OVERSPEED);
|
||||
|
||||
if(!isCool() || this.power < this.usage * mult || type == null || type.diMax < particle.momentum) {
|
||||
particle.crash();
|
||||
return;
|
||||
}
|
||||
if(particle.invalid) return;
|
||||
|
||||
this.power -= this.usage * mult;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockPos getExitPos(Particle particle) {
|
||||
System.out.println(particle.momentum + " / " + this.threshold);
|
||||
if(particle.momentum >= this.threshold) {
|
||||
ForgeDirection dir = this.ditToForgeDir(checkRedstone() ? dirRedstone : dirUpper);
|
||||
particle.dir = dir;
|
||||
|
||||
@ -6,6 +6,7 @@ import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemPACoil.EnumCoilType;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.machine.albion.TileEntityPASource.PAState;
|
||||
import com.hbm.tileentity.machine.albion.TileEntityPASource.Particle;
|
||||
import com.hbm.util.EnumUtil;
|
||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||
@ -54,11 +55,13 @@ public class TileEntityPAQuadrupole extends TileEntityCooledBase implements IGUI
|
||||
type = EnumUtil.grabEnumSafely(EnumCoilType.class, slots[1].getItemDamage());
|
||||
mult = type.quadMin > particle.momentum ? 5 : 1;
|
||||
}
|
||||
|
||||
if(!isCool()) particle.crash(PAState.CRASH_NOCOOL);
|
||||
if(this.power < this.usage * mult) particle.crash(PAState.CRASH_NOPOWER);
|
||||
if(type == null) particle.crash(PAState.CRASH_NOCOIL);
|
||||
if(type != null && type.quadMax < particle.momentum) particle.crash(PAState.CRASH_OVERSPEED);
|
||||
|
||||
if(!isCool() || this.power < this.usage * mult || type == null || type.quadMax < particle.momentum) {
|
||||
particle.crash();
|
||||
return;
|
||||
}
|
||||
if(particle.invalid) return;
|
||||
|
||||
particle.focus(focusGain);
|
||||
this.power -= this.usage * mult;
|
||||
|
||||
@ -4,6 +4,7 @@ import com.hbm.inventory.container.ContainerPARFC;
|
||||
import com.hbm.inventory.gui.GUIPARFC;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.machine.albion.TileEntityPASource.PAState;
|
||||
import com.hbm.tileentity.machine.albion.TileEntityPASource.Particle;
|
||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
@ -45,10 +46,11 @@ public class TileEntityPARFC extends TileEntityCooledBase implements IGUIProvide
|
||||
|
||||
@Override
|
||||
public void onEnter(Particle particle, ForgeDirection dir) {
|
||||
if(!isCool() || this.power < this.usage) {
|
||||
particle.crash();
|
||||
return;
|
||||
}
|
||||
|
||||
if(!isCool()) particle.crash(PAState.CRASH_NOCOOL);
|
||||
if(this.power < this.usage) particle.crash(PAState.CRASH_NOPOWER);
|
||||
|
||||
if(particle.invalid) return;
|
||||
|
||||
particle.momentum += this.momentumGain;
|
||||
particle.defocus(defocusGain);
|
||||
|
||||
@ -8,6 +8,7 @@ import com.hbm.lib.Library;
|
||||
import com.hbm.particle.helper.ExplosionSmallCreator;
|
||||
import com.hbm.tileentity.IConditionalInvAccess;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.util.EnumUtil;
|
||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
@ -28,22 +29,31 @@ public class TileEntityPASource extends TileEntityCooledBase implements IGUIProv
|
||||
|
||||
public static final long usage = 1_000_000;
|
||||
public Particle particle;
|
||||
public PAState state;
|
||||
|
||||
public int debugSpeed;
|
||||
|
||||
public static enum PAState {
|
||||
IDLE, //no particle active
|
||||
RUNNING, //running without further issue
|
||||
PAUSE_UNLOADED, //particle suspended because it entered unloaded chunks
|
||||
CRASH_DEFOCUS, //crash from excessive defocus
|
||||
CRASH_DERAIL, //crash due to leaving the beamline
|
||||
CRASH_CANNOT_ENTER, //crash due to hitting PA component from invalid side
|
||||
CRASH_NOCOOL, //crash due to lack of cooling
|
||||
CRASH_NOPOWER, //crash due to power outage
|
||||
CRASH_NOCOIL, //crash due to no coil installed (QP, DP)
|
||||
CRASH_OVERSPEED //crash due to coil max speed exceeded (QP, DP)
|
||||
}
|
||||
|
||||
public void updateState(PAState state) { this.state = state; }
|
||||
|
||||
public TileEntityPASource() {
|
||||
super(5);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "container.paSource";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventoryStackLimit() {
|
||||
return 1;
|
||||
}
|
||||
@Override public String getName() { return "container.paSource"; }
|
||||
@Override public int getInventoryStackLimit() { return 1; }
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
@ -65,25 +75,22 @@ public class TileEntityPASource extends TileEntityCooledBase implements IGUIProv
|
||||
|
||||
public void steppy() {
|
||||
if(!worldObj.getChunkProvider().chunkExists(particle.x >> 4, particle.z >> 4)) return; //halt if we reach unloaded areas
|
||||
System.out.println("ticking");
|
||||
ExplosionSmallCreator.composeEffect(worldObj, particle.x + 0.5, particle.y + 0.5, particle.z + 0.5, 10, 1, 1);
|
||||
|
||||
Block b = worldObj.getBlock(particle.x, particle.y, particle.z);
|
||||
if(b instanceof BlockDummyable) {
|
||||
int[] pos = ((BlockDummyable) b).findCore(worldObj, particle.x, particle.y, particle.z);
|
||||
if(pos == null) { particle.crash(); return; }
|
||||
if(pos == null) { particle.crash(PAState.CRASH_DERAIL); return; }
|
||||
TileEntity tile = worldObj.getTileEntity(pos[0], pos[1], pos[2]);
|
||||
if(!(tile instanceof IParticleUser)) { particle.crash(); return; }
|
||||
if(!(tile instanceof IParticleUser)) { particle.crash(PAState.CRASH_DERAIL); return; }
|
||||
IParticleUser pa = (IParticleUser) tile;
|
||||
System.out.println(pa + "");
|
||||
if(pa.canParticleEnter(particle, particle.dir, particle.x, particle.y, particle.z)) {
|
||||
pa.onEnter(particle, particle.dir);
|
||||
BlockPos exit = pa.getExitPos(particle);
|
||||
if(exit != null) particle.move(exit);
|
||||
} else { particle.crash(); worldObj.createExplosion(null, particle.x + 0.5, particle.y + 0.5, particle.z + 0.5, 5, false); return; }
|
||||
} else { particle.crash(PAState.CRASH_CANNOT_ENTER); worldObj.createExplosion(null, particle.x + 0.5, particle.y + 0.5, particle.z + 0.5, 5, false); return; }
|
||||
} else {
|
||||
System.out.println("derailed!");
|
||||
particle.crash();
|
||||
particle.crash(PAState.CRASH_DERAIL);
|
||||
}
|
||||
}
|
||||
|
||||
@ -94,7 +101,7 @@ public class TileEntityPASource extends TileEntityCooledBase implements IGUIProv
|
||||
this.power -= usage;
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - 10);
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
this.particle = new Particle(xCoord + rot.offsetX * 5, yCoord, zCoord + rot.offsetZ * 5, rot, slots[1], slots[2]);
|
||||
this.particle = new Particle(this, xCoord + rot.offsetX * 5, yCoord, zCoord + rot.offsetZ * 5, rot, slots[1], slots[2]);
|
||||
this.slots[1] = null;
|
||||
this.slots[2] = null;
|
||||
this.markDirty();
|
||||
@ -104,12 +111,14 @@ public class TileEntityPASource extends TileEntityCooledBase implements IGUIProv
|
||||
public void serialize(ByteBuf buf) {
|
||||
super.serialize(buf);
|
||||
buf.writeInt(debugSpeed);
|
||||
buf.writeByte((byte) this.state.ordinal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deserialize(ByteBuf buf) {
|
||||
super.deserialize(buf);
|
||||
debugSpeed = buf.readInt();
|
||||
state = EnumUtil.grabEnumSafely(PAState.class, buf.readByte());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -204,6 +213,7 @@ public class TileEntityPASource extends TileEntityCooledBase implements IGUIProv
|
||||
|
||||
public static class Particle {
|
||||
|
||||
private TileEntityPASource source;
|
||||
public int x;
|
||||
public int y;
|
||||
public int z;
|
||||
@ -216,7 +226,8 @@ public class TileEntityPASource extends TileEntityCooledBase implements IGUIProv
|
||||
public ItemStack input1;
|
||||
public ItemStack input2;
|
||||
|
||||
public Particle(int x, int y, int z, ForgeDirection dir, ItemStack input1, ItemStack input2) {
|
||||
public Particle(TileEntityPASource source, int x, int y, int z, ForgeDirection dir, ItemStack input1, ItemStack input2) {
|
||||
this.source = source;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
@ -225,8 +236,9 @@ public class TileEntityPASource extends TileEntityCooledBase implements IGUIProv
|
||||
this.input2 = input2;
|
||||
}
|
||||
|
||||
public void crash() {
|
||||
public void crash(PAState state) {
|
||||
this.invalid = true;
|
||||
this.source.updateState(state);
|
||||
}
|
||||
|
||||
public void move(BlockPos pos) {
|
||||
@ -237,7 +249,7 @@ public class TileEntityPASource extends TileEntityCooledBase implements IGUIProv
|
||||
|
||||
public void defocus(int amount) {
|
||||
this.defocus += amount;
|
||||
if(this.defocus > this.maxDefocus) this.crash();
|
||||
if(this.defocus > this.maxDefocus) this.crash(PAState.CRASH_DEFOCUS);
|
||||
}
|
||||
|
||||
public void focus(int amount) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user