Everything posted by Alexiy
-
[1.7.10] [SOLVED] TileEntity isUseableByPlayer
Is it so hard to run in debug mode and see what variable is null?
-
How would I check for a type of block at a specific location?
Rather than using unlocalised name, use identifier from Block.blockRegistry.getNameForObject(). Chest's must be "minecraft:chest".
-
Saving A ForgeDirection[] to NBT [SOLVED] [1.7.10]
This: public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); for (int i = 0; i < connections.length; i++) { this.connections[i] =ForgeDirection.getOrientation( nbt.getInteger("connections_" + i)); } }
-
Machine doesn't save inventory contents when reloaded [1.7.10]
I've realised I missed the "markDirty" thing. All my tile entities were saved only on auto-save 8|. So remember kids, markDirty() on the server.
-
[1.7.10]How can I replace a block with air and not have the inventory dropped
What if you call invalidate() on the Tile entity before setBlock?
-
[1.7.10]Containers and Guis[Solved]
You need to add this to tile entity: @Override public Packet getDescriptionPacket() { NBTTagCompound tag = new NBTTagCompound(); writeToNBT(tag); return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, tag); } @Override public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { readFromNBT(pkt.func_148857_g()); } This is supposed to solve not saving, because it synchronises tiles.
-
[1.7.10] Loading other mods in eclipse
You've got to use deobfuscated versions of mods. Some people provide them, some don't. If not provided, you can deobfuscate mods using Bearded Octo Nemesis. There is an article on that, try searching.
-
RenderGameOverlayEvent help?
Try GL11.glEnable(GL11.GL_TEXTURE_2D) before drawTexturedModalRect.
-
[1.7.10] Gui setting variable in Tile Entity?
In "onDataPacket" get the world from "MessageContext ctx"and then you can get the tile entity from coordinates you have to send additionally.
-
[1.6.4] Trouble With Opacity/Backface Culling
I don't understand this - "The issue is that I can see the sides of other blocks of my glass through one of my glass block"
-
[1.7.10] Adding Player Inventory slots to GUI screens
You must return a container in getServerGuiElement. Also, remove if(world.isRemote) in onBlockActivated.
-
Run configurations
Somebody, show me run configurations for Intellij because neither gradlew idea or eclipse generate one.
-
Learning Java/Forge API?
Well, many of qualitative mod makers are already software developers. They have the knowledge and the experience. Others are self-taught (including me), they have been following various tutorials at MC forum and forge wiki. Knowing java at intermediate level is a prerequisite for modding, and recently, Gradle too. Once you know Java well, you can start from simple things like adding blocks and items. Reading other mods' source helps much. Can also ask non-noob questions at Forge chat.
-
Set up mods in Intellij with dependency on a library
I just started porting mods to this 1.7 Gradle things. What I have is 2 mods that use stuff from my shared library. Intellij can't have multiple projects open, right? How do I set it up so I have 2 mods and they see that shared library?
-
[How-To]Build multiple separate projects with Gradle
This looks complicated at a first glance. So now we have to learn Groovy if we want to understand what gradle does and how to configure it? And where I can see what all those tasks do exactly (source)?
-
[SOLVED][1.6.4] Can't get GameRegistry.findItem to work :/
Probably line "public static Item thaumResource = GameRegistry.findItem("Thaumcraft", "ItemResource");" is being executed before Thaumcraft registers the item. Make your mod load after thaumcraft and see if it fixes.
-
[1.6.4] Making a mod NEI compatible?
What does the crash say?
-
[1.6.4] How to make a GUI
GUIs are made by extending GuiContainer or GuiScreen. If your GUI will have slots, extend GuiContainer; otherwise, extend GuiScreen. See tutorials on the wiki - http://www.minecraftforge.net/wiki/Category:Tutorial
-
[1.6.4] Making a mod NEI compatible?
One must add dev. versions of Codechickencore and NEI to referenced libraries. Is this what you did?
-
world.setblockat stuff
From my experience, there is no method which doesn't notifies neighbours. You'll have to copy setBlock method and delete code which does notifications.
-
[ 1.7.2 ] Check if another mod is installed
This is exactly as I do. And consider dependencies - after, required-after...
-
Access to other mods?!
This is resolved by Loader.isModLoaded(ID). ID is the @Mod's modid String.
-
If someone made a Java implementation of multitile..
If someone made a Java implementation of multitile/multipart, would it be included in Forge?
-
[SOLVED]Rendering Block (that has a custom model) In Inventory
What version? In 1.6 to render block in inventory customarily (or customly?) one has to implement ISimpleBlockRenderingHandler, its method renderInventoryBlock() and return true in shouldRender3DInInventory().
-
[1.7.2] Adding Tooltip to custom block
Use ItemToolTipEvent.
IPS spam blocked by CleanTalk.