Jump to content

Animefan8888

Forge Modder
  • Posts

    6157
  • Joined

  • Last visited

  • Days Won

    59

Everything posted by Animefan8888

  1. I managed to fix the Problem by re-creating my Texture as a 32-bit PNG file instead of the Paint.net default of 24-bit. Its now working as intended. Maybe you guys should state somewhere that 24-bit PNG files will not be accepted. Minecraft only accepts multiples of 16.
  2. Managed to track the Error down to the Ressource Handler throwing an IOException, caused by "Bad PNG Signature". I dont have any clue how to fix this... Should I attempt to re-create my Texture? If you have an idea, just do it, then report back with that data.
  3. You need to use the forge gradle building I believe. Never used intelliJ, but this should help. https://mcforge.readthedocs.io/en/latest/gettingstarted/ At the very bottom.
  4. How are you compiling your mod?
  5. Couple critiques Instead of event.getEntity() use event.getEntityLiving() and use an EntityLivingBase field. Go back to using entity.getEntityWorld()
  6. Why are you using Minecraft.getMinecraft()? Where are you using it?
  7. The code you have shown does not use the updateTick method. It only implements IGrowable.
  8. You would do it the same way but only taking into account the block on top and the light amount.
  9. You mean this entire part doesn't seem to turn it into grass? else { if (worldIn.getLightFromNeighbors(pos.up()) >= 9) { for (int i = 0; i < 4; ++i) { BlockPos blockpos = pos.add(rand.nextInt(3) - 1, rand.nextInt(5) - 3, rand.nextInt(3) - 1); if (blockpos.getY() >= 0 && blockpos.getY() < 256 && !worldIn.isBlockLoaded(blockpos)) { return; } IBlockState iblockstate = worldIn.getBlockState(blockpos.up()); IBlockState iblockstate1 = worldIn.getBlockState(blockpos); if (iblockstate1.getBlock() == Blocks.DIRT && iblockstate1.getValue(BlockDirt.VARIANT) == BlockDirt.DirtType.DIRT && worldIn.getLightFromNeighbors(blockpos.up()) >= 4 && iblockstate.getLightOpacity(worldIn, pos.up()) <= 2) { worldIn.setBlockState(blockpos, Blocks.GRASS.getDefaultState()); } } } }
  10. You didn't implement a way for the crop to grow, all the other crops use Block#randomTickUpdate(...) I believe that is the method name if not it is something incredibly similar.
  11. What is recipe.isSacrifice and what if recipe.sacrifice is null? And instead of getting and checking instances, why not just do World.getEntitiesWithinAABB(recipe.sacrifice, aabb); //aabb should just be a variable instead of a new one everytime. Which you would initialize in the onLoad (I believe that is the name)method.
  12. Yes! Exactly as there. I looked the code, and there simply is replacing the slots of the container, but my container does not work. Reason: I have things stored in the player, i.e., there are 2 tabs with two containers. In the first tab standard player's inventory, second my container of the player(CapabilitySystem and etc) Show what you currently have.
  13. Could you show a screen shot of your current package setup? And if you don't want them to extend it make the class final. And if you don't want them to use it IE InternalClass iClass = new InternalClass(); iClass.doSomething(); Don't include the source with the file, or denote in the class/source some javadoc that says "Do not use; for internal use only." And even mark it with a @Deprecated if you want.
  14. NameFormat is fired when a player's display name is retrieved. This event is fired whenever a player's name is retrieved in EntityPlayer#getDisplayName() or EntityPlayer#refreshDisplayName(). This event is fired via the ForgeEventFactory#getPlayerDisplayName(EntityPlayer, String). username contains the username of the player. displayname contains the display name of the player. This event is not Cancelable. This event does not have a result. HasResult This event is fired on the MinecraftForge#EVENT_BUS. Tested my code above, kinda breaks the mod functionality. What way (personally) would you usually modify the playerlist? What do you mean it breaks the mods functionality?
  15. Since we are talking about Java models, or whatever they are actually called. You bind a texture to the rendering engine via Minecraft.getMinecraft().getTextureManager().bindTexture(resourceLocation); And where on the texture is decided in the code via (basically UV mapping) ModelRenderer model = new ModelRenderer(this, textureOffsetX, textureOffsetY); // Or ModelRenderer model = new ModelRenderer(this); model.setTextureOffset(textureOffsetX, textureOffsetY);
  16. Two suggestions re run the setupDecompWorkspace command, and if the error persists restart the machine, and if after that download the latest version of forge if you have not already and run the setup for that.
  17. Then it will never contain your sacrifice, because it will return an instance of the class and not the class itself. You will want to do an instanceof check instead. Plus your AxisAlignedBB needs to have the smaller (aka "-5"s) first instead.
  18. Two things [*]Your World#getEntitiesWithinAABB(...) needs to be relative to the TEs position. [*]Second what is recipe.sacrifice?
  19. Post your whole class please.
  20. Did you fix the if statement?
  21. Is EntityLivingBase imported? And if it is refresh your IDE. Edit: That is also not a proper if statement.
  22. Cant do anything without the crash we can't do anything...
  23. World#getEntitiesInAABB(...)
  24. Create a custom method that does give you this, and call it from the vanilla neighborChanged method.
  25. Two things you have seriously over complicated these methods to the point where receiveExperienceInternal() doesn't even work. And second does your LivingUpdateEvent even get called? Does the player have the Capability? And why are you using LivingUpdateEvent and not PlayerTickEvent? Too go into more detail on your methods. // Your internal method could could literally be this. public int receiveExperienceInternal(int receive) { return receiveExperience(receive); } // And the non internal could be this @Override public int receiveExperience(int receive) { setExperience(receive + getCurrentExperience()) return getCurrentExperience; } But I don't see a reason for you to return a value in the first place...
×
×
  • Create New...

Important Information

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