Everything posted by Animefan8888
-
(1.11)Custom grass not spawing Mushrooms
The code you have shown does not use the updateTick method. It only implements IGrowable.
-
(1.11)Custom grass not spawing Mushrooms
You would do it the same way but only taking into account the block on top and the light amount.
-
(1.11)Custom grass not spawing Mushrooms
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()); } } } }
-
(1.11)Custom grass not spawing Mushrooms
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.
-
[1.11] Getting Parameter From Recipe Exception.
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.
-
How to reopen container or replace?
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.
-
How should I package these classes?
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.
-
[1.8.9] Modify the playerlist for the client.
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?
-
Rendering TileEntity - texture map?
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);
-
Could not resolve dependencies for configuration: "forgeGradleUserDevPackage"
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.
-
[1.11] Getting Parameter From Recipe Exception.
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.
-
[1.11] Getting Parameter From Recipe Exception.
Two things [*]Your World#getEntitiesWithinAABB(...) needs to be relative to the TEs position. [*]Second what is recipe.sacrifice?
-
[1.11] Getting Parameter From Recipe Exception.
Post your whole class please.
-
[1.11] Getting Parameter From Recipe Exception.
Did you fix the if statement?
-
[1.11] Getting Parameter From Recipe Exception.
Is EntityLivingBase imported? And if it is refresh your IDE. Edit: That is also not a proper if statement.
-
[1.11] Getting Parameter From Recipe Exception.
Cant do anything without the crash we can't do anything...
-
[1.11] Getting Parameter From Recipe Exception.
World#getEntitiesInAABB(...)
-
Having trouble backporting neighborChanged method of window blinds to 1.10.2.
Create a custom method that does give you this, and call it from the vanilla neighborChanged method.
-
[1.11] Capability Synchronization.
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...
-
[1.11] Capability Synchronization.
Show where you add it.
-
[1.11] getAllInBox
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. }
-
[1.11] Capability Synchronization.
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.
-
3x3 mining pickaxe enchantment problem
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.
-
3x3 mining pickaxe enchantment problem
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.
-
[1.8]Make booleans stay after quitting Minecraft
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.
IPS spam blocked by CleanTalk.