Everything posted by Draco18s
-
Does make sense going over 20 armor points?
Well, the other half is a complex formula (the part inside max(...)) that means that the more damage you take at once, the less each point of armor counts. But yes. The maximum damage reduction you can get is 80% Also, hit points are a float, meaning you can (and will) take 0.01 damage in certain circumstances (death by a thousand tiny cuts).
-
Does make sense going over 20 armor points?
Well, yes, there is a maximum amount of damage reduction. That's what min(...) does.
-
[1.12.2]TileEntity for harvester block
Set a breakpoint and run it in the debugger. Figure out what it's not doing that it should be.
-
Does make sense going over 20 armor points?
The damage formula is damage = damage * ( 1 - min( 20, max( defensePoints / 5, defensePoints - damage / ( 2 + toughness / 4 ) ) ) / 25 ). You can figure it out. Toughness is 0 for all types of (vanilla) armor except diamond (which has 2). Defense points is the number of armor displayed in the UI.
-
[1.12.2] Changing general attack speed without specific item
If the iattributeinstance is null, then get the modifier from the iattributeinstance...
-
[1.12] Dropping 2 Items when breaking a block
BlockFlowerPot line 433. It says: /*============================FORGE START=====================================*/ And then some functions.
-
[1.12] Dropping 2 Items when breaking a block
The fact that the chest being not-empty causes the undesired behavior, we can look at your code and find that you have a conditional for exactly this case: if (!tileentityiubertable.isEmpty()) { Therefore, this code is responsible for dropping one of the two items. spawnAsEntity(worldIn, pos, itemstack); Oh, look, it does. However we know that this is also the version we want to drop therefore it must be something else that's causing the empty copy to drop. Hmm. Empty chest...wait, we get one of these when the chest is empty too! There must be a line that is probably responsible and outside that if-block. Getting a TE...no Casting a TE...no Only one other line: super.breakBlock(worldIn, pos, state); This must be responsible. Unfortunately as you did not include your whole class, I cannot be sure that the parent class is not just Block.
-
[1.10.2] Change item texture based on NBT values
TiC almost certainly uses multiple pieces to create their items. e.g. there's a wooden shaft, a metal blade, and a leather grip. So the item model is actually 3 models combined. They only register 3* images to get baked into models, then the item uses all three when created. Also, TiC is on GitHub: https://github.com/SlimeKnights/TinkersConstruct *Obviously there are more, the "3" in this context is the example three.
-
[1.10.2] Change item texture based on NBT values
Those are both ModelLoader tasks. Which bake models. Which you would still have to do. So yes.
-
[Fixed] Help with metadata blocks and events
Assuming that getItem() returns the Item and not an ItemStack... if(event.crafting.getMetadata() == whatever) { }
-
Idk
int totalCoins = 0; totalCoins = totalCoins + coins; Wot
-
[1.10.2] Change item texture based on NBT values
You would still need to register each image so that it can be baked into a model.
-
[1.12.2] Changing general attack speed without specific item
Create and use your own UUID.
-
How do you remove crafting recipes, specifically anvil recipes?
Anvil? Don't know, never tried.
-
How do you remove crafting recipes, specifically anvil recipes?
Removing a crafting table recipe is easy: Subscribe to the Register<IRecipe> event and (casting the event's registry to IForgeRegistryModifiable) simply remove the desired recipe from the registry via its ResourceLocation Fiddling with the anvil is harder.
-
cps
What version are you working with?
-
cps
Press F3 on your keyboard. Magically, Minecraft displays both of those things for you. That said, it doesn't display a "clicks per second" counter, but I don't even see the point of one. It's either going to read 0 (no clicks this second) or 1. MAYBE you'd get a 2 once in a while. Something something spam-clicking during combat something something completely pointless.
-
[1.10.2] [SOLVED] "In" as a suffix in given parameters?
Well, obviously...
- How to display fps
- How to display fps
-
[1.10.2] [SOLVED] "In" as a suffix in given parameters?
Oh I get why it's done, Lex. Minecraft has its limitations because of the decompile and deobf process. All I meant was that I, as a coder, wouldn't have chosen those names for my own functions.
-
[1.10.2] [SOLVED] "In" as a suffix in given parameters?
That only makes me think of How to Write Unmaintainable Code
-
[1.12] Cannot add ItemStack to Chest
https://github.com/Excaliburns/ModPractice/blob/master/src/main/java/items/HuskItem.java#L52 If (not client) then...
-
[1.12.2] Making a colored planks block
Well....let's see here... matches returns....if what's in the crafting grid matches the recipe getCraftingResult returns....the result of the recipe getRecipeOutput returns....the output item of the recipe (this will be the basic item with no knowledge of the grid, but you need to return something) getRemainingItems returns....the items remaining in the crafting grid after the result is taken canFit returns....if the recipe fits within a given grid (2x2, 3x3, etc) Look at some existing implementations to snaggle most of those methods already implemented. All you'd have to do is fluff up the getRecipeOutput method to grab the metadata you want from the items in the grid.
-
[1.12] Cannot add ItemStack to Chest
(On the single player integrated server, anyway)
IPS spam blocked by CleanTalk.