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.

Ewe Loon

Members
  • Joined

  • Last visited

Everything posted by Ewe Loon

  1. I need help with this sort of thing too, mainly knowing how to add them so they will be built when a village is created and built
  2. Anyone know if its possible and how to add new village structures I want to add a stable
  3. why not simply create your own entity , grab the code for the villager as a base and make your modification to it in stead of making the profession use a custom entity make you new entity use the villager gui
  4. Thankyou, exactly what i needed
  5. how would i go about listing all the mods that are currently installed
  6. if the problem is the item in slot 1 then take a good look at it it is rendering transparencies (look at to outside shape) check your transparency on the inside bit, if it has a slight opacity it will render as fully opaque the only items i have ever seen in the game with opacity are all blocks and they use @SideOnly(Side.CLIENT) public int getRenderBlockPass() { return 1; } to do that, but i dont know how you would for an item, that is if it is possible
  7. once you have created your recipe add it with GameRegistry.addRecipe(new TrackerRecipe()); in your init event
  8. thankyou, I use System.out.println a lot, and it dosnt get put into the log file in deployed mods, i have a problem in a single player game, (with the deployed mod) and cant see what is happening because it isn't being logged, the problem isnt happening when i run it from eclipse
  9. oh, another thing you need to make sure of, is that you only make changes and replace the items on the crafting grid when necessary , otherwise you get a non exiting loop and a stack error crash so in your case if the item is full / repaired , or the filling/repairing item is empty, exit with out changing either item
  10. here is a brief explanation of the process search slots for items you dont want on the crafting table also getting the slot numbers of the items you do want then perform the changes to the items simple
  11. ok, in one of my mods i created a recipe that sets an item to data in another item, this is how a player uses it, put both items on the crafting table , and its done automatically the items remain on the crafting grid here is the recipe package me.el.LoonTools; import net.minecraft.inventory.InventoryCrafting; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.IRecipe; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; public class TrackerRecipe implements IRecipe { public ItemStack getCraftingResult(InventoryCrafting inv) { return null; } public ItemStack getRecipeOutput() { return null; } public int getRecipeSize() { return 0; } public boolean matches(InventoryCrafting inv, World w) { ItemStack cr=null; ItemStack tr=null; int sn=0; for (int s=0;s<inv.getSizeInventory();s++){ ItemStack i=inv.getStackInSlot(s); if (i!=null){ Item it = i.getItem(); if(it instanceof ItemCrystal){ if (cr!=null) return false; cr=i; }else if(it instanceof ItemLocationTracker){ if (tr!=null) return false; tr=i; sn=s; }else return false; } } if(cr==null || tr==null) return false; if (!cr.hasTagCompound()) return false; try { NBTTagCompound c = cr.getTagCompound(); float x=c.getFloat("bx"); float z=c.getFloat("bz"); String wld=c.getString("bw"); NBTTagCompound t; if (tr.hasTagCompound()){ t=tr.getTagCompound(); try { float tx = t.getFloat("bx"); float tz = t.getFloat("bz"); String tw=t.getString("bw"); System.out.println(tx+" "+tz+" "+tw); System.out.println(x+" "+z+" "+wld); if (x==tx && z==tz && tw.equals(wld)) return false; } catch (Exception e) { } }else{ t=new NBTTagCompound(); } t.setFloat("bx", x); t.setFloat("bz", z); t.setString("bw", wld); ItemStack result = tr.copy(); result.setTagCompound(t); result.setStackDisplayName(cr.getDisplayName()); inv.setInventorySlotContents(sn, result); return false; } catch (Exception e) { return false; } } } you will notice that everything is done in the matches method you will also notice that matches always returns false, this prevents items being lost by consumption during crafting Hope this helps
  12. I cant see anything events that would be useful , so i can only make suggestions one possibility is to setup a method that is called every server tick, and use it to set the players health to what you want it to be this might flicker at times, but it would be worth trying, TickEvent.ServerTickEvent on the FMLCommonHandler.bus()
  13. A little more information is required, , how are you wanting to repair / refill the the item , custom block,? putting it on the crafting table with another item to refill/recharge ?
  14. How do i make a mod send text to the log file
  15. I figured it out public int getShapedOreRecipeWidth(ShapedOreRecipe r){ int w=0; try { Class<?> c = r.getClass(); Field wdth = c.getDeclaredField("width"); wdth.setAccessible(true); w=wdth.getInt(r); } catch (Exception e) { } return w; } or is there a better way
  16. the class ShapedOreRecipe has width and height as private, is there a way to read them I need to be able to read the patterns for recipes for a project i am working on, I can get the items but not the width and height
  17. edit: deleted comment
  18. you should have GL11.glPushMatrix(); at the beginning of your renderTileEntityAt method and have GL11.glPopMatrix(); at the end this resets the position and rotation back to where they where before you change them, this is to prevent other tile entity renders form being rendered in the wrong place
  19. my my mistake , i had the event class registered to both buses though when i had it in my main class with the initialization events it didn't work this might be because i has it in with @EventHandler (when it wasnt working) now its in a different class it has @SubscribeEvent and is working
  20. not sure if this is the correct place to report this in the list of Forge events https://dl.dropboxusercontent.com/s/h777x7ugherqs0w/forgeevents.html (I dont know who maintains it) the TickEvent.ServerTickEvent event is listed as being on FMLCommonHandler.bus() but it is actually on MinecraftForge.EVENT_BUS
  21. do you mean net.minecraftforge.oredict.RecipeSorter.class inside the .gradle\caches\minecraft\net\minecraftforge\forge\1.7.10-10.13.0.1180\forgeBin-1.7.10-10.13.0.1180.jar file ? if so i dont see any comments,
  22. i get this error Unknown recipe class! me.el.LoonTools.TrackerRecipe Modder please refer to net.minecraftforge.oredict.RecipeSorter where do i find what i need to refer to, or is this error unpreventable or how do i prevent this error
  23. sorry, im used to bukkit (been using it for years), in which they are called worlds, and i have only been using forge for about 3 weeks why couldnt they have named things the same
  24. you may be able to use the event PlayerEvent.BreakSpeed to achieve what you want something to consider, most of the trees are oak and birch, so how do you get wood to make an axe , if you cant find any other trees within a few thousand meters (think about large biomes)
  25. I think you will find IBlockAccess is the the world the available methods it has might be enough for what you want if not you might be able to cast it to World to access more methods if you dont know how to find out what class an object is System.out.println(obj.getClass().getSimpleName());

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.