Everything posted by Alpvax
-
How to check if material can be replaced.
Are you calling this on the server side? (Use world.isRemote to check, it will be false on the server). Where are your i, j, and k variables coming from? You should probably only create the BlockState BlockPos once. And you can use BlockState BlockPos.up (or something similar) to get the BlockPos above. You should post your full structure code (or even better a link to a git repository).
-
ItemStack item changing
Is there an error printed to the console? Is your packet registered correctly (on both sides)?
-
How to check if material can be replaced.
Are you trying to replace the block above the grass or the grass itself? You are now saying " if the block above is replaceable and the block is grass, do the following:"
-
creation de forge sans java
And before someone states that there is a non-java version of Minecraft, the stuff forge does requires advanced use of the JVM. It has been stated multiple times that forge cannot be ported to the non java version.
-
1.10.2 How to make your entity get a potion effect from damage sources.
If you don't want the random part, just delete it (everything after the && and the && itself). As you seem to be struggling with pretty basic stuff (contitions) I would STRONGLY suggest that you go and learn a bit more java and then come back.
-
[1.10.2] Crash when I'm putting this block
BlockStateContainer, not BlockContainer. You need to register all your block state variants in your block. I can't remember to method that you have to override, but look at something like wool.
-
[1.12] Registering Blocks and ItemBlocks the new way?
Actually it is fine to have it where it is, as the @SideOnly annotation will cause it to be stripped on the server side, so it won't exist to be called.
-
[1.12] How to register models for items with meta?
What is not practical about it? It is the new method for a reason, the old one was rather buggy and often didn't work correctly.
-
What is the event for zombies breaking down doors?
You should replace the zombie EntityAIBreakDoor task with your own custom version which checks for your block in range in the canExecute method.
-
Data from one block to another
You need to do a raytrace along the line of your laser and find the block that it hits.
-
[1.12] Changes to KeyBinding causing a problem
The announcement box at the top of this forum says: So to answer your question, no, there isn't currently a fix. Be patient, forge for 1.12 has only just come out, let them fix all the bugs first, it's probably already on the todo list.
-
Mod api not working
What is the API? How does the API say you should use it? Looks like you need to include the API before decompiling MC, that is a srg name, not the deobfuscated name that your IDE will display it as. Hence being unable to find it. Looks to me like Minecraft::getMinecraft or ::getInstance or something along those lines, but you should set up your workspace with the API correctly.
-
[1.11.2] [SOLVED] Cancel Render of EntityItems
Try using inheritance. Check for your item, if you want to render it, call super.doRender. If you want to not render it, just return.
-
Give LivingAttackEvent a result
I'm not quite sure why you want this. What are you trying to achieve?
-
[1.10.2] Issue with fluid JSON files
I have asked the people working on the PR to integrate the information you posted. In order to contribute, you need to create a copy (fork) of the repository, make the changes, and then open a PR between the 2 repositories.
-
Putting all players from the list to an array
List::toArray. But why do you need this? Why not just use the list? Or create an immutable copy if necessary.
-
[1.10.2] Issue with fluid JSON files
@Jay Avery Really helpful and fully descriptive post. Could you update the documentation with this information. (Doc repository here).
-
I need to learn how to do this - Auto-replace version
I don't think that is what American means, I think he wants his ModInfo class (Which is presumably used for his @Mod annotation) and his mcmod.info file to be automatically updated from a gradle build property.
-
Custom Block (Oven)
One option would be to add that slot to your recipe implementation. An alternative would be to add a wrapper around your recipe that checks the item in the slot, then passes off the matching to the wrapped recipe. That way you can take full advantage of any normal crafting recipe (shaped, shapeless, oredictionary, custom).
-
Opening a mod in Eclipse Neon
Learn java BEFORE learning to make mods. You won't get java help on these forums (or the Minecraft forums).
-
Gui Scaling
Store the positions relative to the height and width, then scale them to fit the current width when you draw them.
-
Bug with creative tab items or just me?
Why? There is already a method to set the creative tab, just call that in preInit
-
GUI with player interaction
You need to invert your isRemote check. That means it is client side, and you cannot open a GUI on a different client from your client.
-
NPE when sending packet to client
What about supporting other entities? Would it be better to use the join world event? EDIT: Clearly wasn't thinking straight, most people wouldn't try to send packets to the client who has connected as a creeper!
-
NPE when sending packet to client
I have a system which reads acquired perks from NBT, then sets the perk level accordingly. Setting the perk level could add abilities, and adding abilities sends a packet to the client to add them client-side. What would be the best way of implementing this?
IPS spam blocked by CleanTalk.