Jump to content

Elijah482

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by Elijah482

  1. I made those changes, but the item still isn't rendering...did you manage to get it rendering? Could it be an issue with intelliJ? At this point I'm thinking i should just start over with eclipse.
  2. Hi, I've been following the shadowfacts tutorial up to the point in which the first custom item is registered + rendered with a custom texture. Despite following every single instruction exactly and reviewing my code a thousand times to make sure, I get a missing texture for my custom item every time I load up my mod. I have heard that sometimes intelliJ can cause issues with forge, but none of the fixes I've come across have worked (making changes to build.gradle, refreshing dependencies,etc...). To clarify, I have my texture at the directory "\src\main\resources\assets\lessannoyances\textures\items", and my .json at "\src\main\resources\assets\lessannoyances\models\item", both of which are named 'spaghet', which is also the name of the item - I am 99% sure this is working, since if I rename either of these files I get an error during startup, and changing it back results in zero errors whatsoever. I'm at an absolute loss as to what could be causing this. If anyone has any idea, I would really appreciate it. My code is follows; Itembase.java clientproxy.java commonproxy.java ModItems.java main.java;
  3. Ok, thanks I'll have a look. The ItemCraftedEvent is to give the item back after using it in the crafting recipe. There's probably a better way of doing it...
  4. I'm trying to make a 'sharpening stone', that when combined with any axe will add the efficiency 1 enchant to it. I've got a basic handler that returns the stone, but I can't figure out how to make the recipe use ANY kind of axe. Do I need to create an array of axes and reference that in the recipe? Here's what I have below. @SubscribeEvent public void onCrafting(PlayerEvent.ItemCraftedEvent event) { IInventory matrix = event.craftMatrix; ItemStack y = new ItemStack(ItemList.basicItem, 1); for(int i=0;i<matrix.getSizeInventory();i++) { if (matrix.getStackInSlot(i)!= null && matrix.getStackInSlot(i).getDisplayName().equals(y.getDisplayName())) { matrix.setInventorySlotContents(i, new ItemStack(ItemList.basicItem, 2)); } } } public class ItemList { public static Item basicItem; public static void initItems() { basicItem = new ItemBase(); GameRegistry.registerItem(basicItem, "basicItem"); GameRegistry.addShapelessRecipe(new ItemStack(Items.diamond_axe, 1), basicItem, Items.wooden_axe, Items.flint); } }
  5. Ah ok. Upon opening a LAN server and having another test client join it seems to be working properly for them. Thanks for your help!
  6. I'm basically just trying to assign an NBT tag to each player that tracks how many cobblestone they've broken and assigns an achievement once it hits a certain amount. It seems to work somewhat but only the first player connecting to a world can unlock the achievement - everyone connecting after that has the cumulative value of all the cobblestone broken by previous players assigned to the tag. For example, if player 101 if the first player to join a new world from a test client and digs up 10 blocks, the tag registers perfectly ok and the achievement is triggered - if the client is closed and reopened, player 102 will having the tag assigned to a value of 11 upon breaking the first cobblestone block. Is this because of some weirdness associated with the eclipse test client (I've noticed you start with the same items, but not achievements?) loading the same player data over and over, or is my code just running indiscriminately and assigning NBT tag values regardless of specific player? My extendedplayer class that assigns the NBT tags is below and the eventhandler calling it is here
×
×
  • Create New...

Important Information

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