mirror of
https://github.com/GTNewHorizons/CraftTweaker.git
synced 2026-11-20 20:12:12 +00:00
- Fixed isOp function in 1.7.10
- Added ModOnly at some places - Fixed number casting rules
This commit is contained in:
1 parent
55c3630bf3
commit
fc8bf619e1
21 files changed
+40
-33
No files matched your search
@@ -15,7 +15,7 @@ buildscript {
|
||||
|
||||
apply plugin: 'forge'
|
||||
|
||||
version = "1.6.4-3.0.0"
|
||||
version = "1.6.4-3.0.3"
|
||||
//group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = project.projectDir.name
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ import net.minecraft.network.packet.Packet250CustomPayload;
|
||||
*
|
||||
* @author Stan Hebben
|
||||
*/
|
||||
@Mod(modid = MineTweakerMod.MODID, version = MineTweakerMod.MCVERSION + "-3.0.0")
|
||||
@Mod(modid = MineTweakerMod.MODID, version = MineTweakerMod.MCVERSION + "-3.0.3")
|
||||
@NetworkMod(clientSideRequired = true, serverSideRequired = true, channels = {MCPacketHandler.CHANNEL_SERVERSCRIPT, MCPacketHandler.CHANNEL_OPENBROWSER}, packetHandler = MCPacketHandler.class)
|
||||
public class MineTweakerMod {
|
||||
public static final String MODID = "MineTweaker3";
|
||||
|
||||
+2
-1
@@ -6,7 +6,7 @@
|
||||
|
||||
package minetweaker.mods.ic2.expand;
|
||||
|
||||
import minetweaker.MineTweakerAPI;
|
||||
import minetweaker.annotations.ModOnly;
|
||||
import minetweaker.api.item.IIngredient;
|
||||
import minetweaker.api.item.IItemCondition;
|
||||
import minetweaker.api.item.IItemStack;
|
||||
@@ -19,6 +19,7 @@ import stanhebben.zenscript.annotations.ZenMethod;
|
||||
* @author Stan
|
||||
*/
|
||||
@ZenExpansion("minetweaker.item.IIngredient")
|
||||
@ModOnly("IC2")
|
||||
public class IngredientExpansion {
|
||||
@ZenMethod
|
||||
public static IIngredient onlyIC2ChargeAtLeast(IIngredient ingredient, final int charge) {
|
||||
|
||||
@@ -27,23 +27,23 @@ import stanhebben.zenscript.annotations.ZenMethod;
|
||||
@ModOnly("IC2")
|
||||
public class Canner {
|
||||
@ZenMethod
|
||||
public static void addBottleRecipe(IIngredient container, IIngredient fill, IItemStack output) {
|
||||
public static void addBottleRecipe(IItemStack output, IIngredient container, IIngredient fill) {
|
||||
MineTweakerAPI.apply(new AddBottleIngredientAction(container, fill, output));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addBottleRecipe(IIngredient container, ILiquidStack liquid, IItemStack output) {
|
||||
MineTweakerAPI.logError("Not supported in this mod support version");
|
||||
public static void addBottleRecipe(IItemStack output, IIngredient container, ILiquidStack liquid) {
|
||||
MineTweakerAPI.logWarning("Cannot use liquid inputs in 1.6.4");
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addEnrichRecipe(ILiquidStack input, IIngredient additive, ILiquidStack output) {
|
||||
public static void addEnrichRecipe(ILiquidStack output, ILiquidStack input, IIngredient additive) {
|
||||
MineTweakerAPI.apply(new AddEnrichIngredientAction(input, additive, output));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addEnrichRecipe(ILiquidStack input, ILiquidStack additive, ILiquidStack output) {
|
||||
MineTweakerAPI.logError("Not supported in this mod support version");
|
||||
public static void addEnrichRecipe(ILiquidStack output, ILiquidStack input, ILiquidStack additive) {
|
||||
MineTweakerAPI.logWarning("Cannot use liquid inputs in 1.6.4");
|
||||
}
|
||||
|
||||
private static class AddBottleIngredientAction extends OneWayAction {
|
||||
|
||||
@@ -14,7 +14,6 @@ import minetweaker.api.item.IIngredient;
|
||||
import minetweaker.api.item.IItemStack;
|
||||
import minetweaker.api.minecraft.MineTweakerMC;
|
||||
import static minetweaker.api.minecraft.MineTweakerMC.getItemStack;
|
||||
import minetweaker.mods.ic2.IC2RecipeInput;
|
||||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ buildscript {
|
||||
|
||||
apply plugin: 'forge'
|
||||
minecraft{version = "1.7.10-10.13.0.1160"}
|
||||
version = "1.7.10-3.0.0"
|
||||
version = "1.7.10-3.0.3"
|
||||
archivesBaseName = project.projectDir.name
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -44,7 +44,7 @@ import net.minecraftforge.common.MinecraftForge;
|
||||
*
|
||||
* @author Stan Hebben
|
||||
*/
|
||||
@Mod(modid = MineTweakerMod.MODID, version = MineTweakerMod.MCVERSION + "-3.0.0")
|
||||
@Mod(modid = MineTweakerMod.MODID, version = MineTweakerMod.MCVERSION + "-3.0.3")
|
||||
public class MineTweakerMod {
|
||||
public static final String MODID = "MineTweaker3";
|
||||
public static final String MCVERSION = "1.7.10";
|
||||
|
||||
@@ -10,7 +10,6 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import minetweaker.IUndoableAction;
|
||||
import minetweaker.MineTweakerAPI;
|
||||
import minetweaker.MineTweakerImplementationAPI;
|
||||
import minetweaker.api.minecraft.MineTweakerMC;
|
||||
import minetweaker.api.player.IPlayer;
|
||||
import minetweaker.api.server.AbstractServer;
|
||||
@@ -54,7 +53,11 @@ public class MCServer extends AbstractServer {
|
||||
@Override
|
||||
public boolean isOp(IPlayer player) {
|
||||
UserListOps ops = MinecraftServer.getServer().getConfigurationManager().func_152603_m();
|
||||
return ops.func_152690_d() || ops.func_152700_a(player.getName()) != null;
|
||||
if (server.isDedicatedServer()) {
|
||||
return ops.func_152690_d() || ops.func_152700_a(player.getName()) != null;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private static IPlayer getPlayer(ICommandSender commandSender) {
|
||||
|
||||
+2
@@ -6,6 +6,7 @@
|
||||
|
||||
package minetweaker.mods.ic2.expand;
|
||||
|
||||
import minetweaker.annotations.ModOnly;
|
||||
import minetweaker.api.item.IIngredient;
|
||||
import minetweaker.api.item.IItemCondition;
|
||||
import minetweaker.api.item.IItemStack;
|
||||
@@ -18,6 +19,7 @@ import stanhebben.zenscript.annotations.ZenMethod;
|
||||
* @author Stan
|
||||
*/
|
||||
@ZenExpansion("minetweaker.item.IIngredient")
|
||||
@ModOnly("IC2")
|
||||
public class IngredientExpansion {
|
||||
@ZenMethod
|
||||
public static IIngredient onlyIC2ChargeAtLeast(IIngredient ingredient, final int charge) {
|
||||
|
||||
@@ -28,22 +28,22 @@ import stanhebben.zenscript.annotations.ZenMethod;
|
||||
@ModOnly("IC2")
|
||||
public class Canner {
|
||||
@ZenMethod
|
||||
public static void addBottleRecipe(IIngredient container, IIngredient fill, IItemStack output) {
|
||||
public static void addBottleRecipe(IItemStack output, IIngredient container, IIngredient fill) {
|
||||
MineTweakerAPI.apply(new AddBottleIngredientAction(container, fill, output));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addBottleRecipe(IIngredient container, ILiquidStack liquid, IItemStack output) {
|
||||
public static void addBottleRecipe(IItemStack output, IIngredient container, ILiquidStack liquid) {
|
||||
MineTweakerAPI.apply(new AddBottleLiquidAction(container, liquid, output));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addEnrichRecipe(ILiquidStack input, IIngredient additive, ILiquidStack output) {
|
||||
public static void addEnrichRecipe(ILiquidStack output, ILiquidStack input, IIngredient additive) {
|
||||
MineTweakerAPI.apply(new AddEnrichIngredientAction(input, additive, output));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addEnrichRecipe(ILiquidStack input, ILiquidStack additive, ILiquidStack output) {
|
||||
public static void addEnrichRecipe(ILiquidStack output, ILiquidStack input, ILiquidStack additive) {
|
||||
MineTweakerAPI.apply(new AddEnrichLiquidAction(input, additive, output));
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ buildscript {
|
||||
|
||||
apply plugin: 'forge'
|
||||
minecraft{version = "1.7.2-10.12.2.1121"}
|
||||
version = "1.7.2-3.0.0"
|
||||
version = "1.7.2-3.0.3"
|
||||
archivesBaseName = project.projectDir.name
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -44,7 +44,7 @@ import net.minecraftforge.common.MinecraftForge;
|
||||
*
|
||||
* @author Stan Hebben
|
||||
*/
|
||||
@Mod(modid = MineTweakerMod.MODID, version = MineTweakerMod.MCVERSION + "-3.0.0")
|
||||
@Mod(modid = MineTweakerMod.MODID, version = MineTweakerMod.MCVERSION + "-3.0.3")
|
||||
public class MineTweakerMod {
|
||||
public static final String MODID = "MineTweaker3";
|
||||
public static final String MCVERSION = "1.7.2";
|
||||
|
||||
+2
@@ -6,6 +6,7 @@
|
||||
|
||||
package minetweaker.mods.ic2.expand;
|
||||
|
||||
import minetweaker.annotations.ModOnly;
|
||||
import minetweaker.api.item.IIngredient;
|
||||
import minetweaker.api.item.IItemCondition;
|
||||
import minetweaker.api.item.IItemStack;
|
||||
@@ -18,6 +19,7 @@ import stanhebben.zenscript.annotations.ZenMethod;
|
||||
* @author Stan
|
||||
*/
|
||||
@ZenExpansion("minetweaker.item.IIngredient")
|
||||
@ModOnly("IC2")
|
||||
public class IngredientExpansion {
|
||||
@ZenMethod
|
||||
public static IIngredient onlyIC2ChargeAtLeast(IIngredient ingredient, final int charge) {
|
||||
|
||||
@@ -28,22 +28,22 @@ import stanhebben.zenscript.annotations.ZenMethod;
|
||||
@ModOnly("IC2")
|
||||
public class Canner {
|
||||
@ZenMethod
|
||||
public static void addBottleRecipe(IIngredient container, IIngredient fill, IItemStack output) {
|
||||
public static void addBottleRecipe(IItemStack output, IIngredient container, IIngredient fill) {
|
||||
MineTweakerAPI.apply(new AddBottleIngredientAction(container, fill, output));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addBottleRecipe(IIngredient container, ILiquidStack liquid, IItemStack output) {
|
||||
public static void addBottleRecipe(IItemStack output, IIngredient container, ILiquidStack liquid) {
|
||||
MineTweakerAPI.apply(new AddBottleLiquidAction(container, liquid, output));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addEnrichRecipe(ILiquidStack input, IIngredient additive, ILiquidStack output) {
|
||||
public static void addEnrichRecipe(ILiquidStack output, ILiquidStack input, IIngredient additive) {
|
||||
MineTweakerAPI.apply(new AddEnrichIngredientAction(input, additive, output));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
public static void addEnrichRecipe(ILiquidStack input, ILiquidStack additive, ILiquidStack output) {
|
||||
public static void addEnrichRecipe(ILiquidStack output, ILiquidStack input, ILiquidStack additive) {
|
||||
MineTweakerAPI.apply(new AddEnrichLiquidAction(input, additive, output));
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ public class ZenTypeByte extends ZenType {
|
||||
@Override
|
||||
public boolean canCastImplicit(ZenType type, IEnvironmentGlobal environment) {
|
||||
int itype = type.getNumberType();
|
||||
return itype == NUM_BYTE
|
||||
return itype != 0
|
||||
|| type == STRING
|
||||
|| canCastExpansion(environment, type);
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ public class ZenTypeDouble extends ZenType {
|
||||
|
||||
@Override
|
||||
public boolean canCastImplicit(ZenType type, IEnvironmentGlobal environment) {
|
||||
return (type.getNumberType() != 0 && type.getNumberType() <= NUM_DOUBLE)
|
||||
return (type.getNumberType() != 0 && type.getNumberType() == NUM_DOUBLE)
|
||||
|| type == STRING
|
||||
|| canCastExpansion(environment, type);
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ public class ZenTypeFloat extends ZenType {
|
||||
|
||||
@Override
|
||||
public boolean canCastImplicit(ZenType type, IEnvironmentGlobal environment) {
|
||||
return (type.getNumberType() != 0 && type.getNumberType() <= NUM_FLOAT)
|
||||
return (type.getNumberType() != 0 && type.getNumberType() >= NUM_FLOAT)
|
||||
|| type == ZenTypeString.INSTANCE
|
||||
|| canCastExpansion(environment, type);
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ public class ZenTypeInt extends ZenType {
|
||||
|
||||
@Override
|
||||
public boolean canCastImplicit(ZenType type, IEnvironmentGlobal environment) {
|
||||
return (type.getNumberType() != 0 && type.getNumberType() <= NUM_INT)
|
||||
return (type.getNumberType() != 0 && type.getNumberType() >= NUM_INT)
|
||||
|| type == ZenTypeString.INSTANCE
|
||||
|| canCastExpansion(environment, type);
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ public class ZenTypeLong extends ZenType {
|
||||
|
||||
@Override
|
||||
public boolean canCastImplicit(ZenType type, IEnvironmentGlobal environment) {
|
||||
return (type.getNumberType() != 0 && type.getNumberType() <= NUM_LONG)
|
||||
return (type.getNumberType() != 0 && type.getNumberType() >= NUM_LONG)
|
||||
|| type == ZenTypeString.INSTANCE
|
||||
|| canCastExpansion(environment, type);
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ public class ZenTypeShort extends ZenType {
|
||||
|
||||
@Override
|
||||
public boolean canCastImplicit(ZenType type, IEnvironmentGlobal environment) {
|
||||
return (type.getNumberType() != 0 && type.getNumberType() <= NUM_SHORT)
|
||||
return (type.getNumberType() != 0 && type.getNumberType() >= NUM_SHORT)
|
||||
|| type == ZenTypeString.INSTANCE
|
||||
|| canCastExpansion(environment, type);
|
||||
}
|
||||
|
||||
+3
-3
@@ -29,13 +29,13 @@ task assembleMC1710(type: Jar, dependsOn: [\
|
||||
':ZenScript:build',
|
||||
':MineTweaker3-API:build',
|
||||
':MineTweaker3-MC1710-Main:build',
|
||||
':MineTweaker3-MC1710-Mod-IC2:build'/*,
|
||||
':MineTweaker3-MC1710-Mod-NEI:build'*/]) {
|
||||
':MineTweaker3-MC1710-Mod-IC2:build',
|
||||
':MineTweaker3-MC1710-Mod-NEI:build']) {
|
||||
from zipTree(project(":ZenScript").jar.archivePath)
|
||||
from zipTree(project(':MineTweaker3-API').jar.archivePath)
|
||||
from zipTree(project(':MineTweaker3-MC1710-Main').jar.archivePath)
|
||||
from zipTree(project(':MineTweaker3-MC1710-Mod-IC2').jar.archivePath)
|
||||
/* from zipTree(project(':MineTweaker3-MC1710-Mod-NEI').jar.archivePath)*/
|
||||
from zipTree(project(':MineTweaker3-MC1710-Mod-NEI').jar.archivePath)
|
||||
}
|
||||
|
||||
task assembleMC172(type: Jar, dependsOn: [\
|
||||
|
||||
Reference in new issue
Block a user