Jump to content

Earthcomputer

Forge Modder
  • Posts

    114
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am a programmer!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Earthcomputer's Achievements

Creeper Killer

Creeper Killer (4/8)

10

Reputation

  1. Just noticed you're using Blocks.CAULDRON. Cauldrons have their own separate item. Try Items.CAULDRON
  2. ModItems.CHOCOLATE_BAR seems to be null when you register the recipe. Make sure you;re registering the recipe after you register the items
  3. [I'm not sure whether this is the most appropriate place to post this, if not please tell me where to post it and I'll move it there] Hi, I am making a buildscript for a Jar Mod someone else is making, so that they can make it open source. For this I am using ForgeGradle. Since I am not the owner of this project I cannot simply switch away from Jar modding (trust me, I've tried persuading them!). The build system is very similar to how Forge itself is built. I've got the setupCarpet (equivalent of setupForge) task to build successfully. Next I tried to get genPatches to work, but I'm having trouble with this. I'm getting compile errors in the src/main/start classes complaining that the launchwrapper classes don't exist. This is one of them: C:\Users\owner\Documents\CarpetOpenSource\ForgeGradleTest\projects\Carpet\src\main\start\net\minecraftforge\gradle\tweakers\CoremodTweaker.java:28: error: package net.minecraft.launchwrapper does not exist import net.minecraft.launchwrapper.ITweaker; ^ Obviously the launchwrapper library is missing, I have tried many different variations in the buildscript to try and get it to compile with launchwrapper in the classpath, with no success. Here is my latest attempt: subprojects { repositories { maven {url "http://libraries.minecraft.net/"} } dependencies { forgeGradleMcDeps 'net.minecraft:launchwrapper:1.11' } } What's really puzzling me about this is how does Forge not have these errors? I've been following along with Forge's build.gradle and other files and have not seen anything I've done differently. My full buildscript is attached. Thanks in advance for help! build.gradle
  4. The only other thing I can think of is to check whether the texture really exists in src/main/resources/assets/<modid>/textures/icon_party.png, check the spellings exactly, make sure your mod ID is all lower case, and refresh the folder so the IDE knows it's there. If none of those work, I'm at as much of a loss as you are.
  5. What happens if you remove this line? What happens if you change it to 1.0f, 1.0f, 1.0f? (May not be useful right now, but once you've solved the missing texture problem...)
  6. The updateScreen method in GuiScreen is called once per tick and can be overridden in your custom GUI. If you were to make a spinning wheel, for example, you would update the rotation of the wheel every tick in the updateScreen method and then make the wheel spin look smoother in the drawScreen method by using partialTicks.
  7. In class TheDarkness, you have then line: GameRegistry.registerWorldGenerator(new WorldGenReliquaryChest(), 0); You have set the generation weight to zero, which means there is zero chance that the world generator will generate.
  8. First of all, to get the wooden sword item, see the Items class (net.minecraft.init.Items). It contains a list of all the items in vanilla. To test if an item is a wooden sword: if (item == Items.WOODEN_SWORD) To clear the player's inventory of wooden swords: player.inventory.clearMatchingItems(Items.WOODEN_SWORD, -1, 1, null); As for player-sensitive recipes, consider making a custom IRecipe implementation. Diesieben07 made a tutorial on how to do this.
  9. Here's an option: Override IContainerListener and add the listener to the container when it is created using Container.addListener. Perhaps the sendSlotContents method is the one you're looking for?
  10. I am planning on writing a buildscript which involves downloading the Minecraft client and server from where they are hosted on amazonaws. I know how to do this, I just want to ask about how legal it would be to do so. ForgeGradle does it, but is that just because they got permission? Thanks in advance for answers
  11. - You can use event.getEntity() to get the player. - You are running on the client if e.worldObj.isRemote or if e instanceof AbstractClientPlayer - You will have to cast the entity to EntityPlayer If you want to get the player without the event and you're sure the code is running client-side, use Minecraft.getMinecraft().thePlayer Edit: to check if single player (and you're sure the code is running client-side), there's something along the lines of Minecraft.getMinecraft().isIntegratedServerRunning
  12. Try running the command set JAVA_OPTS=-Xmx2g before running gradlew setupDecompWorkspace if you don't want to modify the gradle.properties file
  13. After more code digging, I noticed that when the debug screen is opened, GlStateManager.enableTexture2D() is called, and GlStateManager.disableTexture2D() is not called, leading to the inconsistent behaviour with my lines. So, I fixed all my problems with GlStateManager.disableTexture2D() and GlStateManager.disableDepth(). And we all lived happily ever after.
  14. - initEntityAI() is called by a superconstructor, which is called when you write 'super()' in the second constructor of EntitySkeletonWarrior. - The compiler then inserts statements after this call to the superconstructor to initialize your fields. - Thus, aiAttackOnCollide is null when initEntityAI() is called To fix this, you would probably initialize aiAttackOnCollide inside the addAttackTasks() method you have, instead of where the field is declared.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.