Jump to content

Draco18s

Members
  • Posts

    16559
  • Joined

  • Last visited

  • Days Won

    156

Everything posted by Draco18s

  1. Reflections. Also, what do you mean by "overriding a class"? Do you want to replace another mod's block/item with your block/item or do you want to disable the other mod's block/item? Or what?
  2. For me, that's in a TileEntitySpecialRenderer, as for a texture, you would just need to bind a texture: ResourceLocation rl = new ResourceLocation("artifacts:textures/blocks/pedestal.png"); Minecraft.getMinecraft().renderEngine.bindTexture(rl); (Do that instead of the GL11.glColor(...) call; or rather, do it after and change the color to white)
  3. There is a suggestions forum for a reason.
  4. My conflict resolver does NOT assign IDs, it simply flags conflicts and says, "Hey user, this is conflicting, you need to fix it." AND it's not 100% reliable. It's simply the best I could do with the access that I had. Its a known issue that RedPower2's config is not parsed properly, but I am unable to fix it. The problem with automatically assigning IDs has to do with mod load order. Yes, the server should be able to tell the client what IDs go where, but Minecraft (vanilla, that is) was never built that way. If you have a mismatch, the client will TRY to do something, but the server will go "wait, what?" and revert the change. If its two blocks that are functionally identical (say birtch logs and oak logs) with swapped IDs on the client, then the server won't give two shits. It'll place down oak, your client places down birtch. Things get weird (or could) if the blocks have vastly different functions, for instance soul sand vs. sand. The server will slow you down because it's soul sand, but the client will think its regular sand and display it as such, and you'll get some rubber banding as you try to walk across it. This can be easily demonstrated by installing a mod on your client (like Mystcraft or IC2) and not on a server. You can join the server, you can attempt to craft the blocks/items, the client will show a valid result. You won't be able to pick it up. And because items and blocks are referred to by ID number alone there is no guaranteed method to synch the client and server's ID listings. Forge can detect mismatches and changes, but only because it goes out of its way to save block/item names (as unlocalized strings) into the world save file, so that if a mod is removed it can alert you to the fact that some block/item was detected that is in disparity between the current mod set and what was last known for that save.
  5. Now tell them to go here: http://www.minecraftforum.net/topic/1597274-tool-block-id-conflict-resolver/
  6. You will need a custom rendering handler. This is easier to do as a tile entity (think chests) than with a block (think fences). That said, it is possible. Here's some code that will render a flat, rectangular, plane that always faces the player (assuming I didn't leave anything out). float d = xPos; //location float d1 = yPos; float d2 = zPos; float f1 = 1.6F; float f2 = 0.01666667F * f1; GL11.glPushMatrix(); GL11.glTranslatef((float)d, (float)d1, (float)d2); GL11.glNormal3f(0.0F, 1.0F, 0.0F); GL11.glRotatef(-this.tileEntityRenderer.playerYaw, 0.0F, 1.0F, 0.0F); GL11.glRotatef(this.tileEntityRenderer.playerPitch, 1.0F, 0.0F, 0.0F); GL11.glScalef(-f2, -f2, f2); GL11.glDisable(2896); GL11.glDepthMask(false); GL11.glDisable(2929); GL11.glEnable(3042); GL11.glBlendFunc(770, 771); Tessellator tessellator = Tessellator.instance; byte byte0 = 0; GL11.glDisable(3553); tessellator.disableColor(); tessellator.startDrawingQuads(); int j = width;//set width of plane here tessellator.setColorRGBA_F(0.0F, 0.0F, 0.0F, 1F); tessellator.addVertex(-j - 1, -1 + byte0, 0.0D); tessellator.addVertex(-j - 1, 8 + byte0, 0.0D); tessellator.addVertex(j + 1, 8 + byte0, 0.0D); tessellator.addVertex(j + 1, -1 + byte0, 0.0D); tessellator.draw(); GL11.glPopMatrix(); This code is part of what's used to draw labeles above player's heads (etc.) only without the text portion.
  7. Because: block { I:DeathCrystal=1574 I:LifeCrystal=1573 I:DenseFog=1572 I:Fog=1571 } Is totally Java.
  8. At some point you're going to need this: EntityLightningBolt entityLightningBolt = new EntityLightningBolt(world, ix, iy, iz); world.addWeatherEffect(entityLightningBolt); ix, iy, and iz is the block you want the lightning to hit.
  9. You don't need to register them, that's for Icons. Here's code I have that works: ResourceLocation rl = new ResourceLocation("artifacts:textures/blocks/pedestal.png"); Minecraft.getMinecraft().renderEngine.bindTexture(rl);
  10. You need to specify the location starting at /assets: new ResourceLocation("/assets/objtutorial/textures/blocks/XXXXX.png"); Or starting at your Mod ID: new ResourceLocation("objtutorial:textures/blocks/XXXXX.png"); As the first (and only the first) : is converted to a / when the resource is located.
  11. I haven't messed with trees all that much
  12. By rewriting the world generator. :V I actually have no idea, I only know of a couple of people who have succeeded. I suggest getting a hold of either XCompWiz (who's done it for terrain) or Azanor (who's done trees, but I don't know the method). XCW can be found on the #mystcraft channel at EsperNet or PMed at his forums, Azanor has been generally responsive to PMs, though not necessarily quickly.
  13. You don't need anything the vanilla Dispenser does. You're trying to use the verb "dispense" and apply it to the context of a block. Which is getting you confused. You want a block, which works like the nuclear reactor in IC2, that at random, creates an item and does something with it: ejects it into the world as an entity or puts it into its own inventory, or something. That's your goal. Step 1: Import the IC2 API. Hopefully this gives you the nuclear reactor itself, it probably won't. Step 2: Create a new class that Extends TileEntity, call it whatever you want. Step 3: Give it behaviors. If you have access to the original reactor block and TE, you will extend those and simply add a handful of lines to the updateTick method by overriding it. Namely, call super.updateTick(...) and then do what you need to do in order to create a this new item (which is instanciated as a new ItemStack, as item classes themselves are singletons). If you don't have access to the original, you'll have to duplicate everything that it does (good luck) or learn Reflections.
  14. *Math* It would appear that the tree generator (like the landscape generator in vanilla) supports up to block ID 255. Anything over that is truncated to that (600 % 255 = 88 -> soul sand). Which is why you're seeing what you're seeing.
  15. Not enough code presented. Need main mod file, HeroCraftMain
  16. And not understanding keywords like "extends" is a clue that someone hasn't ever encountered Object Oriented Programming, the raw basics of which are necessary to understand how Minecraft works. It's not really possible to learn that through exploring the existing code, because the code assumes you know what inheritance is and how it works. And I'm not going to spend my time explaining those fundamental concepts via forum posts.
  17. When I did something like this for Extendable Ladders, I looped it. As each placement was dependent on where it was placed and when it should stop placement.
  18. You need to go learn programming in general. Not "Java." Programming.
  19. Code that modifies code. In this case, a Java inbuilt API to read and modify class structures in arbitrary fashions. Potions.java have a pesky "final" attribute on the potion array? Reflect it to a) not be final and b) have more elements. http://www.minecraftforum.net/topic/1682889-forge-creating-custom-potion-effects/
  20. Not sure what's going on; I'm a little worn out after a long day. Look up Vec3. You reimplemented it with a new name.
  21. Around the part where you're changing the block metadata?
  22. Do a quick "if(!world.isRemote){}" around your code and see if that changes anything.
  23. client-server disparity. Minecraft.getMinecraft().theWorld returns the client's world, so you're only changing the block on the client side, and when the chunk gets an update packet from the server, the block will reset.
×
×
  • Create New...

Important Information

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