Jump 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. I may be wrong, that was what I thought was happening from an initial examination. I haven't messed with guicode in a while.
  2. What you should have is if(ID == mod.guiIDMoriumWorkbench) { return ContainerMoriumWorkbench(player.inventory, world, x, y, z); }
  3. Nothing you're doing in drawScreen is visible because you're calling super.drawScreen() after drawing. super() is coming along and drawing on top of it, hiding it.
  4. FFS, why do we keep seeing this? if(ID == mod.guiIDMoriumWorkbench) { return ID == mod.guiIDMoriumWorkbench //... You already checked the ID, why are you checking it again?
  5. I'm not surprised. To debug an if-statement you need to be logging outside of it and printing out the objects being compared not the comparison result.
  6. java.lang.ClassCastException: danger.orespawn.RenderElevator cannot be cast to net.minecraft.client.renderer.entity.RendererLivingEntity at com.thevoxelbox.voxelmap.n.do(Unknown Source) Looks like VoxelMap and OreSpawn don't get along. The elevator is being seen as a LivingEntity by VoxelMap but its renderer is probably a TESR.
  7. (Unfortunately aside from googling "how do I change the cursor" I am unable to help)
  8. 0) do not use getBlockById. Just because the block ID is what you have in your code in your development environtment does not mean that that is what it will be when someone else loads your mod. Just compare blocks. if(block == Blocks.stone) 1) don't cancel the block break event, you want to interrupt the EventPlayerBreakSpeed (If I am remembering its name correctly). 2) GuiStatlist is a client-side class, you can't just directly add xp to the gui. That will crash the server. You need a Capabilities object that will save the player's skills and exp so that it can be both network-safe and persistent.
  9. How are you trying to load the files? (That means "show your code")
  10. That console output matches neither what I did, nor what you did (and is useless).
  11. I understand how you're doing the input and output, but you can't oredict that the way you want. You need to create a recipe that takes * input and provides * output in the same class so that you can do the appropriate math.
  12. 1) Why are you passing two HammerRecipe s to addRecipe? 1b) What is this class? 2) new HammerRecipe(Blocks.log, OreDictionary.WILDCARD + 1) makes no sense: you can't have a metdata that high and it in no way refers to the metadata of the other object. You need to create your own version of IRecipe that takes a block and a wildcard metadata, which takes the input item stack's actual metadata and adds 1 (%16).
  13. Do it the other way around System.out.println("Getting biome: " + event.player.worldObj.getBiomeGenForCoords(event.player.getPlayerCoordinates().posX, event.player.getPlayerCoordinates().posZ)); if (event.player.worldObj.getBiomeGenForCoords(event.player.getPlayerCoordinates().posX, event.player.getPlayerCoordinates().posZ) == BiomeRegistry.biomeFreon){
  14. markDirty only indicates that the data has changed and will need to be saved to disk when the next save() cycle runs. It does not indicate that the data needs to be synced to the client. IIRC, you want World#markBlockForUpdate()
  15. The only thing "special" about an API is that it comes with an implied contract that says, "this will never change." That is, once you have an interface called IMyRecipe that supplied some method ItemStack getTheRecipeResult(...) then that interface will forever exist in that package location with that name and that method. Some people in the modding community don't understand this, *cough, Reika, cough,* and they will modify their API with every release of their mod, breaking any integration someone else went to a lot of work to make sure it played nice. The crash then occurs in the other person's mod, and that person may have fucked off to the outer reaches of space and not give two shits any more. Good job hero: your API changes made someone else's mod crash (and now they hate your guts). (And this is why my Reasonable Realism mods no longer support Rotary Craft)
  16. Well, the sound doesn't play on the server because World#playSound on the server thread is empty. What you need to do is debug this line: if (event.player.worldObj.getBiomeGenForCoords(event.player.chunkCoordX, event.player.chunkCoordZ) == BiomeRegistry.biomeFreon){ And figure out why it isn't doing what you want.
  17. Oredictionary.WILDCARD has a value of 32,767 (iirc). It is larger than the metadata value allowed on an item stack, adding 1 to it isn't going to do what you want. I can't tell you what you should be doing because I can't figure out WTF you want your hammer to do. Write it in plain English as if I was a player of your mod. What the fuck does this tool do?
  18. All of the entries in your langfile will be successfully read. That doesn't mean there wasn't a typo so that a string that goes for attempted translation ends up not finding one (validating this is an NP Hard problem).
  19. Gosh! It appears you are trying to access a client-side-only object from the server! If only I knew what because you didn't post any code. (Protip: learn what proxies are and how to use them)
  20. Odd, was the first result for me. Anyway, try this instead http://www.java-gaming.org/index.php?topic=26145.0
  21. http://lmgtfy.com/?q=java+change+cursor First result http://stackoverflow.com/questions/7359189/how-to-change-the-mouse-cursor-in-java
  22. Vec3 either: a) still exists and you haven't imported it correctly b) been replaced with a differently named, but identical class (e.g. Vector3) If you look at the vanilla methods that used to return/take a Vec3 what are they taking now?
  23. Agreed on the custom AI Task. You should poll the target block's hardness and compare to whatever tool the mob is using (if any, which includes "I want it to break as if it had an iron pickaxe") and then store the time spent breaking (look at the existing usages for getHardness to locate how vanilla/Forge calculates the time-to-break (or this section on the wiki)). When the task calculates that the block was broken, do the on-broken stuff (drop the block, replace it with air, etc.) Be sure to follow vanilla and Forge conventions so chests drop their items and so on. The series of calls are easily located using the find-references feature.

Important Information

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

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.