Everything posted by Draco18s
-
[1.7.10] Default Stone Slab gets put in Hotbar instead of custom Slab
Override createStackedBlock for your Block class.
-
What is ClientTickEvent doing?
No need for a tick event here, Potion class has isReady and performEffect methods which will be called. I meant the visual display next to your inventory where it contains a timer (the "duration"), not the effect.
-
[1.9] Custom sounds - Not sure how to specify the location
world.playSoundEffect(...) ? Also, have you even looked at how the Jukebox works?
-
[1.8.9] Sending a tileentity (with IInventory) through a packet
Integers are a fixed size. byteBuffer.writeInt(value)
-
What is ClientTickEvent doing?
It's a client-side tick notification, it can be used to keep things like potion durations updating correctly without having to wait for an update packet from the server, keeps the sun/moon/stars sliding smoothly across the heavens, etc. You'll notice during periods of extreme lag that these values keep updating even though they're wrong and will "snap" back to the correct value when an update packet from the server does finally arrive (yes, even single player!). Or at least, that's what vanilla does in between Phase.START and Phase.END, what a mod does with it is up to the mod, but that gives you an idea of the kinds of things that occur.
-
Rotating a texture of a block
0) Why are you still on 1.7.10? 1) You know that with just a block you can't rotate the top face, yes?
-
[Solved] Adding custom crops to minecraft 1.8.9
Show your main class.
-
[1.8.9] Sending a tileentity (with IInventory) through a packet
How to send a TE through a packet: packet.Encode( TE.posX, TE.posY, TE.posZ );
-
[1.7.10] Own class can't be transformed with ASM?
Read: What are you adding to the method signatures and why?
-
An ItemStack of cake
Cake does not exist as an itemblock, you want Items.cake Mojang removed the "technical" block items that should never be in you inventory (like unlit redsome torches)
-
Ore dictionary custom furnace recipes?
I never do my recipes in init, I always do them in postInit for precisely this reason. That and IMC messages.
-
Ore dictionary custom furnace recipes?
What I'd actually do is in the addRecipe(string input, ItemStack output) method is get the OreDict stacks there and call addRecipe(ItemStack input, ItemStack output) so you're not looking up the OreDict every time the ingredient is checked.
-
[1.8.9] GuiButtons constantly selected and can't be clicked
Well, on your Git repo your init is not calling super. Do that and nothing but that, then come back here.
-
[1.9] BakedQuad texture on wrong face.
Why the hell do you need 22,821,109,907,456 states? That's more baked models than the game even supports.
-
|1.9]ISBRH replacement
That effect can't be achieved without post processing. (And for reference, the effect is called "Bloom")
-
[1.8.9] GuiButtons constantly selected and can't be clicked
Why the fuck are you calling initGui() from drawScreen() ?
-
Ore dictionary custom furnace recipes?
You will need a way to add a recipe taking in a string argument, instead of an item stack, and getting all of the item stacks from the OreDict that are registered with that string. OreDictionary.getOres(...)
-
[1.7.10] Custom Furnace With New Recipes?
Someone is going to inevitably ask why you're still on 1.7.10, but anyway. Go look at what the furnace and FurnaceRecipes(?) does. Single input, single output recipes are really easy to make. It's essentially just a dictionary of Item In, Item Out.
-
Using AABB to get a entities
findNearestEntityWithinAABB will work, provided that the volume is actually large enough to contain anything. Anyway, looking up my old artifacts code, the method I used was rayTraceBlocks_do_do which did hit entities. https://github.com/Draco18s/Artifacts/blob/master/main/java/com/draco18s/artifacts/network/PacketHandlerServer.java#L160
-
Using AABB to get a entities
Raycasting can detect enemies, sure. I don't recall offhand which method needs to be called, there's at least two.
-
Replace a block after it's broken
Also doesn't help that its my own block doing it.
-
Using AABB to get a entities
World#doRaycast
-
Using AABB to get a entities
Yes, and how large of a volume will the AABB between pPos and tPos be?
-
1.9 exposing classes through an api
Unless you're Rieka. Or unless there's a good reason, in which case: 1) Mark them @Deprecated for at least 1 version and throw a warning to the console/log 2) Do your best to handle the old way if you can (e.g. if a method name, location, or paramters changed, create the new method and have the old, deprecated version point to it with a best-guess default for new parameters). I've got a few of these, from when I went "this class is handling more than it should be, I'm creating a new API interface for these" and moved them. https://github.com/Draco18s/HarderStuff/blob/master/src/main/java/com/draco18s/hardlib/api/interfaces/IHardRecipes.java#L58-L66
-
[SOLVED] [1.7.10] config file not saving changes
comment this: if(GlistreMod.config.hasChanged()){ Because fuck it, if it hasn't changed, save it anyway because who's going to notice.
IPS spam blocked by CleanTalk.