mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-02-24 15:00:48 +00:00
scatman's world
This commit is contained in:
parent
0880287660
commit
79c7faf55b
@ -3,8 +3,12 @@
|
|||||||
* The new chemical plant can now be used to upgrade the meteorite sword
|
* The new chemical plant can now be used to upgrade the meteorite sword
|
||||||
* Fluid containers are now re-registered when using `/ntmreload` which should correctly generate fluid container items for freshly added custom fluids
|
* Fluid containers are now re-registered when using `/ntmreload` which should correctly generate fluid container items for freshly added custom fluids
|
||||||
* Recipe configs will no longer try to parse null value recipes, meaing that trailing commas in a recipe config will no longer create an error
|
* Recipe configs will no longer try to parse null value recipes, meaing that trailing commas in a recipe config will no longer create an error
|
||||||
|
* Refinery solid byproducts now build up substantially faster
|
||||||
|
* This means fracking solution from standard oil is now a lot more viable
|
||||||
|
* This also makes the volume of oil spent consistent with the NEI handler
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
* Fixed crash caused by breaking a tool while the fortune or silk touch ability is enabled
|
* Fixed crash caused by breaking a tool while the fortune or silk touch ability is enabled
|
||||||
* Fixed NTM adding mob spawns to the mushroom island
|
* Fixed NTM adding mob spawns to the mushroom island
|
||||||
# Fixed line break not working on the tip of the day
|
* Fixed line break not working on the tip of the day
|
||||||
|
* Fixed an issue where AoE abilities can break bedrock
|
||||||
@ -151,7 +151,7 @@ public class BlockVolcano extends BlockContainer implements ITooltipProvider, IB
|
|||||||
@Override
|
@Override
|
||||||
public void writeToNBT(NBTTagCompound nbt) {
|
public void writeToNBT(NBTTagCompound nbt) {
|
||||||
super.writeToNBT(nbt);
|
super.writeToNBT(nbt);
|
||||||
nbt.setInteger("tier", this.volcanoTimer);
|
nbt.setInteger("timer", this.volcanoTimer);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean shouldGrow() {
|
private boolean shouldGrow() {
|
||||||
|
|||||||
@ -39,6 +39,7 @@ public class GeneralConfig {
|
|||||||
public static boolean enableSoundExtension = true;
|
public static boolean enableSoundExtension = true;
|
||||||
public static boolean enableMekanismChanges = true;
|
public static boolean enableMekanismChanges = true;
|
||||||
public static boolean enableServerRecipeSync = false;
|
public static boolean enableServerRecipeSync = false;
|
||||||
|
public static boolean enableLoadScreenReplacement = true;
|
||||||
public static int normalSoundChannels = 200;
|
public static int normalSoundChannels = 200;
|
||||||
|
|
||||||
public static boolean enableExpensiveMode = false;
|
public static boolean enableExpensiveMode = false;
|
||||||
@ -120,6 +121,7 @@ public class GeneralConfig {
|
|||||||
"Note that a value below 28 or above 200 can cause buggy sounds and issues with other mods running out of sound memory.", 100);
|
"Note that a value below 28 or above 200 can cause buggy sounds and issues with other mods running out of sound memory.", 100);
|
||||||
preferredOutputMod = CommonConfig.createConfigStringList(config,CATEGORY_GENERAL,"1.42_preferredOutputMod",
|
preferredOutputMod = CommonConfig.createConfigStringList(config,CATEGORY_GENERAL,"1.42_preferredOutputMod",
|
||||||
"The mod which is preferred as output when certain machines autogenerate recipes. Currently used for the shredder", new String[] {RefStrings.MODID});
|
"The mod which is preferred as output when certain machines autogenerate recipes. Currently used for the shredder", new String[] {RefStrings.MODID});
|
||||||
|
enableLoadScreenReplacement = config.get(CATEGORY_GENERAL, "1.43_enableLoadScreenReplacement", true, "Tries to replace the vanilla load screen with the 'tip of the day' one, may clash with other mods trying to do the same.").getBoolean(true);
|
||||||
enableExpensiveMode = config.get(CATEGORY_GENERAL, "1.99_enableExpensiveMode", false, "It does what the name implies.").getBoolean(false);
|
enableExpensiveMode = config.get(CATEGORY_GENERAL, "1.99_enableExpensiveMode", false, "It does what the name implies.").getBoolean(false);
|
||||||
|
|
||||||
final String CATEGORY_528 = CommonConfig.CATEGORY_528;
|
final String CATEGORY_528 = CommonConfig.CATEGORY_528;
|
||||||
|
|||||||
@ -10,8 +10,7 @@ import com.hbm.inventory.fluid.trait.FluidTraitSimple.FT_Unsiphonable;
|
|||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.tool.ItemPipette;
|
import com.hbm.items.tool.ItemPipette;
|
||||||
|
|
||||||
import api.hbm.fluid.IFluidStandardReceiver;
|
import api.hbm.fluidmk2.IFluidStandardReceiverMK2;
|
||||||
import api.hbm.fluid.IFluidStandardTransceiver;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
@ -24,70 +23,74 @@ public class ItemFluidSiphon extends Item {
|
|||||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int i, float f0, float f1, float f2) {
|
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int i, float f0, float f1, float f2) {
|
||||||
TileEntity te = CompatExternal.getCoreFromPos(world, x, y, z);
|
TileEntity te = CompatExternal.getCoreFromPos(world, x, y, z);
|
||||||
|
|
||||||
if(te != null && (te instanceof IFluidStandardReceiver || te instanceof IFluidStandardTransceiver)) {
|
if(te != null && te instanceof IFluidStandardReceiverMK2) {
|
||||||
FluidTank[] tanks;
|
FluidTank[] tanks = ((IFluidStandardReceiverMK2) te).getReceivingTanks();
|
||||||
if (te instanceof IFluidStandardReceiver) {
|
|
||||||
tanks = ((IFluidStandardReceiver) te).getReceivingTanks();
|
|
||||||
} else {
|
|
||||||
tanks = ((IFluidStandardTransceiver) te).getReceivingTanks();
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean hasDrainedTank = false;
|
boolean hasDrainedTank = false;
|
||||||
|
|
||||||
// We need to iterate through the inventory for _each_ siphonable tank, so we can handle fluids that can only go into certain containers
|
// We need to iterate through the inventory for _each_ siphonable
|
||||||
// After we successfully siphon any fluid from a tank, we stop further processing, multiple fluid types require multiple clicks
|
// tank, so we can handle fluids that can only go into certain containers
|
||||||
for (FluidTank tank : tanks) {
|
// After we successfully siphon any fluid from a tank, we stop
|
||||||
if (tank.getFill() <= 0) continue;
|
// further processing, multiple fluid types require multiple clicks
|
||||||
|
for(FluidTank tank : tanks) {
|
||||||
|
if(tank.getFill() <= 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
ItemStack availablePipette = null;
|
ItemStack availablePipette = null;
|
||||||
FluidType tankType = tank.getTankType();
|
FluidType tankType = tank.getTankType();
|
||||||
|
|
||||||
if (tankType.hasTrait(FT_Unsiphonable.class)) continue;
|
if(tankType.hasTrait(FT_Unsiphonable.class))
|
||||||
|
continue;
|
||||||
|
|
||||||
for (int j = 0; j < player.inventory.mainInventory.length; j++) {
|
for(int j = 0; j < player.inventory.mainInventory.length; j++) {
|
||||||
ItemStack inventoryStack = player.inventory.mainInventory[j];
|
ItemStack inventoryStack = player.inventory.mainInventory[j];
|
||||||
if (inventoryStack == null) continue;
|
if(inventoryStack == null)
|
||||||
|
continue;
|
||||||
|
|
||||||
FluidContainer container = FluidContainerRegistry.getContainer(tankType, inventoryStack);
|
FluidContainer container = FluidContainerRegistry.getContainer(tankType, inventoryStack);
|
||||||
|
|
||||||
if (availablePipette == null && inventoryStack.getItem() instanceof ItemPipette) {
|
if(availablePipette == null && inventoryStack.getItem() instanceof ItemPipette) {
|
||||||
ItemPipette pipette = (ItemPipette) inventoryStack.getItem();
|
ItemPipette pipette = (ItemPipette) inventoryStack.getItem();
|
||||||
if (!pipette.willFizzle(tankType) && pipette != ModItems.pipette_laboratory) { // Ignoring laboratory pipettes for now
|
if(!pipette.willFizzle(tankType) && pipette != ModItems.pipette_laboratory) { // Ignoring laboratory pipettes for now
|
||||||
availablePipette = inventoryStack;
|
availablePipette = inventoryStack;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (container == null) continue;
|
if(container == null)
|
||||||
|
continue;
|
||||||
|
|
||||||
ItemStack full = FluidContainerRegistry.getFullContainer(inventoryStack, tankType);
|
ItemStack full = FluidContainerRegistry.getFullContainer(inventoryStack, tankType);
|
||||||
|
|
||||||
while (tank.getFill() >= container.content && inventoryStack.stackSize > 0) {
|
while(tank.getFill() >= container.content && inventoryStack.stackSize > 0) {
|
||||||
hasDrainedTank = true;
|
hasDrainedTank = true;
|
||||||
|
|
||||||
inventoryStack.stackSize--;
|
inventoryStack.stackSize--;
|
||||||
if (inventoryStack.stackSize <= 0) {
|
if(inventoryStack.stackSize <= 0) {
|
||||||
player.inventory.mainInventory[j] = null;
|
player.inventory.mainInventory[j] = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
ItemStack filledContainer = full.copy();
|
ItemStack filledContainer = full.copy();
|
||||||
tank.setFill(tank.getFill() - container.content);
|
tank.setFill(tank.getFill() - container.content);
|
||||||
player.inventory.addItemStackToInventory(filledContainer);
|
player.inventory.addItemStackToInventory(filledContainer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the remainder of the tank can only fit into a pipette, fill a pipette with the remainder
|
// If the remainder of the tank can only fit into a pipette,
|
||||||
// Will not auto-fill fizzlable pipettes, there is no feedback for the fizzle in this case, and that's a touch too unfair
|
// fill a pipette with the remainder
|
||||||
if (availablePipette != null && tank.getFill() < 1000) {
|
// Will not auto-fill fizzlable pipettes, there is no feedback
|
||||||
ItemPipette pipette = (ItemPipette) availablePipette.getItem();
|
// for the fizzle in this case, and that's a touch too unfair
|
||||||
|
if(availablePipette != null && tank.getFill() < 1000) {
|
||||||
|
ItemPipette pipette = (ItemPipette) availablePipette.getItem();
|
||||||
|
|
||||||
if (pipette.acceptsFluid(tankType, availablePipette)) {
|
if(pipette.acceptsFluid(tankType, availablePipette)) {
|
||||||
hasDrainedTank = true;
|
hasDrainedTank = true;
|
||||||
tank.setFill(pipette.tryFill(tankType, tank.getFill(), availablePipette));
|
tank.setFill(pipette.tryFill(tankType, tank.getFill(), availablePipette));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasDrainedTank) return true;
|
if(hasDrainedTank)
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@ -292,13 +292,10 @@ public class ItemToolAbility extends ItemTool implements IDepthRockTool, IGUIPro
|
|||||||
Block block = world.getBlock(x, y, z);
|
Block block = world.getBlock(x, y, z);
|
||||||
int meta = world.getBlockMetadata(x, y, z);
|
int meta = world.getBlockMetadata(x, y, z);
|
||||||
|
|
||||||
if(!(
|
if(!(canHarvestBlock(block, stack) ||
|
||||||
canHarvestBlock(block, stack) ||
|
canShearBlock(block, stack, world, x, y, z)) ||
|
||||||
canShearBlock(block, stack, world, x, y, z)) ||
|
(block.getBlockHardness(world, x, y, z) == -1.0F && block.getPlayerRelativeBlockHardness(player, world, x, y, z) == 0.0F) ||
|
||||||
block.getPlayerRelativeBlockHardness(player, world, x, y, z) < 0 ||
|
block == ModBlocks.stone_keyhole) return;
|
||||||
block == ModBlocks.stone_keyhole
|
|
||||||
)
|
|
||||||
return;
|
|
||||||
|
|
||||||
Block refBlock = world.getBlock(refX, refY, refZ);
|
Block refBlock = world.getBlock(refX, refY, refZ);
|
||||||
float refStrength = ForgeHooks.blockStrength(refBlock, player, world, refX, refY, refZ);
|
float refStrength = ForgeHooks.blockStrength(refBlock, player, world, refX, refY, refZ);
|
||||||
|
|||||||
@ -383,7 +383,6 @@ public class LegoClient {
|
|||||||
|
|
||||||
RenderArcFurnace.fullbright(true);
|
RenderArcFurnace.fullbright(true);
|
||||||
double age = MathHelper.clamp_double(1D - ((double) bullet.ticksExisted - 2 + interp) / (double) bullet.getBulletConfig().expires, 0, 1);
|
double age = MathHelper.clamp_double(1D - ((double) bullet.ticksExisted - 2 + interp) / (double) bullet.getBulletConfig().expires, 0, 1);
|
||||||
double col = MathHelper.clamp_double(1D - ((double) bullet.ticksExisted + interp) / (double) bullet.getBulletConfig().expires, 0, 1);
|
|
||||||
|
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
GL11.glRotatef(180 - bullet.rotationYaw, 0, 1F, 0);
|
GL11.glRotatef(180 - bullet.rotationYaw, 0, 1F, 0);
|
||||||
|
|||||||
@ -1030,14 +1030,19 @@ public class ModEventHandlerClient {
|
|||||||
|
|
||||||
public static boolean renderLodeStar = false;
|
public static boolean renderLodeStar = false;
|
||||||
public static long lastStarCheck = 0L;
|
public static long lastStarCheck = 0L;
|
||||||
|
public static long lastLoadScreenReplacement = 0L;
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@SubscribeEvent(priority = EventPriority.LOWEST)
|
@SubscribeEvent(priority = EventPriority.LOWEST)
|
||||||
public void onClientTickLast(ClientTickEvent event) {
|
public void onClientTickLast(ClientTickEvent event) {
|
||||||
|
|
||||||
Minecraft mc = Minecraft.getMinecraft();
|
Minecraft mc = Minecraft.getMinecraft();
|
||||||
if(!(mc.loadingScreen instanceof LoadingScreenRendererNT)) {
|
long millis = Clock.get_ms();
|
||||||
|
if(millis == 0) millis = System.currentTimeMillis();
|
||||||
|
|
||||||
|
if(GeneralConfig.enableLoadScreenReplacement && !(mc.loadingScreen instanceof LoadingScreenRendererNT) && millis > lastLoadScreenReplacement + 10_000) {
|
||||||
mc.loadingScreen = new LoadingScreenRendererNT(mc);
|
mc.loadingScreen = new LoadingScreenRendererNT(mc);
|
||||||
|
lastLoadScreenReplacement = millis;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(event.phase == Phase.START && GeneralConfig.enableSkyboxes) {
|
if(event.phase == Phase.START && GeneralConfig.enableSkyboxes) {
|
||||||
@ -1067,7 +1072,6 @@ public class ModEventHandlerClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
EntityPlayer player = mc.thePlayer;
|
EntityPlayer player = mc.thePlayer;
|
||||||
long millis = Clock.get_ms();
|
|
||||||
|
|
||||||
if(lastStarCheck + 200 < millis) {
|
if(lastStarCheck + 200 < millis) {
|
||||||
renderLodeStar = false;
|
renderLodeStar = false;
|
||||||
|
|||||||
@ -49,7 +49,7 @@ public class TileEntityMachineRefinery extends TileEntityMachineBase implements
|
|||||||
|
|
||||||
public long power = 0;
|
public long power = 0;
|
||||||
public int sulfur = 0;
|
public int sulfur = 0;
|
||||||
public static final int maxSulfur = 100;
|
public static final int maxSulfur = 10;
|
||||||
public static final long maxPower = 1000;
|
public static final long maxPower = 1000;
|
||||||
public FluidTank[] tanks;
|
public FluidTank[] tanks;
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
Loading…
x
Reference in New Issue
Block a user