Everything posted by Choonster
-
How to code a mod that's a dependency?
Can't you just package it as a regular mod and have other mods add it as a dependency manually or through Maven? I'd suggest using the new ContainedDep mechanic to package your mod inside other mods, but it doesn't look like contained mods can be coremods (at least not when they're first extracted).
-
[1.8]how would I run a command with my mod
Use MinecraftServer.getServer to get the server instance, MinecraftServer#getCommandManager to get the server's command manager and ICommandManager#executeCommand to execute a command.
-
[1.8]Custome door 3x3 make the villagers open and close the door
Villages and villagers appear to treat any block that extends BlockDoor and uses Material.wood as a valid door. The EntityAIOpenDoor AI task used by villagers to open doors uses BlockDoor#toggleDoor to open and close doors. If you want your door to be used by villagers, make sure it uses Material.wood and is opened/closed by BlockDoor#toggleDoor .
-
[1.8.8/1.8.9] Help with Forge blockstate transforms
Bump again. Still having the same issue finding the right transformations. This is what it looks like in third person with no transformations. This is what it looks like in third person with transformations.
-
Droppers not working?
It looks like Fry just committed a fix for this, so it should work in 1.8.9-11.15.1.1730 once that's been released.
-
[1.8] Move the player visual with keyboard?
Like I said, Minecraft#thePlayer (i.e. the instance field of Minecraft called thePlayer ) contains the client player. Use Minecraft.getMinecraft() to get the Minecraft instance.
-
[1.8] Move the player visual with keyboard?
I only needed to check the entity because Block#onEntityCollidedWithBlock is called when any entity collides with the block, not just the player. I needed to check the side using the World#isRemote field because the method is called on the client and the server. Obviously only the player can use keybindings and this only happens on the client side, so you don't need to check that. On the client side, there's only one World ( Minecraft#theWorld ) and one client player ( Minecraft#thePlayer ).
-
[1.8.9] How do I rotate depending on the time?
For 90-degree rotations, you should be able to rotate the model from the blockstates file. Create a property in your block's state to store the current rotation (this could be an enum), then override Block#getActualState to return an IBlockState with this property set to the appropriate value based on the current world time ( World#getWorldTime ). For other rotations, you may be able to do something with ISmartBlockModel or TileEntitySpecialRenderer / FastTESR ; but I can't help you much with these.
-
[1.8] Placement of Item Model Off
Just add the "display" object to the top-level object like you would any other JSON model.
-
[1.8] Block Spawn Item? [SOLVED]
Override Block#onBlockActivated to do something when the block is right clicked. To spawn an item, create a new EntityItem at the appropriate position using the EntityItem(World worldIn, double x, double y, double z, ItemStack stack) constructor then spawn in it the world with World#spawnEntityInWorld . BlockPos#up() will return a BlockPos one block above the original position, so you can use this to get the position for the item entity from your block's position.
-
[1.8] Custom Item Model Not Rendering
If you mouseover the names with a line through them, it should tell you that they no longer exist (because they don't). IItemRenderer has been replaced with the model system. You can either create a standard item model in JSON, OBJ or B3D format or create a more dynamic model using one of the interfaces that extend IModel / IBakedModel (e.g. ISmartItemModel ). The Grey Ghost has a post explaining some of the new item rendering system here.
-
Need help with a crash
You installed a coremod (Inventory Tweaks) built for 1.8+, but you're running 1.7.10.
-
strange text help
Read the EAQ, it has a solution for this.
-
[1.8] HELP: Block with timer
To make a ticking TileEntity in 1.8+, the TileEntity must implement IUpdatePlayerListBox [nobbc](1.[/nobbc] or ITickable (1.8.8/1.8.9).
-
[1.8.9] Gradle not building
Unfortunately that log doesn't tell me much more than the original popup, since it doesn't show the actual exception that caused the failure. Was there any more to it? If you visit https://services.gradle.org/distributions/gradle-2.7-bin.zip in a web browser, does it download correctly? Try installing Gradle locally and telling IDEA to use that instead of the wrapper.
-
[1.8.9] Gradle not building
Then post the log.
-
[1.8.9] Gradle not building
That screenshot doesn't really have any useful information in it, we need to see the log it was referring to. My guess is that ForgeGradle ran out of memory while decompiling Minecraft. I explain how to fix this here.
-
Get all Blocks from a tree when player hits a log
I'd suggest looking at how mods like Treecapitator or Tinker's Construct (i.e. the Lumber Axe) achieve this.
-
[1.8] Move the player visual with keyboard?
If it's directly related to the original question, ask in this thread. If it's a separate topic, start a new thread.
-
[1.8] Move the player visual with keyboard?
I have an example of a block that rotates the player from the client side here. You should be able to find tutorials on key bindings somewhere.
-
Item/Blocks Meta subtypes
Block metadata is limited to the range [0, 15] (4 bits), but item metadata is limited to [0, Short.MAX_VALUE] (16 bits).
-
Updating screen events java.lang.ArrayIndexOutOfBoundsException: -1
The item ID is automatically set when you register your item using GameRegistry.registerItem . You must register every Item you add.
-
Updating screen events java.lang.ArrayIndexOutOfBoundsException: -1
You posted this in the wrong section, which is probably why diesieben07 thought this was about your own mod's GUI. Modder Support is for mod developers, Support is for users. This crash occurred because you tried to craft an item without an ID. Report this to the author of the mod you were trying to craft an item from.
-
Server is crashing
You need to install coroUtil, which is included when you download TropiCraft from its website.
-
Error (decompileMc)
Create a gradle.properties file next to build.gradle (if it doesn't already exist) and add this line to it: org.gradle.jvmargs=-Xmx2G This tells Gradle to run Java with the -Xmx2G argument, which sets Java's maximum heap size to 2 GB (enough to decompile 1.8.9). Edit: Fixed the formatting.
IPS spam blocked by CleanTalk.