mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
more configs, fluid barrel hopper IO yeah
This commit is contained in:
parent
3e89c021b8
commit
1d4d0166d6
@ -95,13 +95,13 @@ public interface IEnergyConductor extends IEnergyConnector {
|
||||
}
|
||||
}*/
|
||||
|
||||
//extensive debugging has shown that bidirectional re-eval ic complete shit
|
||||
//extensive debugging has shown that bidirectional re-eval is complete shit
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a list of positions for the reeval process. In short - what positions should be considered as connected.
|
||||
* Creates a list of positions for the re-eval process. In short - what positions should be considered as connected.
|
||||
* Also used by pylons to quickly figure out what positions to connect to.
|
||||
* DEFAULT: Connects to all six neighboring blocks.
|
||||
* @return
|
||||
|
||||
@ -28,6 +28,8 @@ public class GeneralConfig {
|
||||
public static boolean enableReEval = true;
|
||||
public static boolean enableSilentCompStackErrors = true;
|
||||
public static boolean enableChunkyNEIHandler = true;
|
||||
public static boolean enableSkyboxes = true;
|
||||
public static boolean enableImpactWorldProvider = true;
|
||||
public static int hintPos = 0;
|
||||
|
||||
public static boolean enable528 = false;
|
||||
@ -79,9 +81,10 @@ public class GeneralConfig {
|
||||
enableCustomDashKeybind = config.get(CATEGORY_GENERAL, "1.26_enableCustomDashKeybind", false, "Enable custom dash keybind instead of shift").getBoolean(false);
|
||||
enableReEval = config.get(CATEGORY_GENERAL, "1.27_enableReEval", true, "Allows re-evaluating power networks on link remove instead of destroying and recreating").getBoolean(true);
|
||||
enableSilentCompStackErrors = config.get(CATEGORY_GENERAL, "1.28_enableSilentCompStackErrors", false, "Enabling this will disable log spam created by unregistered items in ComparableStack instances.").getBoolean(false);
|
||||
enableChunkyNEIHandler = config.get(CATEGORY_GENERAL, "1.29_enableChunkyNEIHandler", true, "If enabled, registers a NEI handler that will show the chosen item in a larger view.").getBoolean(true);
|
||||
|
||||
hintPos = CommonConfig.createConfigInt(config, CATEGORY_GENERAL, "1.29_hudOverlayPosition", "0: Top left\n1: Top right\n2: Center right\n3: Center Left", 0);
|
||||
enableChunkyNEIHandler = config.get(CATEGORY_GENERAL, "1.30_enableChunkyNEIHandler", true, "If enabled, registers a NEI handler that will show the chosen item in a larger view.").getBoolean(true);
|
||||
enableSkyboxes = config.get(CATEGORY_GENERAL, "1.31_enableSkyboxes", true, "If enabled, will try to use NTM's custom skyboxes.").getBoolean(true);
|
||||
enableImpactWorldProvider = config.get(CATEGORY_GENERAL, "1.32_enableImpactWorldProvider", true, "If enabled, registers custom world provider which modifies lighting and sky colors for post impact effects.").getBoolean(true);
|
||||
|
||||
final String CATEGORY_528 = CommonConfig.CATEGORY_528;
|
||||
|
||||
|
||||
@ -204,13 +204,6 @@ public class ItemGunBase extends Item implements IHoldableWeapon, IItemHUD {
|
||||
}
|
||||
|
||||
world.playSoundAtEntity(player, mainConfig.firingSound, 1.0F, mainConfig.firingPitch);
|
||||
|
||||
if(player.getDisplayName().equals("Vic4Games")) {
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
nbt.setString("type", "justTilt");
|
||||
nbt.setInteger("time", mainConfig.rateOfFire + 1);
|
||||
PacketDispatcher.wrapper.sendTo(new AuxParticlePacketNT(nbt, player.posX, player.posY, player.posZ), (EntityPlayerMP) player);
|
||||
}
|
||||
}
|
||||
|
||||
//unlike fire(), being called does not automatically imply success, some things may still have to be handled before spawning the projectile
|
||||
|
||||
@ -163,13 +163,6 @@ public void addInformation(ItemStack stack, EntityPlayer player, List list, bool
|
||||
}
|
||||
|
||||
world.playSoundAtEntity(player, mainConfig.firingSound, 1.0F, mainConfig.firingPitch);
|
||||
|
||||
if(player.getDisplayName().equals("Vic4Games")) {
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
nbt.setString("type", "justTilt");
|
||||
nbt.setInteger("time", mainConfig.rateOfFire + 1);
|
||||
PacketDispatcher.wrapper.sendTo(new AuxParticlePacketNT(nbt, player.posX, player.posY, player.posZ), (EntityPlayerMP) player);
|
||||
}
|
||||
}
|
||||
|
||||
protected void spawnProjectile(World world, EntityPlayer player, ItemStack stack, int config) {
|
||||
|
||||
@ -1422,15 +1422,9 @@ public class ClientProxy extends ServerProxy {
|
||||
|
||||
//single swing: HT 15, MHT 15
|
||||
//double swing: HT 60, MHT 50
|
||||
//vic's immersive swing: HT 100, MHT 50
|
||||
|
||||
if(player.getDisplayName().equals("Vic4Games")) {
|
||||
player.hurtTime = 100;
|
||||
player.maxHurtTime = 50;
|
||||
} else {
|
||||
player.hurtTime = 15;
|
||||
player.maxHurtTime = 15;
|
||||
}
|
||||
|
||||
player.hurtTime = 15;
|
||||
player.maxHurtTime = 15;
|
||||
player.attackedAtYaw = 0F;
|
||||
}
|
||||
|
||||
@ -1461,13 +1455,8 @@ public class ClientProxy extends ServerProxy {
|
||||
ParticleMukeCloud cloud = new ParticleMukeCloud(man, world, x, y, z, ix, iy + rand.nextGaussian() * 0.02, iz);
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect(cloud);
|
||||
}
|
||||
if(player.getDisplayName().equals("Vic4Games")) {
|
||||
player.hurtTime = 100;
|
||||
player.maxHurtTime = 50;
|
||||
} else {
|
||||
player.hurtTime = 15;
|
||||
player.maxHurtTime = 15;
|
||||
}
|
||||
player.hurtTime = 15;
|
||||
player.maxHurtTime = 15;
|
||||
player.attackedAtYaw = 0F;
|
||||
}
|
||||
|
||||
|
||||
@ -819,7 +819,7 @@ public class ModEventHandlerClient {
|
||||
@SubscribeEvent(priority = EventPriority.LOWEST)
|
||||
public void onClientTickLast(ClientTickEvent event) {
|
||||
|
||||
if(event.phase == Phase.START) {
|
||||
if(event.phase == Phase.START && GeneralConfig.enableSkyboxes) {
|
||||
|
||||
World world = Minecraft.getMinecraft().theWorld;
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.handler.ImpactWorldHandler;
|
||||
import com.hbm.saveddata.TomSaveData;
|
||||
import com.hbm.world.WorldProviderNTM;
|
||||
@ -123,8 +124,11 @@ public class ModEventHandlerImpact {
|
||||
|
||||
@SubscribeEvent(priority = EventPriority.LOWEST)
|
||||
public void onLoad(WorldEvent.Load event) {
|
||||
DimensionManager.unregisterProviderType(0);
|
||||
DimensionManager.registerProviderType(0, WorldProviderNTM.class, true);
|
||||
|
||||
if(GeneralConfig.enableImpactWorldProvider) {
|
||||
DimensionManager.unregisterProviderType(0);
|
||||
DimensionManager.registerProviderType(0, WorldProviderNTM.class, true);
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
|
||||
@ -6,6 +6,7 @@ import java.util.List;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidSource;
|
||||
import com.hbm.inventory.FluidContainerRegistry;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.trait.FT_Corrosive;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
@ -80,6 +81,30 @@ public class TileEntityBarrel extends TileEntityMachineBase implements IFluidAcc
|
||||
this.networkPack(data, 50);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack itemStack) {
|
||||
ItemStack full = FluidContainerRegistry.getFullContainer(itemStack, tank.getTankType());
|
||||
//if fillable and the fill being possible for this tank size
|
||||
if(i == 2 && full != null && FluidContainerRegistry.getFluidContent(full, tank.getTankType()) <= tank.getMaxFill())
|
||||
return true;
|
||||
int content = FluidContainerRegistry.getFluidContent(itemStack, tank.getTankType());
|
||||
//if content is above 0 but still within capacity
|
||||
if(i == 4 && content > 0 && content <= tank.getMaxFill())
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int i, ItemStack itemStack, int j) {
|
||||
return i == 3 || i == 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int p_94128_1_) {
|
||||
return new int[] {2, 3, 4, 5};
|
||||
}
|
||||
|
||||
public void checkFluidInteraction() {
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user