Jump to content

Draco18s

Members
  • Posts

    16559
  • Joined

  • Last visited

  • Days Won

    156

Everything posted by Draco18s

  1. ASM or Reflections.
  2. Did you finally name your variable something other than the same name as your class? And start referencing that variable properly?
  3. Q: Are you getting the error client side or server side?
  4. Save the block ID. Block.blocksList[nbt.getInteger("thatThingIWantToUse")].getBlockTextureFromSide(0)
  5. Eval() is evil. Do not use.
  6. Maybe. We don't have enough information to help you, as from the code supplied and the description given, we do not know where you've stored the NBT tag or if that object is available at that point.
  7. Do consider mods like Mystcraft which can created extra dimensions using any biome (including Sky and Hell). If you're doing something like Nether Ore generation, your ores should generate in these dimensions. Especially as some users wish to create "Nether Analogs" for their Ages.
  8. Yeeaahh....start with something simpler.
  9. Yes. Write your own chunk provider.
  10. You want the results to be different (and random) and stack? These two statements do not go together.
  11. Send a PM to Veovis. He's the one who figured it out and has a working codebase.
  12. Sorry, it should be world.getBlockId(x,y,z) But if you can't use your javadoc and Eclipse codehinting properly I'm not going to help you.
  13. HOLY CRAP YOU CAN USE VARIABLES TO SAVE THE RESULTS OF A CALL TO RANDOM. Yes, I'm mocking you:
  14. world.getBlock(x, y, z) ?
  15. This makes no sense. One does not place back a tile entity that shouldn't be there after you remove its parent block.
  16. Because the rest of the time it's just a variable in memory!
  17. Use your block to scan the area around itself and then use magic to change the spawner properties. Like setting the current time (NBTTagCompound.getShort("Delay")) to a number greater than 1.
  18. ASM or Reflections. Or base class editing.
  19. Just to show how unfamiliar I am: I was pretty sure they referred to the same thing. @..@ Oh sweet, how about that.
  20. Taking a look at Thaumcraft's source (JD GUI is awesome) I can't figure out how everything works, but it looks like he has a general look-up function that takes an item ID and checks it against various recipes (arcane, crucible, etc.) and generates a list of essence types (stored as a list of Enum values). For something more like adding "burnable" to it, ASM might be your best bet. Note: the Reflections API is not for the faint of heart.
  21. Gravity is not a globally referenced variable. Every entity handles its own downward movement and acceleration. (Blocks do not obey gravity, in any way, what so ever. "But sand and gravel!" you say. "Entities. EntityFallingSand. Not a block" I reply.)
  22. @Override public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List) { par3List.add("Whatever string you want to display here"); } Which you probably could have figured out by looking at the classes of any item that displays tooltip information. Like ItemRecord.
  23. ByteArrayOutputStream bt = new ByteArrayOutputStream(); DataOutputStream out = new DataOutputStream(bt); out.writeBoolean(true); Packet250CustomPayload packet = new Packet250CustomPayload("MyChannel", bt.toByteArray()); PacketDispatcher.sendPacketToServer(packet);
  24. I would just like to report that mnn's solution works. He got the config syntax wrong, but there is a set method that works for most data types. I wanted to read in an integer array, then sort it, in order to take advantage of reading this array later in a fast method. So I figured I might as well sort the array and save it back to the config. Here's the solution: int[] white = config.get("WorldGen","dimensionWhitelistList", new int[] {0}).getIntList(); //read the values, supplying defaults int[] black = config.get("WorldGen","dimensionBlacklistList", new int[] {-1,1}).getIntList(); Arrays.sort(white); //sort Arrays.sort(black); String a=Arrays.toString(white); String whitestring[]=a.substring(1,a.length()-1).split(", "); //have to convert to a string array in order to write String b=Arrays.toString(black); String blackstring[]=b.substring(1,b.length()-1).split(", "); config.get("WorldGen","dimensionWhitelistList", new int[] {0}).set(whitestring); //default values here are irrelevant, but required in order to retrieve the config Property config.get("WorldGen","dimensionBlacklistList", new int[] {-1,1}).set(blackstring);
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.