-
Posts
5160 -
Joined
-
Last visited
-
Days Won
76
Everything posted by Choonster
-
[1.8][SOLVED] Get's EntityPlayerMP from EntityPlayerSP
Choonster replied to TheCrafter4000's topic in Modder Support
What do you need the container for? Why is the code being run from the client side? In the handler for a client-to-server IMessage , use MessageContext#getServerHandler to get the sending player's NetHandlerPlayServer and then get the player from the NetHandlerPlayServer#playerEntity field. -
Forge crash when I try to start my server
Choonster replied to Sarion_'s topic in Support & Bug Reports
Minecraft is missing a required library (joptsimple). If you don't have direct access to upload files to the server, tell your host to fix this. -
[1.8]how would I run a command with my mod
Choonster replied to BoonieQuafter-CrAfTeR's topic in Modder Support
What do you mean? -
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
Choonster replied to BoonieQuafter-CrAfTeR's topic in Modder Support
Use MinecraftServer.getServer to get the server instance, MinecraftServer#getCommandManager to get the server's command manager and ICommandManager#executeCommand to execute a command. -
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
Choonster replied to Choonster's topic in Modder Support
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. -
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?
Choonster replied to oznecniV97's topic in Modder Support
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?
Choonster replied to oznecniV97's topic in Modder Support
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?
Choonster replied to sjoopies's topic in Modder Support
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. -
Just add the "display" object to the top-level object like you would any other JSON model.
-
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
Choonster replied to AnonymousModder's topic in Modder Support
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. -
You installed a coremod (Inventory Tweaks) built for 1.8+, but you're running 1.7.10.
-
Read the EAQ, it has a solution for this.
-
To make a ticking TileEntity in 1.8+, the TileEntity must implement IUpdatePlayerListBox [nobbc](1.[/nobbc] or ITickable (1.8.8/1.8.9).
-
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.
-
Then post the log.
-
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
Choonster replied to ItsAMysteriousYT's topic in Modder Support
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?
Choonster replied to oznecniV97's topic in Modder Support
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?
Choonster replied to oznecniV97's topic in Modder Support
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. -
Block metadata is limited to the range [0, 15] (4 bits), but item metadata is limited to [0, Short.MAX_VALUE] (16 bits).