Everything posted by StarV
-
[1.12.2] Issues with getting the player in HarvestDropsEvent
Bump (If it's not okay to bump, I won't do it again.)
-
[1.12.2] Issues with getting the player in HarvestDropsEvent
Is there anything wrong with those values?
-
[1.12.2] Issues with getting the player in HarvestDropsEvent
It didn't tell me state.getBlock(), but state was and blockIn was I added Block block = state.getBlock() afterwards and it was
-
[1.12.2] Issues with getting the player in HarvestDropsEvent
Ok, looking into it, it stops after checking if state.getBlock == blockIn. I put silk touch on the shears, and Step Into went through that, but with normal shears, it checked the above, didn't check if it's silk touch, then just went to the end of the method.
-
[1.12.2] Issues with getting the player in HarvestDropsEvent
I set it at the top of the replaceDrop method. After going through the "Step Into"s, it looks like it skips over for the leaves. I tested it with the stone, and it drops cobblestone. Sorry if I misunderstand anything, I haven't really used breakpoints before except once.
-
[1.12.2] Issues with getting the player in HarvestDropsEvent
I set a breakpoint on the System.out.println("test") and ran in debug mode, it did nothing.
-
[1.12.2] Issues with getting the player in HarvestDropsEvent
Sorry it took so long to reply, I think the authentication servers went down and I'm using my account in eclipse. I changed the part of the method to this: but it didn't output anything.
-
[1.12.2] Issues with getting the player in HarvestDropsEvent
I want to check if shears are being used; if so, don't replace the drop, since the default drop of the leaves is itself.
-
[1.12.2] Issues with getting the player in HarvestDropsEvent
Edit: Forgot to include forge version: 1.12.2 - 14.23.2.2611 In my BlockDropHandlerClass, I'm trying to replace the drop of custom leaves I have with the sapling (the reason I do this is to have an ambiguous class so I don't have to define a drop in the class), but it doesn't look like is being run at all. The leaves drop the sapling every time (with a 20 percent chance, as per the method), regardless of if I use shears or not. I'm thinking event.getHarvester() is returning null, but I'm not sure why it would do that. Class:
-
[1.12.2] [Solved] When Replacing Blocks During World Gen, Some Leaves Don't Get Replaced
Thanks, that worked perfectly! (Though I did need to delay the event by a few ticks.) Now I just need to make sure it only runs once, then I should be good to go.
-
[1.12.2] [Solved] When Replacing Blocks During World Gen, Some Leaves Don't Get Replaced
Well, I'm still stuck. Will I have to end up replacing the biome decorators and put in my own trees, or is there a way to do this? It looks like trees are generating during DecorateBiomeEvent.Decorate with the EventType of TREE. Here in the genDecorations method of BiomeDecorator.class There are also some other plants that aren't working in certain chunks, such as custom tall grass, but fixing trees should fix those as well. I just don't know when to intercept the event (if I even need to.)
-
[1.12.2] [Solved] When Replacing Blocks During World Gen, Some Leaves Don't Get Replaced
Instanceof (or Class.isInstance()) doesn't seem to work. It either replaces everything with ModBlocks.superspace_cobblestone_stairs or doesn't do anything at all. I did manage to fix the variant issue with this: However, it only seems to run in certain chunks, which is odd. Do the trees generate in a different event?
-
[1.12.2] [Solved] When Replacing Blocks During World Gen, Some Leaves Don't Get Replaced
As the title says, I am currently trying to replace leaves during world gen (among other blocks). My goal is to use the vanilla ChunkGeneratorOverworld for my custom dimension, but replace blocks on generation to create a visually different but topographically the same. The other replaceBlock methods work as expected, but the leaves don't seem to always get replaced. Image attached to post for example. I believe it may have something to do with variants, but I have put in every combination of variants I could find for the leaves, and it just doesn't seem to work as intended, so I'm at a loss here.
-
[1.7.10] Entity Is Invulnerable Unless Hit With Damage Source
Yes, it is laziness. You shouldn't rely on other mods, unless you are making an addon for that mod. This mod is for a modpack on the Feed the Beast launcher, and said modpack has a multitude of mods that are not yet updated past 1.7.10, so unless I'm allowed to update all of those mods, which I'm pretty sure I'm not, then I have to stick with 1.7.10.
-
[1.7.10] Entity Is Invulnerable Unless Hit With Damage Source
All this does is perpetuate the laziness of sticking to old versions. Just update and move on. The problem is, this modpack relies on mods that are not being updated to versions further than 1.7.10, notably Enviromine. It isn't laziness, it's the inability to update at all.
-
[1.7.10] Entity Is Invulnerable Unless Hit With Damage Source
Hello. I am currently trying to make a mob that will only take damage if it is hit with a specific damage source. I have a sword that correctly deals "DamageSource.outOfWorld" damage, as I have tested it on a villager, which has 20 hit points, and the sword does 11 attack damage, and still kills it in one hit. I then have the mob, which should only take damage if the damage source is equal to outOfWorld, however I cannot hit it, as it is invulnerable to any attack, even the sword, which does work with the damage source. I believe the problem is that the entity is not registering it is being hit with the outOfWorld damage. ItemOblivionSword.class EntityOblivionCore.class I realize 1.7.10 is not supported, but this mod is for a modpack on the FTB launcher, and is for 1.7.10, and I cannot update it to further versions. I apologize if this causes any trouble.
IPS spam blocked by CleanTalk.