Everything posted by Choonster
-
[1.8.9+] What is the current best tool for modeling?
You can try Tabula, which is meant to be a replacement for Techne. Apparently is has animation support, but code export is not yet possible (any may never be, since development seems to have stopped). You could also use a mainstream 3D modelling program and export the model in OBJ or B3D format to be loaded as a baked model and animated with Forge's model animation system. Unfortunately there's not a lot of documentation on the system, but there is the following: The commit that added the system briefly explains the purpose of each class. The animation test mod (assets) has an example of a block and item with an animated model. The syntax of the Animation State Machine files is documented here.
-
[1.10.2] TE rendering update
No, the two IBlockState arguments can be (and usually are) the same. The flags are completely ignored by ServerWorldEventHandler (the server-side IWorldEventListener instance).
-
[1.10.2] [SOLVED] JSON Subfolder
You didn't specify a resource domain for your ModelResourceLocation s, so they defaulted to "minecraft" . Prefix the first argument of the ModelResourceLocation constructor with your mod ID, e.g. new ModelResourceLocation(MODID + ":foo/bar/baz", "inventory") . ModelLoader.setCustomModelResourceLocation / setCustomMeshDefinition only set the model for an Item (which can be an ItemBlock ). Block models are specified in blockstates files. I have a description of the model loading process and a summary of how ModelResourceLocation s are mapped to models here.
-
Proper way to use a Logger
Markers are objects that can be used to filter log messages. For example, you could configure all messages except those with the marker FOO to be printed to one log file and all messages with the marker FOO to be printed to a separate log file. You generally don't need to use markers and Forge's log config won't print them to the console or log file.
-
[1.10.2]TileEntity/Forge Energy Questions
For syncing values used in a GUI, you should cache any synced values in the Container and override Container#detectAndSendChanges to check the current values, send them to the client if they're different to the cached values and then cache the current values. This can be done using vanilla packets or your own custom packets. Use IContainerListener#sendProgressBarUpdate to send a pair of int s (e.g. the ID of the energy storage and the current energy in it) to the client-side Container , which will then have Container#updateProgressBar called with them as arguments. Look at ContainerFurnace for an example of this. For syncing values used to render the block, you need to send them in the TileEntity 's update tag and packet. This document explains these in more detail.
-
[1.10.2] TE rendering update
Call World#notifyBlockUpdate on the server to send the TileEntity 's update packet and re-render the chunk containing it.
-
Proper way to use a Logger
Are you sure it didn't work? Regardless of where you're running Minecraft, only messages logged at INFO or higher are printed to the console. Every message (including DEBUG and TRACE messages) is written to the log file. I use this wrapper for logging. You can see where I use it here.
-
[1.10.2]TileEntity/Forge Energy Questions
SO the client version of the TE will always start the values again from 0, becuase only the server variant loads the data from nbt. And it is no problem that there are 2 different values as long i dont do client side things with the value? Yes.
-
1.10 unable to play custom sound.
The path of the ResourceLocation you use for your SoundEvent must be the name of a sound event in your sounds.json file, not the path to a sound file. Your sound event is called mob.fisherman.callItAday , so use this instead of mob.fisherman.female.callingItADay when creating the SoundEvent .
-
[1.10.2]TileEntity/Forge Energy Questions
Im relatively new to TEs so how can a TE be on the client and how can i prevent it? The server and client both have their own instance of the TileEntity , this is normal and not something to be prevented. The client won't have any of the data that you write to NBT unless you sync it. The client doesn't need to have this data unless it's required for rendering purposes. Well for just testing stuff a sysout + strg + enter is the easiest or what am i missing? You can get a Logger named with your mod ID by calling FMLPreInitializationEvent#getModLog . You should store this in a field somewhere and use it whenever you want to write something to the log. You can also use your IDE's debugger to pause execution at certain points and inspect the values of fields and local variables. You'll probably want to create a class that extends EnergyStorage , overrides EnergyStorage#canReceive to return false and has a copy of the EnergyStorage#receiveEnergy method with a different name and/or signature (so it doesn't implement the interface method) that ignores EnergyStorage#canReceive . External cables will use the interface method, your internal code can use the method you created.
-
[1.10.2]TileEntity/Forge Energy Questions
ah, i completely missed this while thinking about it. So i just create a new EnergyStorage object(i want to use teh default implementation) save it in the TileEntity and return this field at getCapability right? Yes. I need to figure out why the TE has 2 different values for energy after world loading then... Is one on the client and one on the server? Only the server reads the TileEntity from NBT. Unless you print out a pure number. System.out.println(someInt) will print "4" while System.out.println(someInt + " energy") will print "[time] [client] [package and class name:line#]: 4 energy" Ah, I wasn't aware of that. I always use a log4j Logger when writing something to the console/log, which I would also recommend the OP does.
-
[1.10.2]TileEntity/Forge Energy Questions
The whole point of the capability system is that you don't implement interfaces on your TileEntity / Entity / Item . Instead, you store one or more instances of the interface ( IEnergyStorage ) and override the ICapabilityProvider methods to return them. EnergyStorage is the default implementation of IEnergyStorage , use or extend this unless you need a completely different implementation. You only need to sync data to the client if it's required for rendering. All game logic is controlled by the server. World#isDaytime will only return a valid result on the server because the World#skylightSubtracted field that it uses is only updated from WorldServer . Whenever you print something to the log, it should tell you whether it was done from the client or server thread.
-
Dependency Hosting Options
People on another forum have suggested using GitHub, S3 or Bintray.
-
First Time Modder Need Help! Should be easy to answer!
Are you sure you saved the file as gradle.properties and not gradle.properties.txt?
-
First Time Modder Need Help! Should be easy to answer!
You don't need to create a JAR or place it in the mods directory to set up a development environment. The pages I linked don't tell you to do that. What exactly do you mean by "installed forge"? You don't really install Forge when setting up a development environment, you just download the MDK and run the Gradle commands to set up the workspace and IDE project. So you've run gradlew setupDecompWorkspace and gradlew eclipse ? Have you created an Eclipse workspace and imported the project that was generated?
-
[1.9.4] adding custom 3d weapon with animation, bells and whistles.
The model itself can be in JSON, OBJ or B3D format. Textures can be animated using vanilla's mcmeta files. Models can be animated using Forge's animation system, which unfortunately doesn't have a lot of documentation. The commit that added the system briefly explains the purpose of each class. The animation test mod (assets) has an example of a block and item with an animated model. The syntax of the Animation State Machine files is documented here.
-
First Time Modder Need Help! Should be easy to answer!
1.5.2 is extremely outdated, it's unlikely anyone will be able to help you with it. It may have been a popular version at the time it was released, but that's no longer the case. The current versions of Forge are for Minecraft 1.10.2 and no longer use MCP directly. This page explains how to set up a development environment for Forge. from cpw also explains how to set up an IntelliJ IDEA project for Forge in more detail. Once you've got the development environment set up, you can read the official documentation and follow some of these tutorials.
-
Dependency Hosting Options
Is there a good way to host builds of a mod in a way that's accessible through Gradle (e.g. Maven) without running your own server? Is Maven Central suitable for mods?
-
Forge keeps crashing, any help would be appreciated
Have you installed CodeChickenCore?
-
[1.10.2]Strange shadows baked Model
In my experience, that only works if the block also emits light. I think a custom baked model is needed if you want a fullbright block that doesn't emit light, but I don't really know that much about the rendering system. Edit: Forgot some words.
-
[1.8 - 1.10.2] Reliable way to get the launched Minecraft Version
The ForgeVersion.mcVersion field contains the Minecraft version that the current version of Forge was built for.
-
[SOLVED] [1.10.2] Model Variant Issues
When using the vanilla blockstates format, the properties in each variant name must be in alphabetical order. You haven't done this. Consider using Forge's blockstates format. This allows you to specify the effect of each property individually, including the model and textures.
-
[1.10.2] updating my mod, some small problems which i cant fix ...
BlockPos was moved to the net.minecraft.util.math package.
-
[1.10.2][Capabilities]How do I create my own capability?
AttachCapabilitiesEvent.Entity is fired in the Entity constructor, before the EntityPlayer constructor runs and sets the EntityPlayer#gameProfile field used by EntityPlayer#getName . Because AttachCapabilitiesEvent is fired in the constructor before the object has finished being initialised and read from NBT, there's very little data you can access from the event handler method. Pretty much the only thing you can check is whether it's an instance of a particular class.
-
[1.10.2][SOLVED] Saving player data
That's not the same code that caused the crash. The exception is thrown from AbstractByteBuf#readBoolean , but the code you posted never calls this. Are you sure you posted the correct crash report and code?
IPS spam blocked by CleanTalk.