Everything posted by Draco18s
-
Making a minimap
Would probably help if... 1) Didn't use MAP.flush(); 2) Didn't check for changes every tick (seriously, scanning 118125 blocks every tick is dumb)
-
Voice Recognition
Can it be done? Absolutely. Can you do it? Well...do you have code that already recognizes speech?
-
[1.8.9] Hard Time with rendering
All of your verts are the same. You've drawn a 0-size...triangle.
-
Making a minimap
That's because you're creating 118125 BlockPos objects and 118125 IBlockState references every tick, all of which need to be garbage collected.
-
[SOLVED] [1.7.10] Wrong tile entity updating
public class Telescope extends BlockContainer{ TileEntityTelescope temb; Don't do this. Learn what singletons are.
-
Making a minimap
If it crashes, include the line that it crashes at.
-
[1.7.10] NEI + My Mod
Basically you need to provide a class which extends TemplateRecipeHandler that will take in either an output item (and reconstruct the recipe) or take in an input, and list all recipes that contain it. I've only got 1-to-1 recipes myself, but this should give you an idea of what the class looks like: Then you need to register it with NEI: TemplateRecipeHandler handler = new SifterNEI(); API.registerUsageHandler(handler); API.registerRecipeHandler(handler); API.registerGuiOverlay(GuiContainerSifter.class, "sifter"); API.registerGuiOverlayHandler(GuiContainerSifter.class, new DefaultOverlayHandler(), "sifter");
-
[1.8][UNSOLVED] Help Me! Crash Report My Forge Modding In Custom Drops!!!
http://stackoverflow.com/questions/218384/what-is-a-null-pointer-exception-and-how-do-i-fix-it
-
Making a minimap
While using the player's current Y position seems like a logical choice, that map is utterly worthless to me, as a player. In looking at it and looking at what's in front of the player in that screenshot, I have literally no idea where I am or what direction I'm facing.
-
[1.8][UNSOLVED] Help Me! Crash Report My Forge Modding In Custom Drops!!!
1) Why do you subscribe to the event multiple times? You know you can check for multiple blocks at once, right? 2) Why do you check to see if the player is holding a stack, or not holding a stack, and then do the same thing regardless? (for two of those handlers)
-
Texture of a sphere
Your image hosting site is terrible and not serving the image.
-
Making a minimap
GetMapColor() returns a predefined color (one of 16, IIRC although there are some duplicates). The more advanced maps go "this color is useless" and examine the block's actual texture and make a "best guess" average color for the block.
-
[1.8.9]How to tell when an item is removed from the players inventory?
Very good point. Not to mention every other mod that takes the item out of the players inventory. Is there anyway to tell when the items stacksize has been decreased?Otherwise I may have to use a different approach with this whole thing but for now il continue on. As I said, there is NO event, NO notification, NO function that is called when this occurs. The item stack's direct property object stacksize is decremented. You can't even ASM that.
-
[1.8.9]How to tell when an item is removed from the players inventory?
When you're done, try shoving your item into an Item Frame. Good luck solving that.
-
[1.8.9]How to tell when an item is removed from the players inventory?
ItemDropEvent and no.
-
Third Parameter in DrawScreen method
Why do you need a non-zero number of partial ticks to draw an icon?
-
[1.8.9]How to tell when an item is removed from the players inventory?
You can't. No. No, not even then. No, you can't. Its impossible. There are so many ways an item can leave the player's inventory that you cannot know that it even has as some of them don't fire any sort of event or notification to any other system that it has removed the item.
-
[1.8.9] Texture doesn't display on block
- [SOLVED][1.8.9] Crop not dropping seeds?
If you want to use the same class for multiple crops you'll need to set the properties after both the seed and crop are instantiated.- [1.7.10] [Solved] Thermal dynamics energy pipes not returning how much energy they got
They told you what to do: Stop using IEnergyHandler.- [SOLVED][1.8.9] Crop not dropping seeds?
The last two lines in the ModItems and ModBlocks are important here. We need to know what order those are called in. Because you have them as part of the static class initialization, rather than as a method, we cannot know what order they are called in nor can we change that order. Secondly, you do this: ItemPPSeed tomatoseed = new(ModBlocks.tomatocrop); BlockPPCrop tomatocrop = new(ModItems.tomatoseed); Each of those lines is referencing the other ONE OF THEM WILL BE NULL! So you're storing null in a private field. There's a much better way of doing this. protected Item getSeed() { return ModItems.tomatoseed; //magic }- Is there a list of overridable functions on the Block class?
Yes! In Eclipse, hover over the class declaration of Block and then click the little green button in the tooltip that pops up (aka "Jump to Definition") Magic! Or you can do: Block b; b. And another tooltip will pop up called the intellisense autocomplete which will list every god damn method and property available for that object. Events, by the way, are not functions. They're events and you need to write an Event Handler to handle them (which is a class containing methods). Search Google for "Forge Events" and the first link will be a link to the wiki called "Forge Event Reference."- exporting mod .. having some problems.
...Minecraft Development Kit- [1.8.9] Overriding Vanilla Block Properties
Hand doesn't have a harvest level. There's simply a check to see if the player is allowed to harvest a material without needing a tool. If so, the block is always harvested, regardless of how the player broke it (hand, wrong tool, correct tool, or with a random item), and is harvested with a x5 speed bonus (this is why it takes so long to break stone by hand, even though Stone and Wood have the same hardness). Setting the harvest level to 0 (or higher) is for the tool-speed-multiplier lookup. This is why digging with a wooden shovel is faster than by hand but not by much: dirt can already be harvested by hand and already benefits from the "can harvest: x5 speed" bonus, whereas using a wooden shovel adds another x2 (taking it from 0.9 seconds to 0.45 per block).- [1.8.9] Overriding Vanilla Block Properties
Do note that a harvest level of 0 (wood tools) is not sufficient to prevent blocks from being dropped when mined by hand. - [SOLVED][1.8.9] Crop not dropping seeds?
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.