Everything posted by Draco18s
-
Random item?
You need to create your own IRecipe implementation.
-
Over-riding the generated biome map with a static one
Yes, it is.
-
May be deleted for uselessness, but this path isn't working
HardLib is a "main mod class." I could have done "this" as well. And because I need to get is class loader. From which I then call getResourceAsStream() The byte array holds data between the buffer reader and the buffet writer. Lines 62 and 64. The buyer writer in this case being to a normal File object.
-
[1.12.2] [Solved] Changing max health based on armor set
Funny. I thought I said that.
-
May be deleted for uselessness, but this path isn't working
You can't do it like this. Even if you did get it working, it wound fall the moment you compiled your mod into a jar because then your assets don't exist as files on the drive, but contents of a zipped file. This code may help: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/CogHelper.java#L56
-
Capabilities 1.12
This is nonsense. You need to return an instance of IMana
-
[1.12.2] Tile Entity wont update on restart
@diesieben07 : do we have a common issue for this yet?
-
[Solved] [1.12.2] Can't get the block name
What are you using this information for?
-
[Solved] [1.12.2] Can't get the block name
Why do you care?
-
[1.12] How to use LayerRenderer, ModelBiped, etc.. for render a custom item who will float beside the head of the player
Please do not scatter bold text like that, it actually harms the readability of your post.
-
1.12.2 isSneaking() not working
ItemStack#isEmpty does not work on null stacks. It will crash.
-
Replace blocks while the world generates
For reference, you can scan an entire chunk and replace blocks in about 400,000 nanos (0.4 ms). You don't really need to worry about time slicing.
-
[1.12.2] Get Icon Image of an Item
I think he means the baked item model. Which wound be the IBakedModel instance.
-
[1.12.2] Get Icon Image of an Item
Items have models, and models have one or more textures.
-
Replace blocks while the world generates
Just to check: How are you storing these additional properties?
-
[Unsolved] Problem with ChatEvent
someUuid == otherUuid
-
[1.12.2] Entities inside of fluids
Entities swimming in water is handled by the entity class(es) and checks specifically for Material.WATER
-
[1.12.2] [Solved] Changing max health based on armor set
Again, you check to see if your data contains the player before adding the modifier (and if they're not in it, you don't add the modifier). You also don't do a damn thing with hasHealthBoost
-
[1.12.2] [Solved] Changing max health based on armor set
That had nothing to do with what I said, at all. Imagine a player equips your armor set for the full time. They will not exist in your playersWithSet collection.
-
[Solved][1.12.2] Properties and Blockstate json
Note: IStateMapper / StateMapperBase are client side only.
-
[1.12.2] [Solved] Changing max health based on armor set
I just want to look at this section for a bit: Boolean hasMithrilSet = ArmorMithril.isFullSet(player); if(playersWithSet.contains(key)) { //do stuff } else if(hasMithrilSet) { playersWithSet.add(key); } Equipment changed! Player has a full set! We have no idea who this player is! Store player in list! Done! Wot.
-
Dynamic changing of Items/Blocks
You really should dig through the Item class at some point. public int getMaxDamage(ItemStack stack) { return getMaxDamage(); } ItemStacks can store data beyond just what Item it represents, but also capabilities and NBT data, all of which is accessible in the above Item method.
-
[Solved][1.12.2] Tile and Block Material
Blocks are singletons, there exists exactly 1 instance of your block class. All of your blocks would share a reference to the singular TE. You cannot do this. @diesieben07 candidate for common problem.
-
[Solved][1.12.2] Tile and Block Material
This: https://gist.github.com/Terrails/60cb566ea175bef4ca92ff5bd246bdb5#file-gistfile1-java-L1 Will never work. You want to get the material for the block based on its state, then you need to provide that state information via getActualState
-
[1.12.2] [Solved] Changing max health based on armor set
I take it this was too hard to arrive at: player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).applyModifier(new AttributeModifier(uuid, name, 2, 2)); UUID is a unique UUID (you can create one at random, then save it as a hardcoded value). name is just whatever you want to call it.
IPS spam blocked by CleanTalk.