Everything posted by Animefan8888
-
[SOLVED] Safest way to check if an entity is the game's player
Two things Minecraft is a client only class. And either Minecraft.getMinecraft is returning null and which means you are calling this too soon or Minecraft#player is null and which would also mean you are calling this too soon.
-
Set fly to true
isFlying != can fly. You need to set allowFlying to true.
-
[1.12.2] Help with custom crafting table & chests (using wood OreDict)
What you are going to have to do, is after all your recipes have been added, you will need to remove and re-add the recipes to the registry.
-
[1.12.2]block problem ?
He isn't using any static initializers.
-
[1.12] Stuck adding IRecipe
The recommended way of adding recipes is with a JSON, why would it be too many? Create them with code if that is easier.
-
[1.12.2]block problem ?
At the top of the page on this website or this link or even a google search.
-
[1.12.2]block problem ?
Use the registry events, they are documented in the forge docs.
-
[1.12.2] Open container from inventory
Do this instead when you initialize your ICapabilityProvider and its IItemHandler.
-
[1.12.2] Open container from inventory
From the code I can see you never load the ItemStacks into the IItemHandler.
-
[1.12.2] Open container from inventory
A Gui and Container should do this automatically, but instead of instantiating the inventory from the nbt for the container. You should instantiate an IItemHandler capability based on the nbt.
-
[1.12.2] Make Custom Ridden Mob Jump
I'm not sure if it is necessary. However a good way to check would be to test your mod on a dedicated server. And it may not work all the time.
-
[1.12.2] Make Custom Ridden Mob Jump
Use a key press event and send a packet if the player is riding your entity and then make it jump.
-
[1.12.2] Make Custom Ridden Mob Jump
Make "jump power" a constant and use the jumping code, aka modify the code to fit your means.
-
Custom lamp problem 1.12.2
Check out the forge docs on BlockStates.
-
[1.12.2] Open container from inventory
Are you even adding your storage data to the ItemStack?
-
Canceling re-equip animation but only for tooltip updates?
Compare the NBTTag of the old stack to the new stack.
-
Proper way of getting specific item
Oh god, how did I not see that XD.
-
Proper way of getting specific item
new ItemStack(Items.DIAMOND)
-
[1.12.2] Open container from inventory
Using Item.getItemFromBlock will return the ItemBlock for your block so long as it has been registered.
-
PlayerEvent.PlayerLoggedInEvent doesn't work
You can register the class if your methods are static, though I agree the annotation is neater.
-
[1.9.4] Fluid haven't texture!
Post the logs.
-
[SOLVED] Falling Blocks?
So the problem isn't having a class like BlockBase, but with how a lot of people are using it. Well of course it does. ?
-
[SOLVED] Falling Blocks?
I don't see this being ineffective or in any way counterproductive. It might need a rename of sorts, maybe "DecorativeBlock". Seeing as how it is useful for simple stuff such as Solid Blocks IE a solid block of steel. But it is more simply a way to cut down on writing similar code.
-
[SOLVED] Falling Blocks?
Well if you want the functionality of BlockFalling you have to have the code in it apply to your block. Which normally means to extend it, but you also want the functionality of your BlockBase class. So here your solution would be recreating the constructor to simulate your BlockBase while extending BlockFalling or recreating the functionality of BlockFalling and extend BlockBase. The first one being the easiest. Ultimately a Java problem not a forge problem.
-
[SOLVED] Falling Blocks?
Learn Java. Constructors and supers are basics of polymorphism.
IPS spam blocked by CleanTalk.