-
Posts
5153 -
Joined
-
Last visited
-
Days Won
76
Everything posted by Choonster
-
Intellij Idea 15 bug with Minecraft Forge?
Choonster replied to JamieEdwards's topic in Modder Support
Click the + button (Attach Gradle Project) in IDEA's Gradle window and browse to the other build.gradle file. -
Intellij Idea 15 bug with Minecraft Forge?
Choonster replied to JamieEdwards's topic in Modder Support
I usually just use one IDEA project per Gradle project (i.e. mod), but it seems you can attach another Gradle project as a module of the current IDEA project from IDEA's Gradle window. This is similar to using an Eclipse workspace with multiple projects (mods). -
Intellij Idea 15 bug with Minecraft Forge?
Choonster replied to JamieEdwards's topic in Modder Support
You shouldn't need to manually mark directories as Source/Resource Roots. The IDEA project should be created in the same directory as build.gradle, your code should go in src/main/java and src/main/resources, which will be automatically marked as roots. This tutorial explains how to correctly set up your project. If you're using Forge for 1.7.10 or earlier, add this to your build.gradle: // Fix resources not being loaded in IDEA // http://www.minecraftforge.net/forum/index.php/topic,32467.msg169687.html#msg169687 idea.module.inheritOutputDirs = true -
Fatally missing blocks and items (2016)
Choonster replied to Mrjjmacc's topic in Support & Bug Reports
Upload the full FML log to Gist and link it here. -
Custom Item loses its texture when created on the crafting table
Choonster replied to lionel5116's topic in Modder Support
This belongs in Modder Support, it should be moved there soon. Are you definitely adding the recipe in the init phase (i.e. is the method that adds the recipe definitely handling FMLInitializationEvent )? In your preInit method, you create an instance of ItemBerry without registering it or giving it a name. You then call ItemBerry.init and ItemBerry.register , which creates and registers an instance of Item with the name "berry" . You should register models from your client proxy instead of just checking the side in your @Mod class. Use ModelLoader.setCustomModelResourceLocation / ModelLoader.setCustomMeshDefinition in preInit instead of the ItemModelMesher#register overloads in init. I would highly recommend creating a dedicated class to create, register and store your items (the same goes for blocks, entities, etc.) and a dedicated class to register your block/item models. You can see an example of what I mean here: I have registration classes in com.choonster.testmod3.init and my models are registered in com.choonster.testmod3.client.model.ModModelManager (called from the client proxy). -
Override Item#getAttributeModifiers(ItemStack) instead of Item#getItemAttributeModifiers() .
-
custom block that prevents spawning of mobs in a certain perimeter
Choonster replied to Thaliviel's topic in Modder Support
Yes. Even in a LAN game, the players may be in separate dimensions to each other. -
Right Click Event Not Working... [SOLVED]
Choonster replied to BaersMakeNoiseee's topic in Modder Support
Does this method have the @SubscribeEvent annotation? Have you registered an instance of the class on the appropriate event bus? Are you sure you want to deny using the block regardless of what type of interaction event is was and what the player was holding and what they clicked on? If this is for an item, consider overriding Item#onItemRightClick . This is called when the item is used to right click air. -
custom block that prevents spawning of mobs in a certain perimeter
Choonster replied to Thaliviel's topic in Modder Support
You can't assume that there's only one World loaded at any time and maintain a single list from WorldEvent.Load / Save . Each time a block is added or removed, you need to fetch the WorldSavedData for that World and add or remove the position from that instance's list. @ForgeSubscribe doesn't exist any more, use @SubscribeEvent . I suspect you misread the event handler tutorial you followed. You can use a for-each/enhanced for loop to iterate through a collection such as an array or list. -
[1.8.9] Fluids don't render. Did the system change?
Choonster replied to TrashCaster's topic in Modder Support
My fluid models are working without issue: You can see my fluid creation code here, my model registration code here and my blockstates file here. -
[1.7.10]How to make your mod not work in singleplayer.
Choonster replied to Paradox's topic in Modder Support
Ah, that makes more sense. -
[1.7.10]How to make your mod not work in singleplayer.
Choonster replied to Paradox's topic in Modder Support
Keep in mind that IDs for modded block/items are automatically assigned and will likely be different for every world, they're not a very reliable way to store persistent data. Registry names are a much more reliable identifier for blocks/items. RegistryNamespaced#getNameForObject can be called on Block.blockRegistry or Item.itemRegistry to get the registry name of a Block / Item respectively. -
custom block that prevents spawning of mobs in a certain perimeter
Choonster replied to Thaliviel's topic in Modder Support
Yes, that looks correct. Is your field a List or a List<Position> ? Always use generic types when they're available. -
custom block that prevents spawning of mobs in a certain perimeter
Choonster replied to Thaliviel's topic in Modder Support
You need to save the NBT list tag inside the provided NBT compound tag using NBTTagCompound#setTag in writeToNBT . If you're using generics properly, you shouldn't need to cast objects from your list to Position . -
World#getBlock and World#setBlock were replaced by World#getBlockState and World#setBlockState , respectively. These take a BlockPos instead of individual coordinates and take/return an IBlockState instead of a Block . Use IBlockState#getBlock to get the Block represented by a state. Use Block#getDefaultState to get the default state of a block, then chain IBlockState#withProperty calls to get an IBlockState with the specified property values.
-
Yes, as long as you haven't installed any JAR mods (i.e. mods that you need to put into the Minecraft JAR).
-
custom block that prevents spawning of mobs in a certain perimeter
Choonster replied to Thaliviel's topic in Modder Support
If the list is only maintained and checked on the server, won't it all be running in a single thread? Even if you needed to maintain the list on both sides, wouldn't each side have its own WorldSavedData instance(s) each only being accessed from a single thread? -
custom block that prevents spawning of mobs in a certain perimeter
Choonster replied to Thaliviel's topic in Modder Support
You can either save each position as an int array or a compound tag. You don't write to NBT every time a block is added/removed, Minecraft will call readFromNBT and writeToNBT for you. -
It looks like you're running OptiFine, which messes with a lot of stuff and occasionally breaks things. Can you reproduce this without any mods installed?
-
Where are Forge source downloads for 1.8.9/1.8.8/1.8?
Choonster replied to bigbadwolf88888's topic in Modder Support
The source download was renamed to MDK (Mod Development Kit), since it hasn't actually included any Forge or Minecraft source code since the switch to ForgeGradle. Forge's official documentation has a Getting Started page here that explains how to set up modern versions of Forge. -
Upload the logs/fml-client-latest.log file to Gist and link it here.
-
custom block that prevents spawning of mobs in a certain perimeter
Choonster replied to Thaliviel's topic in Modder Support
You must create a class that extends WorldSavedData and store the data in each instance of that, yes. The page I linked in my first post explains this in more detail. You can't store the list in your Block class directly, since you don't have any way to load/save the data and can't easily separate each dimension's list. -
custom block that prevents spawning of mobs in a certain perimeter
Choonster replied to Thaliviel's topic in Modder Support
In general, instance methods will only be called if the instance was actually involved in whatever happened. This means that Block#onBlockAdded will only be called on the Block that was actually added to the world. -
Crash using Forge (Custom Launcher, *not cracked*)
Choonster replied to LucasansS's topic in Support & Bug Reports
You're missing a required library (log4j), which is almost certainly an issue with your launcher.