Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/23/18 in all areas

  1. Try using onArmorTick (or similar) to check if you have the full set and apply the effect
    2 points
  2. Instead of new ModelResourceLocation(Item#getRegistryName(), "inventory"); you will have to do new ModelResourceLocation(new ResourceLocation(modid, "folder/itemregistryname (without the modid)"), "inventory"); When you register your Item models.
    1 point
  3. Exactly my point, there are things the Mojang has done that could have been done better. This is one of those scenarios.
    1 point
  4. ...Or just shove your ItemBlock into the ModItems.ITEMS array? Like the guy these people are copying from does anyway? You literally don't need a second array, ItemBlocks ARE ITEMS, that's the whole point.
    1 point
  5. thanks i know this went a little off topic but it was good to know how to get rid of IHasModel!
    1 point
  6. is it possible to give the player a player head with a skin of given player like the command /give @p skull 1 3 {SkullOwner:"PLAYER_NAME"} i have tried the following ItemStack skull = new ItemStack(Blocks.skull, 1, 3); String playerName = "Notch"; if(skull.stackTagCompound == null) skull.stackTagCompound = new NBTTagCompound(); skull.stackTagCompound.setString("SkullOwner", playerName); i got it working //The players skin the skull will be String playerName = "Notch"; //Create a ItemStack object of a playerHead ItemStack itemstack = new ItemStack(Items.skull, 1, 3); //Give the ItemStack a blank NBTTagCompound itemstack.setTagCompound(new NBTTagCompound()); //Give the blank tag compund the "SkullOwner" tag with the value of a new NBTTagString of the players name itemstack.getTagCompound().setTag("SkullOwner", new NBTTagString(playerName));
    1 point
  7. Don't follow youtube tutorials basically. https://en.wikipedia.org/wiki/Cargo_cult_programming Basically just copy and pasting code without really thinking about why your doing it, if theres a better way or if its even needed at all
    1 point
  8. You said this amazingly eloquently and motivatingly. I have to say though that using debug mode you can hot swap code which is absolutely invaluable.
    1 point
  9. @Spaceboy Ross You're at a very important point in your programming/modding learning and my main advice is "slow down and understand". You're jumping around across a number of advanced modding topics while missing some fundamental skills related to Java programming as well as setting up your mod. Cutting and pasting and guessing at changing values is not a good way to develop your ability and will lead to weirder and weirder bugs in your code. Now you certainly SHOULD use vanilla code as a reference, even copying portions of it, but you also MUST understand what the code is doing. So if you have a parameter name that is something like p_191986_1_ in the vanilla code you should rename it according to what it actually does. Your code will become much more readable, and your ability to modify it properly will improve. If you don't understand Java well enough to know that you can rename the parameters then you really need to practice getting stronger in Java as well. For parameters passed into a method, the name of the method and the TYPE and order of the parameters must match the call, but the name can be anything you want (and should be meaningful). In order to figure out what the parameters really mean (so you can name them correctly) you should look at the Call Hierarchy (right-click on method name in Eclipse and it will give you that option) to see where other code that uses the method is. You can look at that and it is usually pretty obvious then what the fields represent. Then, regarding debugging you have not followed my suggestion regarding adding lots of console print statements through your code. You should be able to identify what is wrong with almost any code within 10 minutes if you print out the right info to trace the execution. In your case you keep saying "it doesn't work" but that isn't helpful. You need to figure out if your method isn't being called at all versus whether it is being called and executing differently than you expect. I don't personally use debug mode much (I find console statements work for most cases) but if you're going to do that then you need to learn how to do that properly -- setting breakpoints, ensuring the thread settings are correct (so other threads don't time out), and learn the various ways to step through (or into) the code. There are lots of tutorials for that. The reason why we're all jumping in on this thread is because you're showing a lot of potential and obviously have a passion for modding, but you're missing some important lessons you need to learn in order to really progress. So, simply (a) figure out what the code is supposed to do (b) trace the execution.
    1 point
  10. It took me a single google search to find that Computercraft is now opensource on GitHub and has a 1.12.2 alpha build on CurseForge...
    1 point
  11. Don't implement ITileEntityProvider, just override the hasTileEntity and getTileEntity methods that are already present in the Block class. Also, why the fuck are you doing this: tile.writeToNBT(tag); int color = tag.getInteger("color"); return color + 10000; You have this available to you: public int getColor() { return this.color; }
    1 point
×
×
  • Create New...

Important Information

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