Everything posted by Draco18s
-
MC1.10+ drops from leaves
Use your debugger and figure it out. If the variant isn't the variant you expect, what is it?
-
[Pull Request] Fix Conflicts
I think you have to try and merge the changes you made with the changes on the current Head locally.
-
MC1.10+ drops from leaves
Oh. Try this. ((BlockBOPLeaves)BOPBlocks.leaves_2).variantProperty This is also why I store my block variant properties in an API location, not only so I don't need to cast things, use static fields inside my classes (which wouldn't be present in the API), or other weirdness.
-
[1.11] Many Block Methods are Deprecated.
Deprecated methods are fine to override but not to invoke.
-
MC1.10+ drops from leaves
Can you post the code that defines the variant? e.g. I have this: public class Props { public static final PropertyEnum<EnumOreFlower> FLOWER_TYPE = PropertyEnum.<EnumOreFlower>create("flower_type", EnumOreFlower.class); }
-
[1.10.2]Understanding Block States
getActualState Check out how vanilla walls work.
-
[1.11] Custom Compass - Point to Nearest Block of Certain Type
Fixed a typo, stay -> start. The event handler takes 3 events (effectively, save load and generate) and passes it off to the data structure that holds the information so that it cansave to disk, read from disk, or create data from the world. Save/load is just NBT writing. But there's also an Unload event so you can remove data from the data structure when the associated chunk is no longer in memory (avoiding a memory leak). You'll also need lookup ("get nearest") and modify ("block permanently removed") methods.
-
[1.10.2]Understanding Block States
Oh I know what's wrong. Ok, so by specifing the parent as cube_all there needs to be a final non-reference value for "#all" but what you specified is this: "all": { "texture": "#texture" } "#all" now points to "#texture" and "#texture" points to.......nothing. Unable to resolve reference.
-
Add a layer of texture to item depending on meta
Items don't have blockstates, although you can use the system for it. When I wrote my code I was writing this in my client proxy (things have been refactored to make it a common object that all of my dependent mods can then access), but this is what I did: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/client/ClientEasyRegistry.java#L86 The interface IMetaLookup was just a custom interface I apply to all of my variant enums so that I can convert between variant and metadata and back. You should already have those methods, I just encapsulated them into a common interface.
-
MC1.10+ drops from leaves
You can't do ".this" as it makes no sense. You need to get a reference to the actual block object. Say.... BOPBlocks.leaves_2.variantProperty
-
[1.11] Custom Compass - Point to Nearest Block of Certain Type
You'll also want to save and load the data. Feel free to take a look through this: https://github.com/Draco18s/ReasonableRealism/tree/master/src/main/java/com/draco18s/flowers Start with the event handler. My data is more complex than yours, but functions similarly (you will also want the vanilla generation events, not COG's).
-
[1.11] Custom Compass - Point to Nearest Block of Certain Type
If they're being placed into the world as part of worldgen and there aren't that many of them, they're easy to keep track of in a separate class: as one generates, push its location to a list of known. When destroyed, remove it. If they're preset (i.e. always at 123,45,987) then you can know where the nearest is before it's even been generated. Vanilla sort of does this with end portals, though the code is stupidly complex.
-
[1.10.2]Understanding Block States
By the way, if your model is that simple, why are you using it? Why not make your blockstate tell the game to use block/cube_all?
-
[1.11] Custom Compass - Point to Nearest Block of Certain Type
The problem with this is: How far away are you willing to search? Or are you willing to track the blocks' positions another way?
-
Potion Effects Applying Oddly (Entitythrowable.) 1.11 (solved)
((!EntityPlayer)result.entityHit) The hell? What are you trying to do here? An anti-cast? Also, that's not how you check for "not an instance of." http://stackoverflow.com/questions/9068150/best-way-to-negate-an-instanceof
-
Help creating custom events
That's not how extending works, so no.
-
Registering entity with new resource location (solved). [1.11]
While true, the point is he doesn't need it. At all. Ever. The fact that he had it was to solve a problem with not knowing how to create resource locations, so he did it there, which was the wrongest place.
-
Custom Entity With Skills
I was being sarcastic at gurujive, not you. I was telling him he was being dumb because he was suggesting Solution-A which won't work for Problem-B (he can't even get his own entities working properly, so he's really got no experience helping other people with entities).
-
Registering entity with new resource location (solved). [1.11]
You have two things named "rsrcl" and your code doesn't know which one you want. Seriously, you're passing an object TO the method, you don't need the static final one.
-
[1.10.2] Special effect on button press.
When the key is pressed: tell the server The server then checks if the player is wearing the armor. And if so, activates the effect.
-
Can't register more than one entity? [1.11]
And go learn basic programming. You're literally flailing about at random and don't know what anything does.
-
setEntityState
Pretty sure it's DataWatcher stuff.
-
Can't register more than one entity? [1.11]
https://en.wikipedia.org/wiki/Scope_%28computer_science%29
-
Custom Entity With Skills
Yeah, that's totally going to work for a sword.
-
BlockPos.MutableBlockPos
That chunk of code probably doesn't even need mutable blockpos objects. But yes, it looks like you are correct.
IPS spam blocked by CleanTalk.