Skip to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Draco18s

Members
  • Joined

  • Last visited

Everything posted by Draco18s

  1. public class Chunk { /** * Used to store block IDs, block MSBs, Sky-light maps, Block-light maps, and metadata. Each entry corresponds to a * logical segment of 16x16x16 blocks, stacked vertically. */ private ExtendedBlockStorage[] storageArrays;
  2. I don't know, that's what you're supposed to go ask XCompWiz.
  3. new ResourceLocation("modID:textures/gui/potion_icon.png")
  4. The snowball projectile takes an item Icon as its texture. I was able to figure out how just by looking at how Vanilla created its snowballs. Hint: ender pearls also use the snowball projectile.
  5. If you have an item (even if its never available any other way) it's easy to use that item as the projectile (as I assume you're using the snowball entity).
  6. The stronghold generator holds references to the three it creates and there's a special magical function in the IChunkProvider that allows retrieving that info. Not really valid for a structure that isn't limited, nor does it work for arbitrary structures: public ChunkPosition findClosestStructure(World par1World, String par2Str, int par3, int par4, int par5) { return "Stronghold".equals(par2Str) && this.strongholdGenerator != null ? this.strongholdGenerator.getNearestInstance(par1World, par3, par4, par5) : null; }
  7. I'm not making a massive structure. The one converter I was looking at has a limit of...1500 blocks in a single segment. Waaay more than I need.
  8. ScatteredFeatures has code to insuring that they don't generate in neighboring chunks (cursory glance indicates minimum distance of 8 chunks, maximum 32 chunks). Which implies that that code has some method of determining where other instances of it are. That isn't going to be something I can replicate with an IWorldProvider. I was going to be designing via schematic anyway. Then use a schematic -> Java converter I'd found (it was last updated for 1.3.2, but that is still sufficient to use replacement blocks, ie. "iron ore is my blockA, coal ore is my blockB...." so I could go in and replace blockID references) I was unaware that there was a direct schematic loading API. Neat.
  9. Step 1: Tell the server via packet handler that the item has been used. Step 2: Find the block's location. This can be done through math, as well as knowing where the player currently is (which you have access to) Step 3: Determine correct block. You have a location and a world. Step 4: Damage the item
  10. public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { //perform magic } Where 'magic' is sending a packet to the server to perform the action you desire.
  11. Anyone have any experience with this? I would like to add to world generation additional structures that are on the same level as pyramids and temples. Other than having to build the code for the structure itself, what do I need to do to get this to happen in the cleanest way possible?
  12. Because removing the limitation on (btye) is an actual solution, which works, and requires no base class edits (as evidenced by Mystcraft) and is highly flexible. Like having ores generate. If your base material isn't stone, vanilla ores will not populate.
  13. Indeed! well spoken Draco lol If I can ever get around by NOT making a custom GUIcontainer I will, like when I created a different kind of dispenser (it had different behaviors but was for all intents and purposes still a dispenser) I just extended TileEntityDispenser and used the Dispenser GUI.
  14. That's dumb. Do what Alix suggested. XCW is very approachable.
  15. You should create your own GUI container classes. They aren't that difficult. Annoying, time consuming, and taking a ton of classes. But not difficult. http://www.minecraftforge.net/wiki/Containers_and_GUIs
  16. You would need to create a custom Slot class that returns false for isValid. The TE would be able to move inventory items around all it wants, as the isValid check only applies to players (there's another, separate function for sided inventories for things like pipes). Check the GUI for the furnace. The slot on the right is the kind you're looking at.
  17. public boolean onBlockDestroyed(ItemStack par1ItemStack, World par2World, int par3, int par4, int par5, int par6, EntityLivingBase par7EntityLivingBase) { //damage par1ItemStack }
  18. int myItemID = congif.getItem("someItem",4500) - 256; MAGIC Seriously. It's called MATH.
  19. Holdover from when BlockIDs and ItemIDs shared the same "0" and blocks were the first 256 in the array. You can't fix that. Blame Mojang.
  20. Let me guess. 3100 is LESS than 3840
  21. 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?
  22. 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)
  23. There is a suggestions forum for a reason.
  24. 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.
  25. Now tell them to go here: http://www.minecraftforum.net/topic/1597274-tool-block-id-conflict-resolver/

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.