Everything posted by Choonster
-
Server crash after modpack update, please help...
It looks like an issue with Extra Utilities 2, but you have a lot of coremods installed that could be screwing things up. Test it with the latest version of Extra Utilities 2 and without all of the coremods. If the issue persists, report it to the author.
-
Server crash [1.10.2]
On Sponge's GitHub.
-
minecraft 1.8.9 how to resolve the logs/fml-client-latest.log
Make sure you read the installation instructions for the mods you're using.
-
minecraft 1.8.9 how to resolve the logs/fml-client-latest.log
We can't help you without seeing the FML log (logs/fml-client-latest.log), upload it to Gist and link it here.
-
[SOLVED] [1.10.2] Using Forge Energy
EnergyStorage doesn't implement INBTSerializable, so it doesn't have methods to read it from/write it to NBT. Either get the capability's IStorage (Capability#getStorage) and use that to read from/write to NBT or do it yourself (storing the energy in a single integer tag).
-
Save ItemStack with NBT data to file (client-side)
That looks mostly correct, but there are some minor changes I'd recommend: Only catch the most specific exception you have to, i.e. IOException rather than Exception. This lets other exceptions propagate upwards so they can be handled by Minecraft itself. Log the exception with a log4j Logger rather than just printing its stack trace. This will ensure it's formatted properly in the console and FML log. Consider using ItemStack#serializeNBT (from the INBTSerializable interface) rather than ItemStack#writeToNBT. This creates the NBTTagCompound for you and returns it. That should be all you need, yes.
-
Save ItemStack with NBT data to file (client-side)
WorldSavedData only saves data to the disk on the logical server, so it's not really suitable for your purposes. You can look at how MapStorage reads and writes WorldSavedData instances to .dat files using CompressedStreamTools, though you won't be able to use ISaveHandler#getMapFileFromName from the logical client (since the client-side implementation always returns null).
-
[1.11+] [SOLVED] How to refer to mod enchantments in loot tables?
The OP is asking about loot tables, not fields.
-
[1.11+] [SOLVED] How to refer to mod enchantments in loot tables?
You can use the enchant_randomly loot function to apply a random level of an Enchantment randomly selected from the provided list of Enchantment registry names (which can be a list of a single name). If you want an exact level, you'll need to create your own LootFunction and LootFunction.Serializer implementations and use LootFunctionManager#registerFunction to register them. Potion items already store their PotionType using its registry name, but custom PotionEffects are still stored using Potion IDs. There's no vanilla loot function to create potion items, you'd have to write your own if you wanted to use Potion registry names when specifying custom PotionEffects.
-
[1.11] An item model with attachments?/addons
You'll likely need to store which attachments the gun has using NBT or capabilities. There are several possible ways to handle the model: Create a model for each possible state of the gun (e.g. no attachments, scope, bi-pod, scope and bi-pod, etc.) and register an ItemMeshDefinition to choose the appropriate one based on the current attachments. Create the base gun model and a model for each attachment and combine them as submodels using Forge's blockstates format. You'll still need to register an ItemMeshDefinition to choose the appropriate variant of the blockstates file based on the current attachments. Generate the models at runtime with an ICustomModelLoader, IModel and IBakedModel. Forge has several examples of this.
-
[Fixed] [1.8] Setting the Item model for an ItemBlock
You need to set the item's model using ModelLoader.setCustomModelResourceLocation or ModelLoader.setCustomMeshDefinition. Call these in preInit (or ModelRegistryEvent in 1.10.2+) from a client-only class. 1.8 isn't really supported by Forge any more, you should update directly to 1.11.2 or at least to 1.8.9.
-
[1.10] Block texture from tile entity data
Regular properties are represented by an IProperty and have a fixed set of values of a type that implements Comparable (e.g. the two booleans, a range of ints or a set of enum values). These can be stored in metadata or set in Block#getActualState and can be used to determine which model is used for the IBlockState. Unlisted properties are represented by an IUnlistedProperty and can have any number of values (e.g. any float or any object of the specified type), with IUnlistedProperty#isValid being used to determine whether or not a value is valid. These must be set from Block#getExtendedState and can be used by the IBakedModel to change how it's rendered. To use unlisted properties, you need to return an ExtendedBlockState from Block#createBlockState instead of a BlockStateContainer. If you use BlockStateContainer.Builder to create the state container, you don't need to worry about using the right class for your properties, it will create an ExtendedBlockState if you've added unlisted properties or a BlockStateContainer if you haven't.
-
High my mod crashing again need healp very badly. :(
BlockDragonBreedEgg#getStateFromMeta is trying to set the breed property to null, but this isn't a value allowed by the property. You need to figure out where this null is coming from and what the actual value is supposed to be.
-
Game Crash when Dispenter One Block over Rail
This was fixed in Forge 1.11.2-13.20.0.2240. Always make sure you're running the latest version before reporting bugs, otherwise they may have already been fixed.
-
Techne Missing?
They can, using AnimationModelBase. This also allows the model to be animated with Forge's baked model animation system.
-
[1.11] Can only summon one out of two of my human variations
You need to add a LayerBipedArmor to the Render with RenderLivingBase#addLayer to render the entity's armour. I'm not too sure why the AI isn't working, you may need to step through it in a debugger to see where it goes wrong.
-
[1.11] Can only summon one out of two of my human variations
EntityHumanFighter#initEntityAI calls super.applyEntityAttributes, which registers the entity's attributes. This method has already been called by the EntityLivingBase constructor, so the attribute registration fails with an exception because the attributes it's trying to register have already been registered. EntityHumanCivilian doesn't do this, so it can be summoned without issue.
-
ATG not detected
Don't download mods from sites like Minecraftexe, these often host outdated and potentially malicious versions of mods. Only download mods from their official source, usually a Minecraft Forum thread or Curse project. You can read more about this here. You can find ATG's official Minecraft Forum thread here and Curse project here. Probably not. ATG adds several of its own biomes, these would revert to vanilla plains biomes without the mod installed. In addition, any new terrain generated would use the vanilla generator rather than the ATG one.
-
How to make entities fire projectiles
Either navigate to them in the forgeSrc-<forgeVersion>.jar referenced library or use Navigate > Open Type (Ctrl-Shift-T) to search for a class by name.
-
[1.11] IntelliJ update wrecked the run configuations
Either set "Use classpath of module" to "EnviromineRevived_main" for each run configuration or re-import the Gradle project and uncheck "Create separate module per source set". cpw explains how to do the latter in this video.
-
[1.11] Which sub-event would I use?
LivingEntityUseItemEvent.Finish is fired when an entity finishes using an item (i.e. uses it for its full duration), directly after Item#onItemUseFinish is called. This is probably the event you want. If the entity was using a potion, the stack size will have already been reduced by 1 when the event is fired. If the stack was empty after this (i.e. stack size was reduced to 0), it will have been replaced by an ItemStack of Items.GLASS_BOTTLE. If you want access to the original ItemStack, you'd need to subscribe to LivingEntityUseItemEvent.Tick and store a copy of it (not the original) in a capability attached to the entity (if it's a potion). The PotionUtils class has several methods that read PotionEffects from potion item NBT.
-
1.11.2+ ID Limit?
The fields at the top of the GameData class hold the minimum and maximum IDs for the vanilla registries, i.e. Blocks, Items, Potions, Biomes, SoundEvents, PotionTypes, Enchantments and Entities.
-
[1.11.2] Village like structure
Probably, but you may end up re-implementing a lot of the structure system yourself.
-
[SOLVED] Print something in chat input line
If the chat GUI is already open, you can add text to it by calling GuiTextField#writeText on GuiChat#inputField. The field is protected, so you'll need to access it via reflection.
-
[SOLVED] Print something in chat input line
Create an instance of GuiChat using the GuiChat(String) constructor, which populates the text box with the specified string; then display it with Minecraft#displayGuiScreen. There's no existing server-to-client packet that does this, so you'll need to create your own.
IPS spam blocked by CleanTalk.