Everything posted by Choonster
-
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.
-
[1.8] Custome Properties for Custome Block door crash <SOLVED>
Your createBlockState method must return a BlockState with all of the block's properties. Yours only includes the FACING property, not the OPEN property. If you're extending BlockDirectional , you should use the BlockDirectional.FACING property instead of creating your own. If you need your own facing property, don't extend BlockDirectional .
-
[1.8.9] Access mob drop information
One option is to actually create the entity without spawning it in the world, then kill it using a custom DamageSource that stores the position of the spawner (or the spawner itself). Subscribe to LivingDropsEvent and check the DamageSource : if it's from your spawner, cancel the event and add the loot to the spawner (or do whatever it is that the spawner does with the loot).
-
[1.7.10]connect to server
I just implemented this myself, it was a bit tricky to figure out. You can't just connect to the new server immediately, you need to disconnect from the current server first and then connect to the new server. When the player clicks the button, store the ServerData of the pending connection somewhere and disconnect them from the server. Look at GuiIngameMenu#actionPerformed (case 1, the Disconnect/Save and Quit button) to see how to disconnect from the current server. When the player disconnects from the server ( FMLNetworkEvent.ClientDisconnectionFromServerEvent ), schedule a task on the main thread using Minecraft#addScheduledTask (this event is fired on a Netty thread, so you must schedule a task on the main thread before you can safely interact with normal Minecraft classes). In this task, check if there's pending connection. If there is, call FMLClientHandler#setupServerList followed by FMLClientHandler#connectToServer (pass a new instance of GuiMainMenu as the first argument) to connect to the new server. You can see my implementation (a client command) here. If you're not targeting Java 8, use an anonymous class instead of a lambda for the scheduled task and Guava's Optional instead of Java's Optional .
-
[1.8] Block description
Create a class that extends ItemBlock and overrides Item#addInformation . Register your Block using a GameRegistry#registerBlock overload that takes a Class<? extends ItemBlock> argument and pass your class to it.
IPS spam blocked by CleanTalk.