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. Turns out I'm an idiot. Iterating over an array in the positive direction and removing elements causes everything to shift downwards.
  2. Jesus F-ing Christ! YOU can't find one of YOUR desired recipe removals (but its in my list) and I can't find one of MINE (but its in your list)! ...And I think I know what the issue is. Add an i-- right after you remove the recipe (or change the iteration to start at list.size()-1 and count backwards). Because we're both itterating over the array from front to back, we're accidentally skipping over array elements. I'm such an idiot. (I blame it on being sick and overworked: 36.5 hours logged last week and I wasn't in the office Monday or Tuesday).
  3. Does the gold rail show up in the console log anywhere? It should: 192: net.minecraft.item.ItemBlock@c94504 -- tile.goldenRail
  4. So in my own kerjiggering of recipes, I want to replace the recipes for the stone tools. Axe, pick, shovel, gone. Hoe...apparently does not have a recipe in the CraftingManager. In part of debugging why the hell it isn't being removed, I printed out every damn entry: 210: wood hoe 213: iron hoe 215: diamond hoe 217: gold hoe No stone hoe. Code:
  5. Having just now started poking at the removal of vanilla recipes... You can't remove a recipe by its output. You need to find ShapedRecipes object that has a getRecipeOutput().getItem() that matches the result you're trying to remove. Note, this might not be the best way, but here's what I'm trying now: (And I'm sure that if I'm wrong, someone will step in and correct me) ArrayList list = (ArrayList) CraftingManager.getInstance().getRecipeList(); //get all recipes IRecipe recipe; int recipesFound = 0; for(int i=0; i<list.size(); i++) { //loop through them Object o =list.get(i); if(o instanceof IRecipe) { recipe = (IRecipe) o; if(recipe.getRecipeOutput() != null) { //your missing this line. Sometimes a result can be null (no, I don't know why) System.out.println(i + ": " + recipe.getRecipeOutput().getItem().getUnlocalizedName()); if(recipe.getRecipeOutput().getItem() == Items.stone_pickaxe) { //if the item result is the item result I am looking for list.remove(recipe); //remove it } } } } This is compiled and running along side other mods:
  6. I meant a helper for the specific purpose of overwriting vanilla items. It's a "relatively" common task, but there's no explicit helper function.
  7. Reflection can do anything. Problem is: you have to know how to do reflection. I don't believe there are any helper functions for this.
  8. All you did was wrap his parameters in a new Object[] {} which is already done by the compiler. http://www.minecraftforge.net/forum/index.php/topic,25202.msg128448.html#msg128448
  9. I don't think so. Looking at the functions involved it does not appear so.
  10. setContainerItem(Items.bucket); in your bucket class.
  11. See that spot that says "switch(ID)"? That's where you add more IDs.
  12. try .setBackgroundImageName(MODID + ":" + "creativeTab") And if that doesn't work, check your console for errors, it will tell you if it failed to load an image. Copy that error and post it.
  13. I'd create a static class that all it does is hold onto the data received and then the GUI can just read those variables when it draws. Short answer: yes.
  14. setBlockToAir?
  15. I know Mystcraft does it (it names them MYST_xxx) but yeah, why? Mystcraft is really the only dimension adding mod I can think of that would need that.
  16. Did you register it?
  17. Don't even need a tile entity. world.scheduleBlockUpdate(x,y,z,this,1) in the block's update function will suffice.
  18. Remove and replace its recipe so that it craft "I can't believe it's not a diamond sword" instead of a diamond sword.
  19. ...and if there's some part of super.onUpdate() you don't want, go look at it and find the bits you DO want and copy them.
  20. Try this out: https://github.com/Draco18s/Artifacts/blob/master/main/java/com/draco18s/artifacts/client/RadarParticle.java
  21. If i do this it still drops its self Negative. CDrop is of type Item and Items don't drop Items, Blocks drop Items (or Blocks, but Blocks are also Items).
  22. Those slots can already, natively, hold items. Apply damage to the item stack. The whole bench would then be a TileEntity that has an internal inventory (like a chest) to hold and contain those items.
  23. So congradulations on writing an infinite loop. This is basic programming and you have failed it.

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.