
GotoLink
Members-
Posts
2012 -
Joined
-
Last visited
-
Days Won
1
Everything posted by GotoLink
-
ItemStack#getItem()
-
[How-To]Build multiple separate projects with Gradle
GotoLink replied to GotoLink's topic in ForgeGradle
Eclipse tells you to "Build Model" before. I'd advise you to tick the "Run before" box, and add "setupDevWorkspace" to the command, between "cleanEclipse" and "eclipse". -
world.setBlock(chunkX*16 + random.nextInt(16), 100, chunkZ*16 + random.nextInt(16), null, 5, chunkZ); Blocks can't be null in 1.7.
-
Your statement is incorrect.
-
Slots and containers aren't client-side. The obvious answer is no, you can't make the player drop the itemstack on client-side.
-
1\ Check the null values first. 2\ Don't make objects if you don't use them. 3\ You can get enum values from String. 4\ String[] o = new String[j]; Is void at initialization. 5\ The "command usage" is the help given to the player. Add some meaningful info here (parameters, expected values, etc).
-
No, the core problem is initializing an object with itself in the definition. You are not supposed to call that method anyway, it is a forge hook.
-
@Override public String getAccessTransformerClass() { return null; } That is the one you want to change to LAFAccessTransformer.
-
My mod crashes. Got to do with registerIcons?
GotoLink replied to DarktStriker's topic in Modder Support
Your custom ItemBlock is crashing when accessing #getSpriteNumber, that is what the error says. -
To be added in the build.gradle file: dependencies { compile fileTree(dir:'somedirectory', include: 'somedependency.jar') }
-
Item#itemRand ? It is a Random, not a Item. You would better shuffle through GameData#itemRegistry.
-
You should clear the "counter" map in #onDataPacket, before #readFromNBT. counter.put(new int[] { id, damage }, Integer.valueOf(count)); Int arrays aren't good for keys in a map. They don't behave like you think they would.
-
Man, it is completely pointless to copy a private field if you are not using it yourself. In other words, your private fields is your stuff, not something Forge/Minecraft can touch. All in all, don't copy/paste like a printer, use some brain.
-
You need to save the result of #newEventDrivenChannel(String) or you'll never be able to send a packet on your channel.
-
[Solved] [1.6.4] Disabling the F3 menu/coordinates
GotoLink replied to Tinker's topic in Modder Support
When it comes to enum, == and #equals(Object) are equivalent, because each element of enum is implicitly static and final at creation time. The only difference is #equals(Object) is not null safe. Older versions of Battlegear posted child events of RenderGameOverlayEvent.Pre with a null ElementType. -
[Solved] [1.6.4] Disabling the F3 menu/coordinates
GotoLink replied to Tinker's topic in Modder Support
Ho, you can extend the KeyBinding class so that it can't be rebind, then set its default as F3, and register it. That should block the "F3" process, hopefully. By the way, this if(event.type == RenderGameOverlayEvent.ElementType.TEXT) is an actual fix for the Battlegear incompatibility. I wonder if i was clear enough about it. -
The first step is gradlew setupDevWorkspace. Did you change build.gradle file ?
-
[Solved] [1.6.4] Disabling the F3 menu/coordinates
GotoLink replied to Tinker's topic in Modder Support
Obviously, cancelling this event would prevent other mods in-screen texts, if they planned to add those in such way. On the Battlegear topic, you should have asked directly to the mod topic, you just are lucky I came in here. Anyway, this crash shouldn't happen if you are listening to RenderGameOverlayEvent.Pre and using a newer Battlegear version. Also, ElementType is an enum. You can do if(event.type == RenderGameOverlayEvent.ElementType.TEXT) That would work the same. -
[1.7.2] Problems with sounds.json loading sound file
GotoLink replied to Rcktmn4242's topic in Modder Support
What code are you using to trigger this ? It should be something like: playSound("gemflow:Ambient_Hit"...) -
All the "tool classes" are in the Item class now. Just override Item#getToolClasses(ItemStack) and return as much as you want. You may also have to override Item#getHarvestLevel(ItemStack, String) Block#isToolEffective(String, int) Depending on what you want the effect to be for the blocks.
-
DecoderException: Packet was larger than I expected [1.7.2]
GotoLink replied to TeNNoX's topic in Modder Support
Are you trying to load an old world ? It isn't going to work with tile entity data being corrupted. -
[SOLVED] [1.6.4] Keybinds, remove conflicts?
GotoLink replied to deadrecon98's topic in Modder Support
Don't register the keybind ? Since it is already in vanilla, you can reference it directly.