Skip 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.

Animefan8888

Forge Modder
  • Joined

  • Last visited

Everything posted by Animefan8888

  1. The code you have shown does not use the updateTick method. It only implements IGrowable.
  2. You would do it the same way but only taking into account the block on top and the light amount.
  3. 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()); } } } }
  4. 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.
  5. 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.
  6. 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.
  7. 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.
  8. 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?
  9. 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);
  10. 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.
  11. 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.
  12. Two things [*]Your World#getEntitiesWithinAABB(...) needs to be relative to the TEs position. [*]Second what is recipe.sacrifice?
  13. Post your whole class please.
  14. Did you fix the if statement?
  15. Is EntityLivingBase imported? And if it is refresh your IDE. Edit: That is also not a proper if statement.
  16. Cant do anything without the crash we can't do anything...
  17. Create a custom method that does give you this, and call it from the vanilla neighborChanged method.
  18. 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...
  19. Show where you add it.
  20. Use a while loop instead of a for loop e Iterator<BlockPos> it = crystalsAround.listIterator(); while (it.hasNext()) { BlockPos pos = it.next(); // If te is null remove. }
  21. Couple things to check to make sure that everything is actually running. Put a println in your packets toBytes() and fromBytes(), aswell as the onMessage(). Put a println in checkExp() to check if the player is null or not. And specifically in your capabilities handleData() section.
  22. Then you did not think hard enough about what I gave you. If it is North or South you will break the same blocks regardless, same with East and West. Then if it is neither of those it can only be up and down, which guess what will break the same blocks regardless.
  23. The event gives you a player you shouldn't be using Minecraft.getMinecraft()... in most events anyways. Just use. event.getPlayer().getHorizontalFacing().opposite(); // Gives you the face of the block. Edit: Side note "radium" is not a word, but I think you meant radius, which is not the proper word; what you meant is area.
  24. He is not checking equality. Ah, you are correct. But yes, still nonsense. I am not sure what I am doing wrong. It works fine in-game. The name of your method (PmsEnabled) sounds like a getter method. IE it should just return PMs, but instead it switches the value and returns the new value.

Important Information

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

Account

Navigation

Search

Search

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.