Everything posted by Ewe Loon
-
[1.7.10] Structure Components
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
-
[1.7.10] Adding Village Structures
Anyone know if its possible and how to add new village structures I want to add a stable
-
[1.7.10]Question about approach to a custom villager
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
-
list installed mods
Thankyou, exactly what i needed
-
list installed mods
how would i go about listing all the mods that are currently installed
-
[1.7.10] IItemRenderer transparent texture rendering as solid black
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
-
Refill/Repair damaged Item
once you have created your recipe add it with GameRegistry.addRecipe(new TrackerRecipe()); in your init event
-
Send text to log file
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
-
Refill/Repair damaged Item
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
-
Refill/Repair damaged Item
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
-
Refill/Repair damaged Item
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
-
[1.7.10] Manipulating health regen.
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()
-
Refill/Repair damaged Item
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 ?
-
Send text to log file
How do i make a mod send text to the log file
-
How do i Read the Width of ShapedOreRecipe
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
-
How do i Read the Width of ShapedOreRecipe
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
-
[1.7.10] Custom Rendered Block
edit: deleted comment
-
[1.7.10] Custom Rendered Block
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
-
event bus discrepancy
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
-
event bus discrepancy
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
-
Unknown recipe class! ... please refer to net.minecraftforge.oredict.RecipeSorte
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,
-
Unknown recipe class! ... please refer to net.minecraftforge.oredict.RecipeSorte
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
-
[1.7.10] how do i get the world name
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
-
[1.7.10] Changing the harvest level of oak wood
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)
-
[1.7.10] Getting an instance of the World
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());
IPS spam blocked by CleanTalk.