Everything posted by Draco18s
-
[SOLVED] Wait (x) seconds *WITHOUT PAUSING GAME*
Surprise, that's what a tick handler is for.
-
1.7.10 Custom Entity Command Based AI
Don't ever store references to entities like that. If a chunk gets unloaded and then reloaded, the entity you see is not the same as the one you've saved a reference to. This is why world.getEntitiesInAABB exists.
-
[1.10.2] Drop Items after breaking TileEntity
You supply a different capability depending on the side parameter. https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/ores/entities/TileEntityMillstone.java#L166-L193
-
[SOLVED] Wait (x) seconds *WITHOUT PAUSING GAME*
That entirely depends on a race condition and exactly what you're doing. But yes, it would, eventually. With a ConcurrentModificationException.
-
Re: [Forge]Using forge to modify not just add things...
Just FYI, making a rails block that goes on the sides and bottoms of blocks won't automagically make minecarts use them properly.
-
[SOLVED] Wait (x) seconds *WITHOUT PAUSING GAME*
I did not know that. You can't, for example, interact with a TileEntity from a separate thread? TileEntities exist in the world, so no. It's called "two separate functions."
-
[1.10.2] Spawning mob in caves only
I'll look around for that option in Eclipse, but the last time I did it, it definitely didn't pause the client thread. Mildly annoying, but workable.
-
[1.10.2] Spawning mob in caves only
FYI you know there's both a client thread and a server thread and that this method is only called on the server and therefore the client thread isn't paused, right?
-
[SOLVED][1.10.2] Poison and Nausea not working
https://en.wikipedia.org/wiki/Modulo_operation
-
[SOLVED][1.10.2] Poison and Nausea not working
Gosh, I wonder what this part does. if (this == MobEffects.POISON) { int j = 25 >> amplifier; return j > 0 ? duration % j == 0 : true; }
-
[SOLVED] [1.10.2] Register Models Issue
ModelLoader.setCustomModelResourceLocation(...)
-
[SOLVED][1.10.2] Poison and Nausea not working
- [SOLVED] [1.10.2] Register Models Issue
ModelLoader in preinit. Don't use ModelMesher, there are problems with that method.- [SOLVED][1.10.2] Poison and Nausea not working
Oh, so you're adding a potion effect to the player every tick. THERES YOUR PROBLEM. Potion duration actually means something: it's a timer. Every time the potion duration is durationRemainting % 20 == 0 the effect (healing, damage) activates and is applied. If you constantly reset the potion duration then those effects never trigger.- Setting Registry Name for an Item [1.9.4]
Define "does not work."- [SOLVED] [1.10.2] Player has stopped breaking block
There was a mod for 1.7 that did this, but I can't remember the name.- Date Value for Zombie head? (Crafting help)
You have a 1, 2 at the end of your new Object[] array. You cannot have those there, what are you trying to do with those? Also, you do not need new Object[] due to the magic of varargs.- Date Value for Zombie head? (Crafting help)
The line above the "at" is the super important very special, extremely crucial line that tells you in English what the problem is.- [Solved] [1.10.2 / 1.8.9] How to register if mod is installed?
If you absolutely need to reference another mod's files, you need to put that code into a separate class, put the relevant calls into a function, and then call that function inside an Loader#isModLoaded(id) check. Ah la https://github.com/Draco18s/HarderStuff/blob/master/src/main/java/com/draco18s/ores/OresBase.java#L754-L769- [1.10] Check if block can be harvested and then harvest it without player object
"Harvestable" requires a tool to be involved. Tools can only be used by players. Ergo a player object is needed. Q.E.D.- [1.10.2] Block JSON Overlays
1) https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/resources/assets/harderores/models/block/hardore.json 2) add "shade":"false" to the elements block for the overlay textures.- [1.10.2] What's the correct way to modify the player model?
- Custom Achievements [1.10.2]
1) Create a class that extends Achievement. 2) Register an event handler to wait for the appropriate event and check to see if the conditions are met, and if so, award the achievement.- [1.10.2][SOLVED]Do I need Block.neighborChanged? How does it work?
If your blockstate depends on the world around it, that's handled by getActualState(). It shouldn't be encoded in metadata. See: Fences.- 1.10.2 - Crashing on Server Test, Not on Client Test [SOLVED]
Yeah, there's really only two proxy classes needed: The common, which does everything needed by both (SSP still uses a server!) and the client, which does things the server cannot do. - [SOLVED] [1.10.2] Register Models Issue
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.