Everything posted by Draco18s
-
[1.12.2] Obtaining correct ItemStack objects for Potion Brewing
You edited your post...to not edit your post.
-
[1.12.2] World.setBlockState() work in physical server side and not show correctly in client
Assets must be all lower case. en_us.lang not en_US.lang Also, you should include your mod ID in your unlocalized names to avoid conflicts with other mods ("gb"? really?)
-
[1.12.2] Do custom blocks render (or generate) slower (cause more lag) than vanilla?
Oh, oh yeah, that would be a problem. I would make that function match other translucent blocks like Glass and Water, where it doesn't render the interior surfaces, just the exterior.
-
[SOLVED] [1.11.2] Random leaf colors
I do it like this in one of my mods: Random r = new Random(pos.toLong());
-
[1.12.2] Do custom blocks render (or generate) slower (cause more lag) than vanilla?
Custom blocks do not take any more time to use during worldgen than vanilla blocks. There's almost always something else at fault (e.g. using a block with a TE will be slower).
-
How to add NBT data to a Mob drop(LivingDropsEvent) to display in addInformation
This is not always true: EntityPlayer player = (EntityPlayer) entity; I.e. if the entity causing the damage is not a player, your code will outright crash. This is dumb: ItemStack hand = ItemStack.EMPTY; hand = player.getHeldItemMainhand(); Just assign the return to the variable when you create it. This gets tossed in the garbage bin: This item is the one that actually gets dropped: event.getDrops().add(new EntityItem(event.getEntity().getEntityWorld(), event.getEntity().posX, event.getEntity().posY, event.getEntity().posZ, new ItemStack(ModItems.mobSouls))); Don't see it? It's waaaaaaaaaaaayyyyyyyyyyyyyyy over heeeeeeeeeeeeeeeeeeeeeeeeeeeerrreeeeeeeeeee: event.getDrops().add(new EntityItem(event.getEntity().getEntityWorld(), event.getEntity().posX, event.getEntity().posY, event.getEntity().posZ, new ItemStack(ModItems.mobSouls))); -----------------> -----------------------------------------> ----------------------------------------> -----------------------------> ------------------------^
-
[1.11] Rendering Block Color Update
Why do you implement ITickable? Is there a reason to make your TE tick?
-
[1.12.2] Changing the enchantment glint color
ASM is heavily discouraged. Mostly due to the fact that if you do not know how to ASM you should not be using ASM and this forum won't teach you. There are many, many pitfalls and some of them won't even be obvious, but which will make your mod incompatible with other mods without you being aware of it.
-
[1.12] BlockState rendering not working
I'm not seeing anything obvious.
-
[Solved] Registering a PotionType
You haven't called setRegistryName on your potion type.
-
How to check if entity is behind, in front of, leftward or rightward other entity?
You probably want something more like dotProd < -0.8
-
[1.12.2] trying to create custom tools with upgrades
This is a really complicated thing you want to do. Mineraft isn't set up to handle something like this, Tinker's Construct manages it, but it's built on top of a system that was never intended to handle it. There's a lot of steps to go through and they're not simple things. I suggest starting with an easier mod first.
-
Player Capabilities on Server
You don't need capabilities for that. An event handler for the LivingHurtEvent will work just fine. Capabilites are for data
-
How to check if entity is behind, in front of, leftward or rightward other entity?
Eh, fuck it. I can't be bothered to work out the math myself. Have this instead
-
Player Capabilities on Server
That depends. What are you trying to do.
-
How to check if entity is behind, in front of, leftward or rightward other entity?
It's called vector math. "Vec3d" stands for "Vector (size 3, type double)" and contains 3 doubles. Vectors can represent a position in space (like how a BlockPos does) or it can represent a direction (which is what LookVec does). Adding the two together can let you figure out where an entity is looking. Which means you can use that same information to figure out if one entity is in front of another or not.
-
How to check if entity is behind, in front of, leftward or rightward other entity?
You need to use vector math. And the entity's LookVec
-
[1.12] BlockState rendering not working
If that is your blockstate json file, it is incomplete, lacking all of the variants it is supposed to be specifying. Also, there should be an error for missing models, which you have not included.
-
[1.12.2] Entity AI not attacking (methods not getting called)
There are also mutex bits, which control if two tasks are allowed to run together (regardless of priority)
-
How do i make this item work
It's still going to crash the dedicated server. Also, stop using the model mesher. Use ModelLoader.setCustomModelResourceLocation and do it inside the ModelRegistryEvent.
-
Which Event called when a item move into a container slot
No. You use Capabilities to store information on the player.
-
How do i make this item work
Your registerRenders method is not called from anywhere. Also, it will crash the dedicated server.
-
PropertyDirection Error
Ah, you're right. I saw the super call (with a base class of Block, which generally doesn't do much), but I didn't see that it called BlockPistonBase.getFacingFromEntity.
-
PropertyDirection Error
Are there vanilla blocks that do this? How do they do it?
-
[1.12] java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.Integer
Capabilities are not automatically synced, as there may be capabilities that the client does not need to know about.
IPS spam blocked by CleanTalk.