Everything posted by Choonster
-
[1.8 and 1.9] Having a few issues on 1.9 and 1.8
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.
-
[SOLVED][1.9] Armor texture doesn't load
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
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
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
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
You provided an invalid shape string to GameRegistry#addRecipe .
-
[1.7.10] [UNSOLVED] Eclipse crashes when I run my mod
Did you read the error message? It tells you exactly what went wrong.
-
[1.8.9] [SOLVED] Problem with json files
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 ?
-
multiple mod subdirectories
Give each profile a separate game directory in the Minecraft Launcher.
-
Forge 1.7.2 crashes after pressing play
Old versions of Forge aren't compatible with Java 8, installing the LegacyJavaFixer mod by LexManos will fix this.
-
[SOLVED] Mod version compatibility
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.
-
[1.9] Color Item Similar to a Potion
Minecraft.getMinecraft().theWorld.getWorldTime() ? Ah, I forgot that you can always access the World on the client side. That would probably work.
-
[1.9] Color Item Similar to a Potion
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]
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
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?
-
forge mod loader has found a problem with your minecraft installation!!!!!!!!!!
Schematica requires LunatrisCore, which you don't have installed.
-
[1.9]Where are minecraft's recipes created?
Minecraft creates its recipes in the CraftingManager constructor, Forge replaces some of these with ore recipes in OreDictionary.initVanillaEntries .
-
Mod causes the forge server to crash [1.7.10]
Block#isOpaqueCube is called on both the client and server, but you're referencing the client-only class Minecraft in your override of this method. This class doesn't exist on the dedicated server, so it crashes. Instead of calling BlockLeaves#setGraphicsLevel yourself, I recommend you use the graphics level from Blocks.leaves in your override of Block#isOpaqueCube . Either call the same method on Blocks.leaves and return the result or get the value of BlockLeavesBase#field_150121_P (a.k.a. graphicsLevel ) from Blocks.leaves , invert it and then return that.
-
[1.8.9]Making models for Minecraft Forge
Forge supports models in JSON, OBJ or B3D format in the baked model system. This is mainly designed to be used for blocks/items, but it can be used for entities as well. JSON models (a format specific to Minecraft) can either be written by hand or created in a program like MrCrayfish's Model Creator. OBJ and B3D models can be created in mainstream 3D modelling programs. Baked models can be animated using the Model Animation System (the net.minecraftforge.client.model.animation package). This page explains the grammar of the Animation State Machine files.
-
forge_marker in blocktypes json how would I implement it in this case?
You need to specify every value of every property in the Forge blockstates format, even if that value has no effect on the model. Alternatively, register an IStateMapper for the Block to ignore any properties that don't have an effect on the model. You can create the IStateMapper by creating a StateMap.Builder object, calling StateMap.Builder#ignore for every property you want to ignore and then calling StateMap.Builder#build . You can then register this by calling ModelLoader.setCustomStateMapper in preInit. Ignored properties don't need to be specified in the blockstates JSON (in either format).
-
OpenGL error with vbo
Remove the trailing (kotlin from the OP's link and it works: https://github.com/Raven6101/Raven-API/blob/master/src/main/kotlin/raven/api/opengl/vbo/VBO.kt
-
[1.8 and 1.9] Having a few issues on 1.9 and 1.8
To change the header, you'll need to override CommandHelp#execute to do exactly the same thing as the super method but use your translation keys instead of the vanilla ones. To get tab completion working for the sub-commands of the admin sub-command, pass the possible command names as the second argument of getListOfStringsMatchingLastWord instead of an empty array when there's a single argument. CommandBase.getListOfStringsMatchingLastWord(String[], String...) is a vararg method, you don't need to explicitly create the String array for the second argument.
-
[1.8 and 1.9] Having a few issues on 1.9 and 1.8
I've actually implemented this myself now, I did it slightly differently than I originally suggested (which was mostly off the top of my head). The command itself extends CommandBase and has a field storing an instance of a nested class that extends CommandHandler to manage the sub-commands. It overrides ICommand#execute to call ICommandManager#executeCommand and ICommand#getTabCompletionOptions to call ICommandManager#getTabCompletionOptions , both on the sub-command manager. It overrides ICommand#isUsernameIndex to check if the index is greater than 0 and the first argument is a valid sub-command. It then creates a copy of the arguments array without the first argument and calls ICommand#isUsernameIndex on the sub-command with this new array and the index minus 1. When the sub-command manager is created, it calls ModCommands.registerSubCommands to register the sub-commands. These are just regular commands that return usage text starting with /testmod3 command instead of /command . You can see my implementation here.
-
[1.9] armor set bonus
Use EntityLivingBase#getItemStackFromSlot .
-
[1.8 and 1.9] Having a few issues on 1.9 and 1.8
You need to create an instance of this class to register it as a command, so don't make it abstract. You don't need to override CommandHandler#executeCommand , it should only ever be called from within the same class. Implement ICommand#execute to join the arguments array into a single string and call executeCommand with it. /tetracraft foo bar will execute the /tetracraft command, which will pass foo bar to executeCommand . This will execute the foo sub-command with bar as its argument.
IPS spam blocked by CleanTalk.