mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
fix issues with artillery proxy OC compat
also fix a big sound system issue where other mods would run out of sound memory on the sound card if they loaded after NTM reserved 1000 CHANNELS
This commit is contained in:
parent
773db3c54c
commit
7022dcd1af
@ -36,6 +36,7 @@ public class GeneralConfig {
|
||||
public static boolean enableSteamParticles = true;
|
||||
public static boolean enableSoundExtension = true;
|
||||
public static boolean enableMekanismChanges = true;
|
||||
public static int normalSoundChannels = 100;
|
||||
public static int hintPos = 0;
|
||||
|
||||
public static boolean enableExpensiveMode = false;
|
||||
@ -105,6 +106,9 @@ public class GeneralConfig {
|
||||
enableSteamParticles = config.get(CATEGORY_GENERAL, "1.38_enableSteamParticles", true, "If disabled, auxiliary cooling towers and large cooling towers will not emit steam particles when in use.").getBoolean(true);
|
||||
enableSoundExtension = config.get(CATEGORY_GENERAL, "1.39_enableSoundExtension", true, "If enabled, will change the limit for how many sounds can play at once.").getBoolean(true);
|
||||
enableMekanismChanges = config.get(CATEGORY_GENERAL, "1.40_enableMekanismChanges", true, "If enabled, will change some of Mekanism's recipes.").getBoolean(true);
|
||||
normalSoundChannels = CommonConfig.createConfigInt(config, CATEGORY_GENERAL, "1.41_normalSoundChannels",
|
||||
"The amount of channels to create while 1.39_enableSoundExtension is enabled.\n" +
|
||||
"Note that a value below 28 or above 200 can cause buggy sounds and issues with other mods running out of sound memory.", 100);
|
||||
|
||||
enableExpensiveMode = config.get(CATEGORY_GENERAL, "1.99_enableExpensiveMode", false, "It does what the name implies.").getBoolean(false);
|
||||
|
||||
|
||||
@ -99,7 +99,7 @@ public class CompatHandler {
|
||||
player.addChatComponentMessage(new ChatComponentTranslation(info).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)));
|
||||
}
|
||||
TileEntity te = (TileEntity) this;
|
||||
if(Array.getLength(this.methods()) == 0 && te instanceof TileEntityProxyCombo || this.getComponentName().equals("ntm_null"))
|
||||
if((Array.getLength(this.methods()) == 0 && te instanceof TileEntityProxyCombo) || this.getComponentName().equals("ntm_null"))
|
||||
player.addChatComponentMessage(new ChatComponentTranslation("analyze.error").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED)));
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -152,7 +152,7 @@ public class ClientProxy extends ServerProxy {
|
||||
Jars.initJars();
|
||||
|
||||
if(GeneralConfig.enableSoundExtension) {
|
||||
SoundSystemConfig.setNumberNormalChannels(1000);
|
||||
SoundSystemConfig.setNumberNormalChannels(GeneralConfig.normalSoundChannels);
|
||||
SoundSystemConfig.setNumberStreamingChannels(50);
|
||||
}
|
||||
}
|
||||
|
||||
@ -548,8 +548,7 @@ public abstract class TileEntityLaunchPadBase extends TileEntityMachineBase impl
|
||||
return getTier(context, args);
|
||||
case ("launch"):
|
||||
return launch(context, args);
|
||||
}
|
||||
}
|
||||
throw new NoSuchMethodException();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -431,7 +431,12 @@ public class TileEntityBarrel extends TileEntityMachineBase implements IFluidAcc
|
||||
|
||||
@Override
|
||||
public String[] methods() {
|
||||
return new String[] {"getFluidStored", "getMaxStored", "getTypeStored", "getInfo"};
|
||||
return new String[] {
|
||||
"getFluidStored",
|
||||
"getMaxStored",
|
||||
"getTypeStored",
|
||||
"getInfo"
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -518,7 +518,11 @@ public class TileEntityMachineFluidTank extends TileEntityMachineBase implements
|
||||
|
||||
@Override
|
||||
public String[] methods() {
|
||||
return new String[] {"getFluidStored", "getMaxStored", "getTypeStored", "getInfo"};
|
||||
return new String[] {
|
||||
"getFluidStored",
|
||||
"getMaxStored",
|
||||
"getTypeStored",
|
||||
"getInfo"};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -477,4 +477,60 @@ public class TileEntityTurretArty extends TileEntityTurretBaseArtillery implemen
|
||||
targetQueue.add(Vec3.createVectorHelper(args.checkDouble(0), args.checkDouble(1), args.checkDouble(2)));
|
||||
return new Object[] {true};
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] methods() { // :vomit:
|
||||
return new String[] {
|
||||
"setActive",
|
||||
"isActive",
|
||||
"getEnergyInfo",
|
||||
"getWhitelisted",
|
||||
"addWhitelist",
|
||||
"removeWhitelist",
|
||||
"setTargeting",
|
||||
"getTargeting",
|
||||
"hasTarget",
|
||||
"getAngle",
|
||||
"isAligned",
|
||||
"getCurrentTarget",
|
||||
"getTargetDistance",
|
||||
"addCoords"
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] invoke(String method, Context context, Arguments args) throws Exception {
|
||||
switch (method) {
|
||||
case "setActive":
|
||||
return setActive(context, args);
|
||||
case "isActive":
|
||||
return isActive(context, args);
|
||||
case "getEnergyInfo":
|
||||
return getEnergyInfo(context, args);
|
||||
case "getWhitelisted":
|
||||
return getWhitelisted(context, args);
|
||||
case "addWhitelist":
|
||||
return addWhitelist(context, args);
|
||||
case "removeWhitelist":
|
||||
return removeWhitelist(context, args);
|
||||
case "setTargeting":
|
||||
return setTargeting(context, args);
|
||||
case "getTargeting":
|
||||
return getTargeting(context, args);
|
||||
case "hasTarget":
|
||||
return hasTarget(context, args);
|
||||
case "getAngle":
|
||||
return getAngle(context, args);
|
||||
case "isAligned":
|
||||
return isAligned(context, args);
|
||||
case "getCurrentTarget":
|
||||
return getCurrentTarget(context, args);
|
||||
case "getTargetDistance":
|
||||
return getTargetDistance(context, args);
|
||||
case "addCoords":
|
||||
return addCoords(context, args);
|
||||
}
|
||||
throw new NoSuchMethodException();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user