-
Posts
5161 -
Joined
-
Last visited
-
Days Won
76
Everything posted by Choonster
-
[1.9] Understanding new way of declaring items.
Choonster replied to squirrel_killer's topic in Modder Support
That hasn't changed in 1.9 and has little to do with the new registry system, since every Item is registered in the same way. Override Item#getUnlocalizedName(ItemStack) to return the appropriate unlocalised name based on any aspect of the ItemStack (stack size, metadata, NBT, capabilities). -
You also need to include the BlockLiquid.LEVEL property in your BlockStateContainer and register an IStateMapper to ignore that property in your blockstates file (if you don't want its value to affect the model). You can see my implementation of a basic water plant here, with the IStateMapper registration here (called in preInit from the client proxy).
-
[1.8 and 1.9] Having a few issues on 1.9 and 1.8
Choonster replied to NovaViper's topic in Modder Support
Create the TextComponentTranslation for the translated part of the header message with the page numbers as format arguments and set its colour to green. Create another TextComponentTranslation with the dashes and a formatting placeholder ( %s ) for the translated part with the first TextComponentTranslation as a format argument and set its colour to gold. Send this second TextComponentTranslation to the command sender as a chat message. -
[1.8 and 1.9] Having a few issues on 1.9 and 1.8
Choonster replied to NovaViper's topic in Modder Support
ICommand#execute has a MinecraftServer argument, pass this to your applyModifier method. -
[1.8 and 1.9] Having a few issues on 1.9 and 1.8
Choonster replied to NovaViper's topic in Modder Support
Use ForgeVersion.getResult to get the CheckResult of the version check for the specified ModContainer . FMLCommonHandler#findContainerFor will return the ModContainer for the specified mod ID or instance. -
java.lang.IllegalArgumentException: bound must be positive
Choonster replied to _Lightning_'s topic in Modder Support
The crash is happening from Immersive Engineering's ore generation code. It's likely that the configuration is to blame, with at least one ore configured so that its maximum y level is lower than its minimum y level. If your configuration is correct, it may be an issue with IE itself. It looks like Farseek has modified some of the Minecraft/Forge code, so try and reproduce this without Farseek or any other coremods installed before you report this to the Immersive Engineering author(s) (who may or may not provide support for 1.7.10). I'm not sure what caused the "Unknown net.minecraftforge.common.chunkio.QueuedChunk" errors, but you probably won't get any official support with them since you're on 1.7.10. -
[1.8 and 1.9] Having a few issues on 1.9 and 1.8
Choonster replied to NovaViper's topic in Modder Support
I suggest you set a breakpoint on line 155 of CommandAdmin , run the game in debug mode, use the command and then look at the debugger to see what's null . It looks like it's probably the MinecraftServer you get from FMLServerHandler . In 1.9, Minecraft is slowly moving away from MinecraftServer being a singleton since there's no static field in the class itself storing the instance and World has a getMinecraftServer method to get the world's server. For this reason, I suggest you use the MinecraftServer provided to the command rather than using FMLServerHandler (which still assumes there's only one MinecraftServer instance). -
(fixed) (1.8.9)Model definition for location *item* #inventory not found
Choonster replied to Anora's topic in Modder Support
That appears to be the console output, please post the actual FML log. I can't see any model errors in that log, only missing textures. -
(fixed) (1.8.9)Model definition for location *item* #inventory not found
Choonster replied to Anora's topic in Modder Support
Could you upload your full FML log (logs/fml-client-latest.log) to Gist and link it here? Your model directory should be called models, not Models. It may not matter in the development environment since paths in Windows are case-insensitive, but it will probably not work in the release environment since paths JAR files are case-sensitive. I believe there is a Forge IRC channel, but I only offer help in forum threads. -
[1.8 and 1.9] Having a few issues on 1.9 and 1.8
Choonster replied to NovaViper's topic in Modder Support
Create a LinkedHashSet<ICommand> and populate it in your override of CommandHandler#registerCommand (like the super method does for its set). Override CommandHandler#getPossibleCommands to do the same thing as the super method, but with your set instead. In your override of CommandHelp#getSortedPossibleCommands , return the command list without sorting it. You can see my implementation here and here. -
If you include your mod ID in your ArmorMaterial 's name (e.g. adamantium:adamantiumArmor ), Minecraft will load the armour texture from your resource domain instead of the minecraft resource domain. No need to override any methods in ItemArmor for this.
-
(fixed) (1.8.9)Model definition for location *item* #inventory not found
Choonster replied to Anora's topic in Modder Support
It would fix that particular error, yes. I don't know if there are any other issues with your models. -
(fixed) (1.8.9)Model definition for location *item* #inventory not found
Choonster replied to Anora's topic in Modder Support
Item#getRegistryName returns a name that already includes your mod ID, but you're adding your mod ID again before registering the model. -
[1.8 and 1.9] Having a few issues on 1.9 and 1.8
Choonster replied to NovaViper's topic in Modder Support
You'll need to create a Map<String, ICommand> field in SubCommandHandler and set it to a new LinkedHashMap (a HashMap that preserves insertion order). Override CommandHandler#registerCommand to add the command's name and aliases to this map (like the super method does for its own map) and then return the result of calling the super method. Override CommandHandler#getTabCompletionOptions to do the same thing as the super method, but iterate through your map instead. This should tab-complete sub-command names and their aliases in the order they were registered or returned from ICommand#getCommandAliases , respectively. -
[1.7.10] [UNSOLVED] Eclipse crashes when I run my mod
Choonster replied to 10forever's topic in Modder Support
You provided an invalid shape string to GameRegistry#addRecipe . -
[1.7.10] [UNSOLVED] Eclipse crashes when I run my mod
Choonster replied to 10forever's topic in Modder Support
Did you read the error message? It tells you exactly what went wrong. -
Minecraft only looks for the normal variant when a Block has no properties (or all its properties are ignored by its IStateMapper ). Have you overridden Block#createBlockState ?
-
Give each profile a separate game directory in the Minecraft Launcher.
-
Forge 1.7.2 crashes after pressing play
Choonster replied to AlmightyBlobFish's topic in Support & Bug Reports
Old versions of Forge aren't compatible with Java 8, installing the LegacyJavaFixer mod by LexManos will fix this. -
Forge doesn't exist for 1.8.1, only 1.8, 1.8.8 and 1.8.9. Unless your mod only touches a minimal amount of the Minecraft codebase, it likely won't be compatible with any version of Minecraft other than the one it was built for. You can't build a single project against multiple versions of Minecraft, though you can maintain a separate copy of the project for each version (as branches of a single repository or as completely separate repositories) and write a script to build them all at once.
-
Minecraft.getMinecraft().theWorld.getWorldTime() ? Ah, I forgot that you can always access the World on the client side. That would probably work.
-
I'm not aware of any way to transition between colours for an item. IItemColor only receives the ItemStack and the tint index defined in the model, you don't have access to any timing information like the total world time. You could store the total world time in the stack's NBT from Item#onUpdate , but that would only work for items in the player's inventory. Use Minecraft#getItemColors to get the ItemColors instance, then call ItemColors#registerItemColorHandler to register your IItemColor .
-
[1.9] Forge API of some sort? [UNSOLVED + A few questions]
Choonster replied to Zodsmar's topic in Modder Support
Why are you using the Block 's BlockStateContainer as an ID? Use the Block (the block type, e.g. Blocks.stone ), its RegistryDelegate (a unique identifier of the Block ) or a specific IBlockState (the Block and a map of properties and values, e.g. Blocks.stone with its VARIANT property set to GRANITE ). An ItemStack isn't an IBlockState , you can't cast between them. If the ItemStack 's Item is an ItemBlock , use ItemBlock#getBlock to get the Block , Item#getMetadata(int) to get the block metadata corresponding to the ItemStack 's metadata and Block#getStateFromMeta to get the IBlockState corresponding to that metadata. -
(fixed) (1.8.9)Model definition for location *item* #inventory not found
Choonster replied to Anora's topic in Modder Support
GameRegistry.registerBlock registers the ItemBlock for you in 1.8.9 (unless you use an overload with a Class<? extends ItemBlock> argument and pass null ). GameRegistry.register (the 1.9 replacement) doesn't. Don't use unlocalised names as registry names. Registry names are IDs and must not change, unlocalised names can change at any time. Use Block#setRegistryName to set your registry names and the single-argument overload of GameRegistry.registerBlock to register your blocks, the same applies to items. If you want, you can set the unlocalised name of your block/item to its full registry name; this will include your mod ID to avoid conflicts with other mods. Don't use unlocalised names as model names. The default model loaded for every item is the one with its registry name. Don't use ItemModelMesher#register to register item models, use ModelLoader.setCustomMeshDefinition / setCustomModelResourceLocation in preInit. Do you actually have item models with those names?