Everything posted by Draco18s
-
[1.12.2] Comparing ItemStack lists
Dear sweet jebus chritie. DRY! Fek.
-
Error setLocationOfCape
Don't make cape mods. This is against Minecraft's EULA and we will not help you do illegal things.
-
Behold, a Multiline GuiTextField!
Haven't looked into it. It'd be a pain to write, though, as the selection system is based off of comparing one integer index to another integer index (selectionStart != cursorLocation) and making that work across lines would require knowing what *line* the selection start is on as well, and then doing annoying things in the render portion of the code.
-
[1.12.2] Catch and Try
You need to figure that out on your own. The part that goes inside the try is the code that may throw an exception. Presumably that would be the startup process of Minecraft.
-
Making Non-living entity
That entirely depends on what you want your entity to do. Presumably you'd want to override at least one.
-
Making Non-living entity
EntityLiving extends Entity Soo...extend Entity, too?
-
[1.12.2] Catch and Try
1) You probably shouldn't do this 2) Mostly because you can't do anything about the exceptions except display a message to the user (and then proceed to die anyway). Said message should be in the log file anyway and I'd rather teach people how to read their damn logs before I go about writing custom UI code to show them information that'll be in the log (along with more helpful information). 3) Buuut if you really really want to do this, all of the Forge mod loading exceptions are subclasses of EnhancedRuntimeException.
-
Help needed with coding magic spells, please help?
So, like, ya-know, probably, if you, like, maybe use, say, real English, with, like, fewer, uh, "filler" words? And maybe talk in specifics instead of generalities? As I told a former boss of mine, "I can code this to do anything you want, but you have to tell me what you want." "Magic spells" is basically my actual job and covers a lot of tasks and virtually every function I write is a spell of one sort or another.
-
Behold, a Multiline GuiTextField!
Oh, that can be removed. I was trying to dump some info to the debug output and having been over in C# for so long I imported the wrong thing. And didn't clean up my imports.
-
Behold, a Multiline GuiTextField!
As there have been few attempts to create this functionality (that I can find) I decided that I'd have to do this myself. And seeing as it boodly doesn't exist anywhere, I thought I'd share. It does not extend GuiTextField, though it probably could, but it was easier to just take everything that was GuiTextField and make a new class and just make changes as needed, particularly as a lot of GuiTextField's fields were private and thus not visible to a subclass (using getters and setters was frustrating, as many setters either didn't exist or had annoying side effects, such as ignoring newlines and up/down arrow keys). https://gist.github.com/Draco18s/2b02762b597e67a9b887aed241f25077 Known issues: Minimum height of 2 lines enforced (are you really going to complain?) Does not support multi-line selections (they are trouble some to handle; rendering, copying, etc) Does not feature a scroll bar (yet) Mouse wheel scrolling clamped to range that keeps the cursor within the visible text box range (technical limitation; could be overcome, but the limitation relates to automatically scrolling the cursor into range when using the arrow keys) Page up/down not supported (yet) Sometimes the selection highlight appears in edge-case situations that cause the cursor to reposition due to another (e.g. moving from one line to another when pasting multi-line content, etc) Up/down arrow cursor movement is "by column" rather than "by rendered position" as I can't be arsed to figure out where the carat should go instead (my usage will be moving to a monospaced font, where those two values are the same).
-
Custom Block Map Colors?
1) Its private because MapColor is an enum, not a class, you aren't supposed to be creating new instances. 2) Extending the enum is meaningless as MapItemRenderer does not use YourMapColor, it uses MapColor. And it wouldn't work anyway because the superclass constructor is private, not protected.
-
Make shields enchantable [1.11.2]
Register the item with the vanilla prefix. That's it.
-
Blockstates Property for a Block
(Note that you can do it the other way too: store the facing in the metadata and the color in the TE).
-
Tutorial on linking blockstates/models to blocks?
Linking works like this: When you rusts a block, you give it a registry name. This registry name is used to look up the blockstate.json file. That file points to models (optionally textures) and models point to textures.
-
[SOLVED] applyBonemeal grass/flower in radius doesn't show in client
?
-
Blockstates Property for a Block
You can't have that many states. IBlockState is still baked by a 1 nibble (half byte) metadata that can hold only 16 values.
-
Detect when a hopper extracts an item from any container.
Hoppers have so many private methods that overriding isn't feasible. Your best bet is to just scan a limited area in the nearby area for exp entities.
-
A Question About IHasModel
This. Its called cargo cult programming. "It worked for them, so it must be right."
-
[1.12] [SOLVED] Render Internal Faces
Basically what Rankshank is saying is: Quads (block faces) are inherently one-sided. If you want two-sided quads...use two quads.
-
(Stricter) How to apply an enchantment to a specific Item only.
This can be simplified to return fTest.getItem() instanceof ItemAxe There is no reason to do a boolean check on a boolean.
-
[1.12.2] arrows fired spawned don't do damage
I believe you have to call a function top set the arrow's damage amount.
-
Questions About My Mod.
The I means Interface. Do not name your class implementations starting with an I. public class ClientProxy implements IProxy
-
[1.12.2] Override Air
I don't think you are allowed to do this.
-
Questions About My Mod.
That is not how you git. This is how you git: https://github.com/Draco18s/ReasonableRealism/tree/master/src/main Both of those folders (one is code, the other is resources) should be on the same branch.
-
Coremod?
Cancel the entity's render even and render your own.
IPS spam blocked by CleanTalk.