Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

coolboy4531

Members
  • Posts

    584
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Personal Text
    .

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

coolboy4531's Achievements

Dragon Slayer

Dragon Slayer (6/8)

66

Reputation

  1. Here you go. Fixed it for you. [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6 13:39:18.274 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] C:\Users\Angus\Java\MCreator\forge\build\tmp\recompileMc\sources\net\minecraftforge\client\model\ModelDynBucket.java:126: error: unmappable character for encoding utf-8 13:39:18.274 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] // if the fluid is a gas wi manipulate the initial state to be rotated 180X to turn it upside down 13:39:18.306 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] ^ 13:39:18.321 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] C:\Users\Angus\Java\MCreator\forge\build\tmp\recompileMc\sources\net\minecraftforge\client\model\ModelDynBucket.java:126: error: unmappable character for encoding utf-8 13:39:18.337 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] // if the fluid is a gas wi manipulate the initial state to be rotated 180X to turn it upside down 13:39:18.337 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] ^ 13:39:18.633 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] C:\Users\Angus\Java\MCreator\forge\build\tmp\recompileMc\sources\net\minecraftforge\fml\client\FMLClientHandler.java:779: error: unmappable character for encoding utf-8 13:39:18.633 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] moddedClientAllowed = !serverDescription.endsWith(":NOFMLr"); 13:39:18.633 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] ^ 13:39:18.649 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] C:\Users\Angus\Java\MCreator\forge\build\tmp\recompileMc\sources\net\minecraftforge\fml\client\FMLClientHandler.java:779: error: unmappable character for encoding utf-8 13:39:18.649 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] moddedClientAllowed = !serverDescription.endsWith(":NOFMLr"); 13:39:18.664 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] ^ 13:39:18.664 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] C:\Users\Angus\Java\MCreator\forge\build\tmp\recompileMc\sources\net\minecraftforge\fml\client\FMLClientHandler.java:779: error: unmappable character for encoding utf-8 13:39:18.664 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] moddedClientAllowed = !serverDescription.endsWith(":NOFMLr"); 13:39:18.680 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] ^ 13:39:18.680 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] C:\Users\Angus\Java\MCreator\forge\build\tmp\recompileMc\sources\net\minecraftforge\fml\client\FMLClientHandler.java:779: error: unmappable character for encoding utf-8 13:39:18.680 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] moddedClientAllowed = !serverDescription.endsWith(":NOFMLr"); 13:39:18.696 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] ^ 13:39:18.696 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] C:\Users\Angus\Java\MCreator\forge\build\tmp\recompileMc\sources\net\minecraftforge\fml\client\FMLClientHandler.java:840: error: unmappable character for encoding utf-8 13:39:18.711 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] return description.endsWith(":NOFMLr") ? description.substring(0, description.length() - +"r" : description; 13:39:18.711 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] ^ 13:39:18.727 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] C:\Users\Angus\Java\MCreator\forge\build\tmp\recompileMc\sources\net\minecraftforge\fml\client\FMLClientHandler.java:840: error: unmappable character for encoding utf-8 13:39:18.727 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] return description.endsWith(":NOFMLr") ? description.substring(0, description.length() - +"r" : description; 13:39:18.742 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] ^ 13:39:18.742 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] C:\Users\Angus\Java\MCreator\forge\build\tmp\recompileMc\sources\net\minecraftforge\fml\client\FMLClientHandler.java:840: error: unmappable character for encoding utf-8 13:39:18.742 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] return description.endsWith(":NOFMLr") ? description.substring(0, description.length() - +"r" : description; 13:39:18.758 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] ^ 13:39:18.758 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] C:\Users\Angus\Java\MCreator\forge\build\tmp\recompileMc\sources\net\minecraftforge\fml\client\FMLClientHandler.java:840: error: unmappable character for encoding utf-8 13:39:18.758 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] return description.endsWith(":NOFMLr") ? description.substring(0, description.length() - +"r" : description; 13:39:18.774 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] ^ 13:39:18.774 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] C:\Users\Angus\Java\MCreator\forge\build\tmp\recompileMc\sources\net\minecraftforge\fml\client\FMLClientHandler.java:840: error: unmappable character for encoding utf-8 13:39:18.789 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] return description.endsWith(":NOFMLr") ? description.substring(0, description.length() - +"r" : description; 13:39:18.789 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] ^ 13:39:18.805 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] C:\Users\Angus\Java\MCreator\forge\build\tmp\recompileMc\sources\net\minecraftforge\fml\client\FMLClientHandler.java:840: error: unmappable character for encoding utf-8 13:39:18.805 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] return description.endsWith(":NOFMLr") ? description.substring(0, description.length() - +"r" : description; 13:39:18.805 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] ^ 13:39:18.820 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] C:\Users\Angus\Java\MCreator\forge\build\tmp\recompileMc\sources\net\minecraftforge\fml\client\FMLClientHandler.java:840: error: unmappable character for encoding utf-8 13:39:18.820 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] return description.endsWith(":NOFMLr") ? description.substring(0, description.length() - +"r" : description; 13:39:18.836 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] ^ 13:39:18.836 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] C:\Users\Angus\Java\MCreator\forge\build\tmp\recompileMc\sources\net\minecraftforge\fml\client\FMLClientHandler.java:840: error: unmappable character for encoding utf-8 13:39:18.852 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] return description.endsWith(":NOFMLr") ? description.substring(0, description.length() - +"r" : description; 13:39:18.852 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] ^ 13:39:19.086 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] C:\Users\Angus\Java\MCreator\forge\build\tmp\recompileMc\sources\net\minecraftforge\fml\common\versioning\ComparableVersion.java:59: error: unmappable character for encoding utf-8 13:39:19.086 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] * @author <a href="mailto:hboutemy@apache.org">Hervm Boutemy</a> 13:39:19.101 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] ^ 13:39:19.101 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] C:\Users\Angus\Java\MCreator\forge\build\tmp\recompileMc\sources\net\minecraftforge\fml\common\versioning\ComparableVersion.java:59: error: unmappable character for encoding utf-8 13:39:19.101 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] * @author <a href="mailto:hboutemy@apache.org">Hervm Boutemy</a> 13:39:19.117 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] ^ 13:39:19.179 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] 16 errors 13:39:19.179 !! [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:javac] 1 warning 13:39:19.195 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':recompileMc' 13:39:19.195 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :recompileMc FAILED 13:39:19.195 [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :recompileMc (Thread[main,5,main]) completed. Took 28.049 secs. 13:39:19.210 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[main,5,main]] finished, busy: 45.005 secs, idle: 0.157 secs 13:39:19.210 [ERROR] [org.gradle.BuildExceptionReporter] 13:39:19.226 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception. 13:39:19.226 [ERROR] [org.gradle.BuildExceptionReporter] 13:39:19.226 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong: 13:39:19.242 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':recompileMc'. 13:39:19.242 [ERROR] [org.gradle.BuildExceptionReporter] > Compile failed; see the compiler error output for details. 13:39:19.242 [ERROR] [org.gradle.BuildExceptionReporter] 13:39:19.257 [ERROR] [org.gradle.BuildExceptionReporter] * Try: 13:39:19.257 [ERROR] [org.gradle.BuildExceptionReporter] Run with --stacktrace option to get the stack trace. 13:39:19.257 [LIFECYCLE] [org.gradle.BuildResultLogger] 13:39:19.273 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED Not sure how to fix it for you, but hopefully others can help you.
  2. Alright, thanks. Do you have any basic guidelines w/ the new system?
  3. Yeah. Where would I start with replacement; there are so many methods missing from 1.7/1.8.
  4. ASM is no longer supported--I was forced to use this in previous MC versions. I'm trying to increase the enchantment level cap on all the vanilla enchantments. Is there a work around to this? Do I need to create new custom enchantments with a different level cap? If possible, how do I apply these "custom enchantments" with the vanilla Enchantment table? Thanks
  5. Back in 1.7.10, I was told that ASM had to be used--I'm not sure if I still need to use it though. I'm trying to change the enchantment level cap. Is there an alternative way other than ASM?
  6. Are coremods something that isn't supported anymore, obviously because it's bad. If I wanted to use ASM to edit a base class--would that still be possible? Thanks guys.
  7. I can't build my gradle workspace because of this error. Here is my --info log: * Exception is: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':recompileMc'. at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46) at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35) at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:66) at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58) at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52) at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53) at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185) at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66) at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110) at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37) at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23) at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43) at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30) at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:153) at org.gradle.internal.Factories$1.create(Factories.java:22) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:53) at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:150) at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32) at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:98) at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:92) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:63) at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:92) at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:83) at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:99) at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28) at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:48) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:30) at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:81) at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:46) at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:51) at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:28) at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43) at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:173) at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:239) at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:212) at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35) at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22) at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:205) at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169) at org.gradle.launcher.Main.doAction(Main.java:33) at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45) at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:55) at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:36) at org.gradle.launcher.GradleMain.main(GradleMain.java:23) at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30) at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61) Caused by: : Compile failed; see the compiler error output for details. at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1181) at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:936) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.gradle.api.internal.project.ant.BasicAntBuilder.nodeCompleted(BasicAntBuilder.java:78) at org.gradle.api.internal.project.ant.BasicAntBuilder.doInvokeMethod(BasicAntBuilder.java:103) at net.minecraftforge.gradle.user.TaskRecompileMc.doStuff(TaskRecompileMc.java:85) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:228) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:221) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210) at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:621) at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:604) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61) ... 60 more I am using ForgeGradle 2.2. --------------------------------------------- [sOLUTION] Fixed itself after deleting "~/.gradle/caches/minecraft/de/" files. With ~ being your HOME directory -- e.g. C:/Users/USERNAME. Setting Environment Settings of JAVA_HOME to your JDK ---- it's usually C:\Program Files\Java\jdk1.xxx Updating Java to 8, JRE to 1.8, and JDK to 1.8.
  8. For some strange reason, the mod won't run outside of Eclipse environment. It doesn't initialize and the mod won't run. Code: FMLLoadingPlugin package com.sec; import java.util.Map; import cpw.mods.fml.common.Mod; import cpw.mods.fml.relauncher.IFMLLoadingPlugin; import cpw.mods.fml.relauncher.IFMLLoadingPlugin.MCVersion; @MCVersion(value = "1.7.10") public class SEFMLLoadingPlugin implements IFMLLoadingPlugin { @Override public String[] getASMTransformerClass() { return new String[]{ SEClassTransformer.class.getName() }; } @Override public String getModContainerClass() { return SEContainer.class.getName(); } @Override public String getSetupClass() { return null; } @Override public void injectData(Map<String, Object> data) { } @Override public String getAccessTransformerClass() { return null; } } Container package com.sec; import java.util.Arrays; import com.google.common.eventbus.EventBus; import com.google.common.eventbus.Subscribe; import cpw.mods.fml.common.DummyModContainer; import cpw.mods.fml.common.LoadController; import cpw.mods.fml.common.ModMetadata; import cpw.mods.fml.common.event.FMLConstructionEvent; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; public class SEContainer extends DummyModContainer { public SEContainer() { super(new ModMetadata()); ModMetadata meta = getMetadata(); meta.modId = "se"; meta.name = "EnchantmentCapIncreaser"; meta.version = "0.1"; meta.credits = ""; meta.authorList = Arrays.asList("coolboy4531"); meta.description = "Modifies vanilla enchantments to have a higher enchantment cap."; meta.url = ""; meta.updateUrl = ""; meta.screenshots = new String[0]; meta.logoFile = ""; } @Override public boolean registerBus(EventBus bus, LoadController controller) { bus.register(this); return true; } @Subscribe public void modConstruction(FMLConstructionEvent e) { } @Subscribe public void preInit(FMLPreInitializationEvent e) { } @Subscribe public void init(FMLInitializationEvent e) { } @Subscribe public void postInit(FMLPostInitializationEvent e) { } } ClassTransformer: package com.sec; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.Iterator; import net.minecraft.launchwrapper.IClassTransformer; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentArrowDamage; import org.objectweb.asm.ClassReader; import org.objectweb.asm.ClassWriter; import org.objectweb.asm.tree.AbstractInsnNode; import org.objectweb.asm.tree.ClassNode; import org.objectweb.asm.tree.InsnNode; import org.objectweb.asm.tree.IntInsnNode; import org.objectweb.asm.tree.MethodNode; public class SEClassTransformer implements IClassTransformer { private static final HashMap<Integer, Integer> intCodes = new HashMap(); private static ArrayList<String> unobfList = new ArrayList(Arrays.asList(new String[] { "net.minecraft.enchantment.EnchantmentArrowDamage", "net.minecraft.enchantment.EnchantmentArrowFire", "net.minecraft.enchantment.EnchantmentArrowInfinite", "net.minecraft.enchantment.EnchantmentArrowKnockback", "net.minecraft.enchantment.EnchantmentDamage", "net.minecraft.enchantment.EnchantmentDurability", "net.minecraft.enchantment.EnchantmentDigging", "net.minecraft.enchantment.EnchantmentFireAspect", "net.minecraft.enchantment.EnchantmentKnockback", "net.minecraft.enchantment.EnchantmentLootBonus", "net.minecraft.enchantment.EnchantmentOxygen", "net.minecraft.enchantment.EnchantmentProtection", "net.minecraft.enchantment.EnchantmentThorns", "net.minecraft.enchantment.EnchantmentUntouching", "net.minecraft.enchantment.EnchantmentWaterWorker" })); private static int[] vanillaLevels = { 5, 1, 1, 2, 5, 3, 5, 2, 2, 3, 3, 4, 3, 1, 1 }; private static int[] seLevels = { 10, 1, 1, 5, 10, 5, 10, 5, 5, 5, 3, 10, 5, 1, 1 }; public byte[] transform(String classname, String arg1, byte[] bytearray) { int e_index = 0; if (unobfList.contains(arg1)) { e_index = unobfList.indexOf(classname); System.out.println("Ready to transform: " + classname); return patchClassASM(classname, bytearray, false, e_index); } return bytearray; } public byte[] patchClassASM(String name, byte[] b, boolean obf, int e_index) { String methodName = ""; if (obf == true) methodName = "b"; else methodName = "getMaxLevel"; ClassNode cn = new ClassNode(); ClassReader cr = new ClassReader(b); cr.accept(cn, 0); Iterator methods = cn.methods.iterator(); while (methods.hasNext()) { MethodNode mn = (MethodNode)methods.next(); int fdiv_index = -1; if ((mn.name.equals(methodName)) && (mn.desc.equals("()I"))) { AbstractInsnNode newinst; AbstractInsnNode currentNode = null; AbstractInsnNode targetNode = null; Iterator it = mn.instructions.iterator(); int index = -1; while (it.hasNext()) { index++; currentNode = (AbstractInsnNode)it.next(); if (currentNode.getOpcode() != ((Integer)intCodes.get(Integer.valueOf(vanillaLevels[e_index]))).intValue()) continue; System.out.println("Bytecode verified [" + currentNode.getOpcode() + "]"); targetNode = currentNode; fdiv_index = index; } if (targetNode == null) { return b; } if (fdiv_index == -1) { return b; } AbstractInsnNode ourNode = mn.instructions.get(fdiv_index); if (vanillaLevels[e_index] == seLevels[e_index]) break; System.out.println("Changing enchantment level cap."); if (seLevels[e_index] > 5) newinst = new IntInsnNode(((Integer)intCodes.get(Integer.valueOf(seLevels[e_index]))).intValue(), seLevels[e_index]); else newinst = new InsnNode(((Integer)intCodes.get(Integer.valueOf(seLevels[e_index]))).intValue()); mn.instructions.set(ourNode, newinst); System.out.println("Finished patching successfully."); break; } } ClassWriter writer = new ClassWriter(3); cn.accept(writer); return writer.toByteArray(); } static { intCodes.put(Integer.valueOf(1), Integer.valueOf(4)); intCodes.put(Integer.valueOf(2), Integer.valueOf(5)); intCodes.put(Integer.valueOf(3), Integer.valueOf(6)); intCodes.put(Integer.valueOf(4), Integer.valueOf(7)); intCodes.put(Integer.valueOf(5), Integer.valueOf(); intCodes.put(Integer.valueOf(10), Integer.valueOf(16)); } }
  9. Which would would be better if I were to change the enchantment level caps on all enchantments? Such as Protection 5 to Protection (insert number). Would Reflection be a solid choice and would that work? Or am I forced to use ASM? Also, where do I find the location of obfuscated field names/class names such as it used to be fields.csv (a long time ago) and notch-mcp.srg (dunno where I last saw this)?
  10. Yes. You need to create an ItemBlock. Not sure if this is outdated or not, but back then I used this: When you register your block: GameRegistry.registerBlock(randomBlock, RandomItemBlock.class, "randomBlock"); For the ItemBlock just create a class (as an example I used RandomItemBlock.class) - make it extend ItemBlock, then do the regular methods as it is just like an Item now which you can use addInformation and other Item methods.
  11. That is quite off-topic. But, whatever, maybe you should browser around more often. http://www.minecraftforge.net/forum/index.php/topic,15345.0.html
  12. I'm pretty sure it is being fired twice on the server.
  13. If I remember, you need to include a targetTask. Example: this.targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 16F, 0, true));
  14. All Forge Wiki Tutorials are pretty self-explanatory and easy to follow. Use ones such as the one RafaelVN suggested. Good luck c:
  15. I'm guessing it has something to do with this: [20:30:24] [server thread/INFO] [FML/]: The state engine was in incorrect state POSTINITIALIZATION and forced into state SERVER_STOPPED. Errors may have been discarded. Strangely, it said "Attempting connection with missing mods" at 20:30:23. xPP
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.