Jump to content
  • Home
  • Files
  • Docs
Status Updates
  • All Content

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • zombiekiller222

zombiekiller222

Members
 View Profile  See their activity
  • Content Count

    9
  • Joined

    October 14, 2012
  • Last visited

    March 27, 2019

Community Reputation

0 Neutral

About zombiekiller222

  • Rank
    Tree Puncher

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Recent Profile Visitors

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

  1. zombiekiller222

    Access protected variable?

    zombiekiller222 replied to zombiekiller222's topic in General Discussion

    Considering the Biome Decorator is a variable inside my SubClass, my only options to access it are presumably: [*]Using reflection: Slow and very hacky, and as you said, not needed. [*]Changing the Access Level: Breaks compatibility, and if FML hasn't done it, there is likely a reason not to. [*]Making my class in the minecraft.net.src package: Heavily discouraged amongst the forge community, might break compatibility and also makes it hard to keep track of classes. [*]Making my own WorldGenBase, BiomeDecorator (and plenty more) classes: Tedious, messy, and seems unnecessary. [*]Creating some kind of wrapper for BiomeDecorator (and some more) classes: Better option, it seems, but still tedious, messy and unnecessary. All of these seem like a "hack" and suboptimal (not to mention tedious). I must be missing something, because everyone talks about this "Access Transformer" or says that a hack is not needed (not only in this forum post, I did search before posting this).
    • October 27, 2012
    • 9 replies
  2. zombiekiller222

    Access protected variable?

    zombiekiller222 replied to zombiekiller222's topic in General Discussion

    It doesn't really help if I have no idea how to access it, or what it is If googling it doesn't bring some kind of answer, I doubt it's even what it's called.
    • October 26, 2012
    • 9 replies
  3. zombiekiller222

    Access protected variable?

    zombiekiller222 replied to zombiekiller222's topic in General Discussion

    Googling provides no information on this access transform.
    • October 26, 2012
    • 9 replies
  4. zombiekiller222

    Access protected variable?

    zombiekiller222 posted a topic in General Discussion

    I've made a custom biome, but I can't access many of the BiomeDecorator's functions, as they are protected. How can I get around this?
    • October 26, 2012
    • 9 replies
  5. zombiekiller222

    Generating a custom village?

    zombiekiller222 replied to zombiekiller222's topic in General Discussion

    The reason I have MapGenVillage is to get the default MC village to generate at my command before trying my own.
    • October 25, 2012
    • 6 replies
  6. zombiekiller222

    Generating a custom village?

    zombiekiller222 posted a topic in General Discussion

    I've copied all of the appropriate appropriate classes for Village, but unfortunately, I cannot even get the DEFAULT village to spawn. I understand there is a % chance, but in superflat after flying a long time I've yet to find one (with default MC structures disabled). Here is my code: package plantony.lotrcraft; import java.util.Random; import net.minecraft.src.IChunkProvider; import net.minecraft.src.MapGenVillage; import net.minecraft.src.World; import net.minecraft.src.WorldGenMinable; import cpw.mods.fml.common.IWorldGenerator; public class WorldGeneratorLotrCraft implements IWorldGenerator { MapGenVillage mapGenVillage = new MapGenVillage(1); public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { switch (world.provider.dimensionId) { case -1: generateNether(world, random, chunkX*16, chunkZ*16); case 0: generateSurface(world, random, chunkX*16, chunkZ*16); } } private void generateSurface(World world, Random random, int blockX, int blockZ) { //int Xcoord1 = blockX + random.nextInt(16); //int Ycoord1 = random.nextInt(80); //int Zcoord1 = blockZ + random.nextInt(16); mapGenVillage.generate(world.getChunkProvider(), world, blockX, blockZ, new byte[32768]); } private void generateNether(World world, Random random, int blockX, int blockZ) { } }
    • October 24, 2012
    • 6 replies
  7. zombiekiller222

    JAVA.LANG.NULLPOINTEREXCEPTION WHEN TRYING TO CREATE GUI

    zombiekiller222 replied to zombiekiller222's topic in Support & Bug Reports

    Yes, I do. I did some work and replaced some of mc's code, and now it works: //FMLCommonHandler.instance().showGuiScreen(handler.getClientGuiElement(modGuiId, player, world, x, y, z)); FMLCommonHandler.instance().showGuiScreen(new plantony.lotrcraft.common.GuiHandler().getClientGuiElement(modGuiId, player, world, x, y, z)); I don't want it to be like this in the long run (creates incompatibilities).
    • October 15, 2012
    • 3 replies
  8. zombiekiller222

    java.lang.NullPointerException when trying to create gui

    zombiekiller222 posted a topic in General Discussion

    Java throws a java.lang.NullPointerException when I try to use player.openGui(LotrCraft.Instance, 1, world, x, y, z); Doing a little stack-following I found it happens when this code is ran: FMLCommonHandler.instance().showGuiScreen(handler.getClientGuiElement(modGuiId, player, world, x, y, z)); So, presumably, my gui handler is returning null? Here is it's code: package mymod.common; import cpw.mods.fml.common.network.IGuiHandler; import net.minecraft.src.*; public class GuiHandler implements IGuiHandler { @Override public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { switch (ID) { case 1: return new ContainerSmelter(player.inventory, world, x, y, z); } return null; } @Override public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { switch (ID) { case 1: return new GuiSmelter(player.inventory, world, x, y, z); } return null; } } If you need the code for the container and gui, i'll post it.
    • October 14, 2012
  9. zombiekiller222

    JAVA.LANG.NULLPOINTEREXCEPTION WHEN TRYING TO CREATE GUI

    zombiekiller222 posted a topic in Support & Bug Reports

    Java throws a java.lang.NullPointerException when I try to use player.openGui(LotrCraft.Instance, 1, world, x, y, z); Doing a little stack-following I found it happens when this code is ran: FMLCommonHandler.instance().showGuiScreen(handler.getClientGuiElement(modGuiId, player, world, x, y, z)); So, presumably, my gui handler is returning null? Here is it's code: package mymod.common; import cpw.mods.fml.common.network.IGuiHandler; import net.minecraft.src.*; public class GuiHandler implements IGuiHandler { @Override public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { switch (ID) { case 1: return new ContainerSmelter(player.inventory, world, x, y, z); } return null; } @Override public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { switch (ID) { case 1: return new GuiSmelter(player.inventory, world, x, y, z); } return null; } } If you need the code for the container and gui, i'll post it.
    • October 14, 2012
    • 3 replies
  • All Activity
  • Home
  • zombiekiller222
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community