Everything posted by 61352151511
-
[1.8] How do configuration files work??
Don't base it off of the config button in the main menu, that involves other classes to get that to appear, check your config folder and it should have a file for your configuration.
-
[1.7.10]No OpenGL context found in current thread?
Back tracing the code it leads to the ItemPickupEvent getting called from EntityItem/onCollideWithPlayer public void onCollideWithPlayer(EntityPlayer entityIn) { if (!this.worldObj.isRemote) { if (this.delayBeforeCanPickup > 0) return; ItemStack itemstack = this.getEntityItem(); int i = itemstack.stackSize; int hook = net.minecraftforge.event.ForgeEventFactory.onItemPickup(this, entityIn, itemstack); Which only gets called if it's on the server side apparently.
-
[1.7.10]No OpenGL context found in current thread?
public void notifyPickup(ItemPickupEvent event) { Minecraft mc = Minecraft.getMinecraft(); if (event.player.worldObj.isRemote) { Edit: Forgot worldObj
-
[solved][1.7.2] Using missing texture - unable to load
I don't use Intellij but I see a lot of posts mentioning a fix for it
-
[1.8 - Solved] Help in making custom ItemSeeds drop in specific biomes
If you look more at the HarvestDropsEvent code it's public class BlockEvent extends Event { private static final boolean DEBUG = Boolean.parseBoolean(System.getProperty("forge.debugBlockEvent", "false")); public final World world; public final BlockPos pos; public final IBlockState state; public BlockEvent(World world, BlockPos pos, IBlockState state) { this.pos = pos; this.world = world; this.state = state; } // Comments public static class HarvestDropsEvent extends BlockEvent { public final int fortuneLevel; public final List<ItemStack> drops; public final boolean isSilkTouching; public float dropChance; // Change to e.g. 1.0f, if you manipulate the list and want to guarantee it always drops public final EntityPlayer harvester; // May be null for non-player harvesting such as explosions or machines public HarvestDropsEvent(World world, BlockPos pos, IBlockState state, int fortuneLevel, float dropChance, List<ItemStack> drops, EntityPlayer harvester, boolean isSilkTouching) { super(world, pos, state); this.fortuneLevel = fortuneLevel; this.dropChance = dropChance; this.drops = drops; this.isSilkTouching = isSilkTouching; this.harvester = harvester; } } It's extending BlockEvent, all BlockEvent's a state parameter which is an instance of IBlockState, IBlockState has a method getBlock. You can get the block this way.
-
build.properties help?
Added this to my build.gradle to try and help with automation, as gradle closes the running bat file upon finishing for some reason. I tried taking the "Read build.properties" thing from github.com/Vazkii/Botania yet it doesn't work. No idea what's wrong with it, something about the ConfigSlurper class not found. Any help is appreciated. [spoiler=gradle setupDecompWorkspace eclipse --stacktrace] C:\Users\Mitch\Central Storage\eclipseworkspace\Random Utilities 1.8>gradle setupDecompWorkspace FAILURE: Build failed with an exception. * Where: Build file 'C:\Users\Mitch\Central Storage\eclipseworkspace\Random Utilities 1.8\build.gradle' line: 84 * What went wrong: A problem occurred evaluating root project 'Random Utilities 1.8'. > [Ljava/util/HashMap$Entry; * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: 13.808 secs C:\Users\Mitch\Central Storage\eclipseworkspace\Random Utilities 1.8>gradle setupDecompWorkspace --stacktrace FAILURE: Build failed with an exception. * Where: Build file 'C:\Users\Mitch\Central Storage\eclipseworkspace\Random Utilities 1.8\build.gradle' line: 84 * What went wrong: A problem occurred evaluating root project 'Random Utilities 1.8'. > [Ljava/util/HashMap$Entry; * Try: Run with --info or --debug option to get more log output. * Exception is: org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'Random Utilities 1.8'. at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:54) at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:177) at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:38) at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:25) at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.evaluate(ConfigureActionsProjectEvaluator.java:34) at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:55) at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:507) at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:82) at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:31) at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:142) at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113) at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81) at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:64) at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33) at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:35) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26) at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50) at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171) at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201) at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174) at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170) at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22) at org.gradle.launcher.Main.doAction(Main.java:46) at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45) at org.gradle.launcher.Main.main(Main.java:37) at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50) at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32) at org.gradle.launcher.GradleMain.main(GradleMain.java:23) Caused by: java.lang.NoClassDefFoundError: [Ljava/util/HashMap$Entry; at build_5g0h7l23029l9ut7udrdkibf4s$_parseConfig_closure6.doCall(C:\Users\Mitch\Central Storage\eclipseworkspace\Random Utilities 1.8\build.gradle:84) at build_5g0h7l23029l9ut7udrdkibf4s.parseConfig(C:\Users\Mitch\Central Storage\eclipseworkspace\Random Utilities 1.8\build.gradle:81) at build_5g0h7l23029l9ut7udrdkibf4s$parseConfig.callCurrent(Unknown Source) at build_5g0h7l23029l9ut7udrdkibf4s.run(C:\Users\Mitch\Central Storage\eclipseworkspace\Random Utilities 1.8\build.gradle:25) at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:52) ... 30 more Caused by: java.lang.ClassNotFoundException: java.util.HashMap$Entry ... 35 more BUILD FAILED Total time: 13.27 secs C:\Users\Mitch\Central Storage\eclipseworkspace\Random Utilities 1.8> task relaunchBat(type: Exec) { workingDir './' commandLine 'cmd', '', 'SyncProperties.bat' standardOutput = new ByteArrayOutputStream() ext.output = { return standardOutput.toString() } } def parseConfig(File config) { config.withReader { def prop = new Properties() prop.load(it) return (new ConfigSlurper().parse(prop)) -- Line 84 } } defaultTasks 'relaunchBat'
-
Other players attempting to join my forge server get kicked automatically
No all he needs is forge on his client and the mods that are on the server, when he's viewing the server list there should be a green checkmark by your server, if he sees it as a red X he's got an incompatible mod or is missing one, perhaps ask him for logs that you can post here
-
The game doesn't run with non premium luanchers!!
It's not a bug, it's a feature, If you have the game use a premium launcher, install forge normally, install the mods normally, launch the game and it will work. As long as you use non-premium launcher you will get 0 support
-
Wrong Texture
Wow what a surprise! /sarcasm If you know how to code you'd know the way to fix this (the easy way) is to make the variables public and do Class.variable, import the class and boom you have access to the variable. Another way is GameRegistry.findItem
-
how to add a drop to a vanilla mob [1.7.10]
No... You have the @SubscribeEvent annotation, you now need you actually register the event, there are tutorials on how to do this, and I believe you need a proxy for it. MinecraftForge.EVENT_BUS.register(new YourEventClassName());
-
Wrong Texture
Init still I believe, as long as you do it after the item is registered in the GameRegistry
-
Wrong Texture
First off that code will crash on a dedicated server, do the getItemModelMesher().register's in the client proxy. Second the code looks fine, perhaps you put the wrong texture location in the LapisDust.json ?
-
how to add a drop to a vanilla mob [1.7.10]
No that won't work because you never registered your event handler, take a look at http://jabelarminecraft.blogspot.ca/p/minecraft-forge-172-event-handling.html to see how to do proxys and event registration.
-
MC Latest 1.8 Crashes Due To Mod Install?
That may be a mistake on the authors end, as the thread does say it requires minecraft forge. Since forge is only 1.8 and not 1.8.X I'd assume it's actually for 1.8, if not then the author really messed something up. @EwCake, the error is being called when they are trying to set the block hardness, not sure if something changed recently in forge but if you don't have 1341 you should get that, if you do, I have no idea the issue.
-
MC Latest 1.8 Crashes Due To Mod Install?
Issue with there mod it seems, report it to them.
-
[1.7.10] Custom Tree
Draco I really like that comparison of the IndexOutOfBoundsException, I'm assuming that's what you were doing. Basically you're trying to access the 1st item in the array, when there isn't a first item in the array (Arrays start at 0) So to fix this either make the array larger or lower the number being gotten from it.
-
World Won't Load
Then you probably never installed java 8, possibly you installed the JDK and not the JRE. You need at least java 6 to use the launcher, I'm not sure if you have to do anything else but install Java 8 Update X but that should be enough, just make sure it's the JRE.
-
Error running server
I'm aiming for a non-cauldron error log "server.jar:git-Cauldron-MCPC-Plus-1.7.10-1.1207.01.198" As the EAQ says do not ask for Cauldron support, this is for help with forge, not modified versions of it. As the forums for that are not accepting registrations I'm not sure if some people would help you but the downloads for cauldron were removed meaning they probably don't want it supported now. If you get issues with just forge and not cauldron, post them here.
-
[1.7.10] NBT Compound tags?
It appears Lore is a TagList itself, this is from taking a look at the vanilla code in ItemStack/getTooltip if (this.stackTagCompound.hasKey("display", 10)) { NBTTagCompound nbttagcompound = this.stackTagCompound.getCompoundTag("display"); if (nbttagcompound.hasKey("color", 3)) { if (p_82840_2_) { arraylist.add("Color: #" + Integer.toHexString(nbttagcompound.getInteger("color")).toUpperCase()); } else { arraylist.add(EnumChatFormatting.ITALIC + StatCollector.translateToLocal("item.dyed")); } } if (nbttagcompound.getTagId("Lore") == 9) { NBTTagList nbttaglist1 = nbttagcompound.getTagList("Lore", ; if (nbttaglist1.tagCount() > 0) { for (int j = 0; j < nbttaglist1.tagCount(); ++j) { arraylist.add(EnumChatFormatting.DARK_PURPLE + "" + EnumChatFormatting.ITALIC + nbttaglist1.getStringTagAt(j)); } } } }
-
NullPointerException: Rendering screen
If you're opening a GUI like that you have to do it on the client side, if your GUI is going to interact with the server, you will probably need to use packets to tell the server what to do.
-
Making an entity as a light source
Did you register the event?
-
Error running server
If it does it without cauldron post back with an error log, if this is cauldron specific you should post it on their issues.
-
NullPointerException: Rendering screen
Really? Change !world.isRemote to world.isRemote
-
NullPointerException: Rendering screen
if (!world.isRemote){ Block target = world.getBlock(x, y, z); Minecraft.getMinecraft().displayGuiScreen(new TestBlockGui(target,world,x,y,z)); } You're checking to see if it's on the server side, isRemote returns true for client and false for servers. Minecraft is a client only class.
-
NullPointerException: Rendering screen
"com.guje.test_mod.TestBlockGui.drawScreen(TestBlockGui.java:71)" Well that's the line your error is on, and something about it is null, feel like providing code so we can help you?
IPS spam blocked by CleanTalk.