-
Posts
5160 -
Joined
-
Last visited
-
Days Won
76
Everything posted by Choonster
-
[SOLVED] [1.8] TESR Entity Item Rendering
Choonster replied to PlasmaBlazer's topic in Modder Support
Override TileEntity#getDescriptionPacket (called on the server to send data to nearby players) to write the data that needs syncing to NBT and return a new S35PacketUpdateTileEntity with that NBT. Override TileEntity#onDataPacket (called when the client receives an S35PacketUpdateTileEntity ) to read data from the packet's NBT. -
What you're downloading is a JAR (i.e. a ZIP archive of compiled Java code), not a RAR (a different general-purpose archive format). You've just set WinRAR as the default program to open JAR files, so it's showing you the contents of the JAR instead of executing it. Either set Java as the default program for JAR files (right click on the file, select Open With -> Choose Another App -> Java) or download the Windows installer instead of the cross-platform one.
-
Are all of your resources in src/main/resources, with assets being in src/main/resources/assets/<modid>?
-
[1.8.9][SOLVED] Extended Entity Properties
Choonster replied to DiabolicaTrix's topic in Modder Support
It's worth noting that IEEP has been deprecated in favour of the Capability system and may eventually be removed. -
If you want to fire arrows continuously but still have the player draw back the bow, it may be better to fire them from Item#onItemUseFinish and Item#onPlayerStoppedUsing instead of from Item#onItemRightClick with a cooldown. I've written an example of this here (parent class).
-
forge 1.7.10 not loading properly/ crashes while loading
Choonster replied to Hunter84834's topic in Support & Bug Reports
DrZhark's CustomSpawner is for 1.6.2, it can't be used in 1.7.10. -
You've mixed up the slash and the colon in your model's texture path. The colon separates the resource domain (your mod ID) from the resource path (the path of the texture relative to assets/<modid>/textures), the slash separates directories within the resource path (like in regular file paths). Use "firstmod:items/key" instead of "firstmod/items:key" . You should use the sided proxy system (i.e. the @SidedProxy annotation) to register your models rather than checking for the client side in your @Mod class. You should also use Forge's ModelLoader.setCustomModelResourceLocation / ModelLoader.setCustomMeshDefinition in preInit instead of Minecraft's ItemModelMesher#register overloads in init/postInit.
-
[1.8] Custom p-plate does not see POWERED state on client
Choonster replied to jeffryfisher's topic in Modder Support
When the server sends a block change to the client, the IBlockState is serialised to its ID in the packet. The ID of a state is derived from the Block 's ID and the metadata for that state. If a property doesn't affect metadata, its value won't be synced to clients. If your block requires a property that's not stored in the metadata (e.g. the property is stored in a TileEntity , derived from the other properties or derived from surrounding blocks) to render properly, override Block#getActualState to return an IBlockState with that property set. -
World#setBlockState(BlockPos pos, IBlockState newState, int flags) will send the change to the client if flag 2 is present (i.e. (flags & 2) != 0 ). World#setBlockState(BlockPos, IBlockState) calls the other overload with 3 as the flags argument, which means flag 1 (notify neighbours) + flag 2 (send change to client).
-
Eclipse Error - The method is undefined for the type
Choonster replied to Aphex's topic in Modder Support
You're trying to call AphexMod.addRecipes ; but AphexMod doesn't have an addRecipes method, AphexRecipe does. -
[1.8.9] Semi-Transparent rendering with .obj files
Choonster replied to Pythonschlange's topic in Modder Support
This Gist appears to explain the grammar of the animation state machine JSON. I haven't seen any other documentation of it. -
I've just compiled and uploaded the latest version of the code here.
-
You can run the dedicated server and a client on the same computer, I did this myself for quite a while when I last played Minecraft.
-
You could run a dedicated server and use the /setidletimeout command to set the idle timeout to 0. My mod is under the MIT License (see the LICENSE.txt file), which means you can do pretty much whatever you want with it as long as you retain the license/copyright info. To compile my mod, you'll first need to install the JDK and set the JAVA_HOME environment variable to its location. You can then download or clone my mod from GitHub and run gradlew setupDecompWorkspace to set up the workspace (this only needs to be done once) and gradlew build to build it (the compiled mod will be in build/libs). If you want to edit it, you can install Eclipse or IntelliJ IDEA and follow steps 5 and 6 of this tutorial to set up an IDE project for it. I personally use IDEA, but either will work. Like the name suggests, TestMod3 is just a test mod. I make no guarantees that it's stable or balanced (pretty much everything is creative-only), but things should generally work as they're intended to. If you do encounter an issue, please report it on GitHub.
-
Are you looking at an old version of the README? The latest MDK's README tells you to use setupDecompWorkspace and only suggests using setupDevWorkspace if you don't need the source code. Even Forge's README suggests using setupDecompWorkspace if you want the decompiled classes.
-
Actually, I just remembered that Forge recently added the TileEntity#onLoad method, which is called when the TileEntity 's block is first placed in the world and when its chunk is loaded from NBT. You should be able to override this to do the coolant calculations instead of using the flag in the update method.
-
Unless the mod provides some form of retrogen (i.e. applying world gen to existing chunks) itself, it will only generate in new chunks.
-
I don't think this is possible, since the TileEntity isn't added to the World until after it's been loaded from NBT. Instead, I'd recommend setting a flag in readFromNBT and then checking for this flag in your update method. If it's true , set it to false and then perform the load-time coolant calculations.
-
[1.8] Opening GUI displays error on console
Choonster replied to Cerandior's topic in Modder Support
You've overridden the deprecated method Block#hasTileEntity() . This method is never called, so your TileEntity is never created. You need to override Block#hasTileEntity(IBlockState) instead. I would recommend creating a Git repository in the mod's root directory (where build.gradle and the src directory are) instead of in the src/main directory. IDE project files (e.g. Eclipse's .project file) don't need to be included in the repository, they can be generated by Gradle. The $ cat .gitignore line of your .gitignore isn't doing anything and shouldn't be in there, it's a command that prints the contents a file (.gitignore in this case). I assume you copied it from this tutorial by Jabelar, it looks like he just screwed up the formatting. -
[1.8] Opening GUI displays error on console
Choonster replied to Cerandior's topic in Modder Support
Block#createTileEntity is only called if Block#hasTileEntity returns true . Upload your latest FML log and Block , Container and GuiContainer classes to Gist with syntax highlighting and link them here. -
Can you use events or reflection to modify these values?
-
I don't know. You may be able to subscribe to and cancel RenderPlayerEvent.Pre and handle the player rendering yourself, but that may conflict with other mods that do the same thing. You may also be able to use the Render Player API mod to handle your animations.
-
[1.8.9] Rendering an Entity that implements IProjectile?
Choonster replied to paradoxbomb's topic in Modder Support
The Item argument is the item to render the entity as and the RenderItem argument is Minecraft's RenderItem instance (coolAlias showed how to get this in post #4). -
Runtime patching with ASM (what coremods do) is different to (and a lot harder than) compiling your code with MCP and dropping the modified classes into the Minecraft JAR. You'll need to have a solid understand of the Java bytecode format and the ASM library to make a coremod, neither of which you're likely to learn here or in Forge tutorials. You'll need to find your own resources.
-
coolAlias has a tutorial on a backpack-like item here. If you're using 1.8.9, you may want to check out the capability system and IItemHandler / CapabilityItemHandler . You should be able to use these to store an inventory in an item without having to read from and write to NBT every time you want to access it.