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. Use block metadata. When the block is placed, set its metadata to a value based on its position (etc.etc.) and then create a tile entity based on the metadata using: public TileEntity createTileEntity(World world, int metadata) { }
  2. You haven't actually used a TileEntity have you? When you (the modder) creates one, you don't have block coordinates. You only have the world: @Override public TileEntity createNewTileEntity(World world) { return new MyTileEntity(); } Vanilla code handles the rest.
  3. You've gone about things in a really weird way, took me almost 10 minutes to figure it out. And... I have no idea.
  4. Look at BlockIce to figure out what you're doing wrong. You gave the block a transparent texture, but didn't tell the rendering engine that it is a transparent block.
  5. if(!this.worldObj.isRemote) { //I am on the server, therefore all objects I can see are on the server }
  6. I'm actually avoiding using events for this mod. I've decided to rename this "bug" as "feature."
  7. This function is not called for item frames. It is only called for living entities as indicated by the parameter type passed (and tested anyway, no dice). Tested a few other functions, none of them are covered either.
  8. I will look at that, thanks!
  9. My signature arose from the fact that I tried to kindly remind someone that they shouldn't post in mod threads about updates. I was all "hey, I just found out myself, but your post is technically against the TOS, didn't want to get you in trouble, just thought I'd let you know." Someone decided I was being a total asshat. Flames ensued. I ended up reporting my own post to the mods for calling myself an asshole. So I created my signature in an effort to deter such events in the future.
  10. You mean the one I'm working on? At last check I have over 67 million different items which may or may not have enchantments.
  11. Welcome to client-server disparity. The alternations you're seeing are Client: not-set, Server: set, Client: not-set, Server: set You need to start using packets.
  12. Draco18s replied to Alron's topic in Modder Support
    If you are using any of the FML (or ModLoader) classes, you're doing it wrong. You need to find out the correct Forge class/method to call (use Eclipse's navigation tools to go look at the FML method to find the Forge method it calls, then change your code).
  13. So add a variable which is a timer that gets decremented to 0 every onUpdate. If the timer is 0 when the player interacts with it, set the timer to 6000 (5 minutes) or whatever
  14. if(player.getHeldItem() == new ItemStack(MagicLights.lightStaff)){ That is not how you check to see if two item stacks are equal. You need to use the ItemStack.equal(stack, stack) function.
  15. package worldiswar28.Domarne.client does not match ROD.client.RODClientProxy
  16. This is where your IDE comes in. If you look at the error it tells you that the objects don't match and to add a cast. player = (EntityPlayer) w.get(i);
  17. java.lang.ClassNotFoundException: ROD.client.RODClientProxy It can't find your client proxy class.
  18. Proxies allow you to register renderers, because the server doesn't HAVE a renderer, so trying to do so will throw class not found errors.
  19. TileEntities
  20. Draco18s replied to Alron's topic in Modder Support
    Forge is an API, of sorts, to allow mods to work without creating conflicts due to all the base-class editing. Instead Forge does it once and mods just use hooks to make the changes they need. ModLoader is an API, of sorts, that allows mods to work without creating conflicts, blah blah blah, written by different authors with a slightly different feature set. FML (Forge ModLoader) is an API-API that allows Forge to run ModLoader mods without needing ModLoader installed.
  21. That locates every player inside a 65x65x65 cube (I meant to make it smaller, forgot) and then loops through the list of players inside that volume, and gets their currently active item. All you have to do then is look at that item and decide if that's the item you want to have break the block or not.
  22. His problem is figuring out if the player is holding a given item. Which is harder. Your best bet is to poll the world for all Players in interaction range (4 blocks) and then check their active item. Here's the hard part: AxisAlignedBB aabb = AxisAlignedBB.getAABBPool().getAABB(xCoord-32, yCoord-32, zCoord-32, xCoord+32, yCoord+32, zCoord+32); List w = worldObj.getEntitiesWithinAABB(EntityPlayer.class, aabb); if(w.size() > 0) { //at least one player in range EntityPlayer player; for(int i = 0; i < w.size; i++) { player = w.get(i); player.getHeldItem();//active item as ItemStack } }
  23. And then read that item's NBT data. This isn't "oh, Item ID 1322 increases your health" it "Item ID 1322 {["onOwned":"increaseHealth"}]" vs. "Item ID 1322 {["onOwned":"increaseSpeed"}]" vs. "Item ID 1322 {["onUpdate":"heal1"}]" vs. "Item ID 1322 {["onRightClick":"causeLightning"}]" vs.... Anyway, if we're going to call things features, I think it would be a more interesting "feature" that items in frames are permanent boosts. It's like a litch's phylactery! It just isn't meaningful in SSP: no one can try and sneak into your base and "destroy" your powerbase.
  24. It's not triggered before OR after, none of the item's functions are called. How would you make an item that gives the player bonus health while they are carrying it? I am trying to do this without events, but if I have to for this case I will.
  25. Actually, it's not. I checked.

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.