crash fixes, oily boy

This commit is contained in:
Bob 2021-08-25 23:29:50 +02:00
parent 35e6d6b5cd
commit 4671ecbe4a
10 changed files with 49 additions and 50 deletions

View File

@ -109,33 +109,26 @@ public class SchrabidicBlock extends BlockFluidClassic {
public int tickRate(World p_149738_1_) {
return 15;
}
@Override
@SideOnly(Side.CLIENT)
public int getRenderBlockPass() {
return 0;
}
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World world, int x, int y, int z, Random rand) {
super.randomDisplayTick(world, x, y, z, rand);
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
if(world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ).getMaterial() == Material.air) {
double ix = x + 0.5F + rand.nextDouble() * 2 - 1D;
double iy = y + 0.5F + rand.nextDouble() * 2 - 1D;
double iz = z + 0.5F + rand.nextDouble() * 2 - 1D;
double ix = x + 0.5F + dir.offsetX + rand.nextDouble() * 3 - 1.5D;
double iy = y + 0.5F + dir.offsetY + rand.nextDouble() * 3 - 1.5D;
double iz = z + 0.5F + dir.offsetZ + rand.nextDouble() * 3 - 1.5D;
if(dir.offsetX != 0)
ix = x + 0.5F + dir.offsetX * 0.5 + rand.nextDouble() * dir.offsetX;
if(dir.offsetY != 0)
iy = y + 0.5F + dir.offsetY * 0.5 + rand.nextDouble() * dir.offsetY;
if(dir.offsetZ != 0)
iz = z + 0.5F + dir.offsetZ * 0.5 + rand.nextDouble() * dir.offsetZ;
NBTTagCompound data = new NBTTagCompound();
data.setString("type", "schrabfog");
data.setDouble("posX", ix);
data.setDouble("posY", iy);
data.setDouble("posZ", iz);
MainRegistry.proxy.effectNT(data);
}
}
NBTTagCompound data = new NBTTagCompound();
data.setString("type", "schrabfog");
data.setDouble("posX", ix);
data.setDouble("posY", iy);
data.setDouble("posZ", iz);
MainRegistry.proxy.effectNT(data);
}
}

View File

@ -73,7 +73,7 @@ public class BlockCluster extends Block implements IDrillInteraction {
@Override
public ItemStack extractResource(World world, int x, int y, int z, int meta, IMiningDrill drill) {
return canBreak(world, x, y, z, meta, drill) ? new ItemStack(getDrop()) : null;
return drill.getDrillRating() <= 70 ? new ItemStack(getDrop()) : null;
}
@Override

View File

@ -274,7 +274,8 @@ public class AssemblerRecipes {
makeRecipe(new ComparableStack(ModBlocks.machine_epress, 1), new AStack[] {new OreDictStack("plateSteel", 8), new ComparableStack(ModItems.plate_polymer, 4), new ComparableStack(ModItems.pipes_steel, 1), new ComparableStack(ModItems.bolt_tungsten, 4), new ComparableStack(ModItems.coil_copper, 2), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.circuit_copper, 1), new ComparableStack(ModItems.canister_canola, 1), },160);
makeRecipe(new ComparableStack(ModBlocks.machine_chemplant, 1), new AStack[] {new OreDictStack("ingotSteel", 8), new OreDictStack("plateCopper", 6), new ComparableStack(ModItems.tank_steel, 4), new ComparableStack(ModItems.hull_big_steel, 1), new ComparableStack(ModItems.coil_tungsten, 3), new ComparableStack(ModItems.circuit_copper, 2), new ComparableStack(ModItems.circuit_red_copper, 1), new ComparableStack(ModItems.plate_polymer, 8), },200);
makeRecipe(new ComparableStack(ModBlocks.machine_crystallizer, 1), new AStack[] {new ComparableStack(ModItems.hull_big_steel, 4), new ComparableStack(ModItems.pipes_steel, 1), new OreDictStack("ingotDesh", 4), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.blades_advanced_alloy, 2), new OreDictStack("ingotSteel", 16), new OreDictStack("plateTitanium", 16), new ComparableStack(Blocks.glass, 4), new ComparableStack(ModItems.circuit_gold, 1), },400);
makeRecipe(new ComparableStack(ModBlocks.machine_fluidtank, 1), new AStack[] {new OreDictStack("ingotSteel", 2), new OreDictStack("plateSteel", 6), new ComparableStack(ModItems.hull_big_steel, 4), },150);
makeRecipe(new ComparableStack(ModBlocks.machine_fluidtank, 1), new AStack[] {new OreDictStack("ingotSteel", 2), new OreDictStack("plateSteel", 6), new ComparableStack(ModItems.hull_big_steel, 4), new ComparableStack(ModItems.oil_tar, 4), },150);
makeRecipe(new ComparableStack(ModBlocks.machine_bat9000, 1), new AStack[] {new OreDictStack("plateSteel", 16), new ComparableStack(ModItems.ingot_tcalloy, 16), new ComparableStack(ModBlocks.steel_scaffold, 16), new ComparableStack(ModItems.oil_tar, 16), },150);
makeRecipe(new ComparableStack(ModBlocks.machine_drill, 1), new AStack[] {new ComparableStack(ModBlocks.steel_scaffold, 6), new OreDictStack("ingotSteel", 4), new ComparableStack(ModItems.wire_red_copper, 4), new ComparableStack(ModItems.circuit_copper, 1), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.ingot_dura_steel, 2), new ComparableStack(ModItems.bolt_dura_steel, 2), new ComparableStack(ModItems.drill_titanium, 1), },200);
makeRecipe(new ComparableStack(ModBlocks.machine_mining_laser, 1), new AStack[] {new ComparableStack(ModItems.tank_steel, 3), new OreDictStack("plateSteel", 16), new ComparableStack(ModItems.crystal_redstone, 3), new ComparableStack(Items.diamond, 3), new ComparableStack(ModItems.ingot_polymer, 4), new ComparableStack(ModItems.motor, 3), new ComparableStack(ModItems.ingot_dura_steel, 4), new ComparableStack(ModItems.bolt_dura_steel, 6), new ComparableStack(ModBlocks.machine_battery, 3), },400);
makeRecipe(new ComparableStack(ModBlocks.machine_turbofan, 1), new AStack[] {new ComparableStack(ModItems.hull_big_steel, 1), new ComparableStack(ModItems.hull_big_titanium, 3), new ComparableStack(ModItems.hull_small_steel, 2), new ComparableStack(ModItems.turbine_tungsten, 1), new ComparableStack(ModItems.turbine_titanium, 7), new ComparableStack(ModItems.bolt_compound, 8), new OreDictStack("ingotMingrade", 12), new ComparableStack(ModItems.wire_red_copper, 24), },500);

View File

@ -1631,19 +1631,24 @@ public class MachineRecipes {
switch(ItemChemistryTemplate.EnumChemistryTemplate.getEnum(stack.getItemDamage())) {
case CC_OIL:
list.add(new ItemStack(Items.coal, 10));
list.add(new ItemStack(Items.coal, 8));
list.add(new ItemStack(ModItems.oil_tar, 4));
break;
case CC_I:
list.add(new ItemStack(Items.coal, 8));
list.add(new ItemStack(Items.coal, 6));
list.add(new ItemStack(ModItems.oil_tar, 4));
break;
case CC_HEATING:
list.add(new ItemStack(Items.coal, 8));
list.add(new ItemStack(Items.coal, 6));
list.add(new ItemStack(ModItems.oil_tar, 4));
break;
case CC_HEAVY:
list.add(new ItemStack(Items.coal, 10));
list.add(new ItemStack(Items.coal, 8));
list.add(new ItemStack(ModItems.oil_tar, 4));
break;
case CC_NAPHTHA:
list.add(new ItemStack(Items.coal, 10));
list.add(new ItemStack(Items.coal, 8));
list.add(new ItemStack(ModItems.oil_tar, 4));
break;
case ASPHALT:
list.add(new ItemStack(Blocks.gravel, 2));
@ -1826,24 +1831,19 @@ public class MachineRecipes {
input[1] = new FluidStack(2000, FluidType.STEAM);
break;
case CC_I:
input[0] = new FluidStack(800, FluidType.SMEAR);
input[1] = new FluidStack(1800, FluidType.WATER);
input[0] = new FluidStack(1800, FluidType.WATER);
break;
case CC_OIL:
input[0] = new FluidStack(600, FluidType.OIL);
input[1] = new FluidStack(1400, FluidType.STEAM);
input[0] = new FluidStack(1400, FluidType.STEAM);
break;
case CC_HEATING:
input[0] = new FluidStack(800, FluidType.HEATINGOIL);
input[1] = new FluidStack(2000, FluidType.STEAM);
input[0] = new FluidStack(2000, FluidType.STEAM);
break;
case CC_HEAVY:
input[0] = new FluidStack(600, FluidType.HEAVYOIL);
input[1] = new FluidStack(1400, FluidType.WATER);
input[0] = new FluidStack(1400, FluidType.WATER);
break;
case CC_NAPHTHA:
input[0] = new FluidStack(1200, FluidType.NAPHTHA);
input[1] = new FluidStack(2400, FluidType.STEAM);
input[0] = new FluidStack(2400, FluidType.STEAM);
break;
case ASPHALT:
input[0] = new FluidStack(1000, FluidType.BITUMEN);
@ -2048,12 +2048,12 @@ public class MachineRecipes {
output[0] = new ItemStack(ModItems.circuit_schrabidium, 1);
break;
case SF_OIL:
output[0] = new ItemStack(ModItems.solid_fuel, 1);
output[1] = new ItemStack(ModItems.solid_fuel, 1);
output[0] = new ItemStack(ModItems.oil_tar, 1);
output[1] = new ItemStack(ModItems.oil_tar, 1);
break;
case SF_HEAVYOIL:
output[0] = new ItemStack(ModItems.solid_fuel, 1);
output[1] = new ItemStack(ModItems.solid_fuel, 1);
output[0] = new ItemStack(ModItems.oil_tar, 1);
output[1] = new ItemStack(ModItems.oil_tar, 1);
break;
case SF_SMEAR:
output[0] = new ItemStack(ModItems.solid_fuel, 1);

View File

@ -290,6 +290,7 @@ public class ModItems {
public static Item plate_armor_fau;
public static Item plate_armor_dnt;
public static Item oil_tar;
public static Item solid_fuel;
public static Item rocket_fuel;
@ -2598,6 +2599,7 @@ public class ModItems {
plate_armor_fau = new Item().setUnlocalizedName("plate_armor_fau").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_armor_fau");
plate_armor_dnt = new Item().setUnlocalizedName("plate_armor_dnt").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_armor_dnt");
oil_tar = new Item().setUnlocalizedName("oil_tar").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":oil_tar");
solid_fuel = new Item().setUnlocalizedName("solid_fuel").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":solid_fuel");
rocket_fuel = new Item().setUnlocalizedName("rocket_fuel").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":rocket_fuel");
coke = new Item().setUnlocalizedName("coke").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":coke");
@ -5387,6 +5389,7 @@ public class ModItems {
GameRegistry.registerItem(lithium, lithium.getUnlocalizedName());
GameRegistry.registerItem(ingot_zirconium, ingot_zirconium.getUnlocalizedName());
GameRegistry.registerItem(ingot_semtex, ingot_semtex.getUnlocalizedName());
GameRegistry.registerItem(oil_tar, oil_tar.getUnlocalizedName());
GameRegistry.registerItem(solid_fuel, solid_fuel.getUnlocalizedName());
GameRegistry.registerItem(rocket_fuel, rocket_fuel.getUnlocalizedName());
GameRegistry.registerItem(ingot_fiberglass, ingot_fiberglass.getUnlocalizedName());

View File

@ -363,12 +363,12 @@ public class CraftingManager {
GameRegistry.addRecipe(new ItemStack(ModBlocks.basalt_tiles, 4), new Object[] { "CC", "CC", 'C', ModBlocks.basalt_brick });
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.reinforced_brick), 8), new Object[] { "FBF", "BFB", "FBF", 'F', Blocks.iron_bars, 'B', ModBlocks.brick_concrete });
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.brick_compound), 8), new Object[] { "FBF", "BFB", "FBF", 'F', ModItems.bolt_tungsten, 'B', ModBlocks.reinforced_brick });
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.reinforced_glass), 8), new Object[] { "FBF", "BFB", "FBF", 'F', Blocks.iron_bars, 'B', Blocks.glass });
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.reinforced_brick), 4), new Object[] { "FBF", "BFB", "FBF", 'F', Blocks.iron_bars, 'B', ModBlocks.brick_concrete });
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.brick_compound), 4), new Object[] { "FBF", "BTB", "FBF", 'F', ModItems.bolt_tungsten, 'B', ModBlocks.reinforced_brick, 'T', ModItems.oil_tar });
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.reinforced_glass), 4), new Object[] { "FBF", "BFB", "FBF", 'F', Blocks.iron_bars, 'B', Blocks.glass });
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.reinforced_light), 1), new Object[] { "FFF", "FBF", "FFF", 'F', Blocks.iron_bars, 'B', Blocks.glowstone });
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.reinforced_lamp_off), 1), new Object[] { "FFF", "FBF", "FFF", 'F', Blocks.iron_bars, 'B', Blocks.redstone_lamp });
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.reinforced_sand), 8), new Object[] { "FBF", "BFB", "FBF", 'F', Blocks.iron_bars, 'B', Blocks.sandstone });
GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.reinforced_sand), 4), new Object[] { "FBF", "BFB", "FBF", 'F', Blocks.iron_bars, 'B', Blocks.sandstone });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.lamp_tritium_green_off, 1), new Object[] { "GPG", "1T2", "GPG", 'G', "blockGlass", 'P', ModItems.powder_fire, 'T', ModItems.cell_tritium, '1', "dustSulfur", '2', "dustCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.lamp_tritium_blue_off, 1), new Object[] { "GPG", "1T2", "GPG", 'G', "blockGlass", 'P', ModItems.powder_fire, 'T', ModItems.cell_tritium, '1', "dustAluminum", '2', ModItems.powder_strontium }));
@ -689,6 +689,7 @@ public class CraftingManager {
GameRegistry.addRecipe(new ItemStack(ModBlocks.dfc_stabilizer, 1), new Object[] { "SDS", "TXL", "SDS", 'S', ModItems.ingot_starmetal, 'D', ModItems.plate_desh, 'T', ModItems.singularity_spark, 'X', ModItems.magnet_circular, 'L', ModItems.crystal_xen });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.barrel_plastic, 1), new Object[] { "IPI", "I I", "IPI", 'I', ModItems.plate_polymer, 'P', "plateAluminum" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.barrel_iron, 1), new Object[] { "IPI", "I I", "IPI", 'I', "plateIron", 'P', "ingotIron" }));
GameRegistry.addShapelessRecipe(new ItemStack(ModBlocks.barrel_iron, 1), new Object[] { ModBlocks.barrel_corroded, ModItems.oil_tar });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.barrel_steel, 1), new Object[] { "IPI", "I I", "IPI", 'I', "plateSteel", 'P', "ingotSteel" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.barrel_tcalloy, 1), new Object[] { "IPI", "I I", "IPI", 'I', "ingotTcAlloy", 'P', "plateTitanium" }));
GameRegistry.addRecipe(new ItemStack(ModBlocks.barrel_antimatter, 1), new Object[] { "IPI", "IPI", "IPI", 'I', ModItems.plate_saturnite, 'P', ModItems.coil_advanced_torus });

View File

@ -6,7 +6,6 @@ import com.hbm.blocks.ModBlocks;
import com.hbm.interfaces.IConsumer;
import com.hbm.interfaces.Spaghetti;
import com.hbm.inventory.UpgradeManager;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType;
import com.hbm.lib.Library;
import com.hbm.packet.AuxElectricityPacket;
@ -106,7 +105,7 @@ public class TileEntityMachineMiningDrill extends TileEntityMachineBase implemen
this.radius = 1;
this.fortune = 0;
UpgradeManager.eval(slots, 10, 13);
UpgradeManager.eval(slots, 10, 12);
this.radius += Math.min(UpgradeManager.getLevel(UpgradeType.EFFECT), 3);
this.consumption += Math.min(UpgradeManager.getLevel(UpgradeType.EFFECT), 3) * 80;
@ -381,7 +380,7 @@ public class TileEntityMachineMiningDrill extends TileEntityMachineBase implemen
ItemStack sta = in.extractResource(worldObj, x, y, z, meta, this);
if(hasSpace(sta)) {
if(sta != null && hasSpace(sta)) {
this.addItemToInventory(sta);
}

View File

@ -1841,6 +1841,7 @@ item.oil_detector.desc2=Detektor findet nur größere Vorkommen.
item.oil_detector.bullseye=Ölvorkommen direkt untertage!
item.oil_detector.detected=Ölvorkommen in der Nähe!
item.oil_detector.noOil=Kein Öl gefunden.
item.oil_tar.name=Ölteer
item.overfuse.name=Singularitätsschraubenzieher
item.oxy_mask.name=Sauerstoffmaske
item.paa_boots.name=PaA-"olle Latschen"

View File

@ -1910,6 +1910,7 @@ item.oil_detector.desc2=Detector will only find larger deposits.
item.oil_detector.bullseye=Oil deposit directly below!
item.oil_detector.detected=Oil detected nearby.
item.oil_detector.noOil=No oil detected.
item.oil_tar.name=Oil Tar
item.overfuse.name=Singularity Screwdriver
item.oxy_mask.name=Oxygen Mask
item.paa_boots.name=PaA "good ol' shoes"

Binary file not shown.

After

Width:  |  Height:  |  Size: 286 B