Jump to content

zombiepig333

Members
  • Posts

    20
  • Joined

  • Last visited

Everything posted by zombiepig333

  1. Just add the dependencies param to your @Mod in your main mod class. you can specify before or after by adding "before:" or "after:" before the modid. example: @Mod(modid = "MODID", version="DEV", dependencies="required-after:IC2")
  2. @ShetiPhian- yep, just as you said, it all works for Items if you do that. Blocks, though, do require that ItemBlock override, and that is being a huge pain. I have been busy with classes this week, but if I get a way working(well, if nobody else has already ) I will say something. Otherwise, well, the system kinda works. Yay for new forge!
  3. Right, I know, I was just using this as a test of the block override system for some more advanced stuff I want to do that does require such an override. The fact that it isn't doing anything for this implies (to me) that I am doing something wrong.
  4. Hello, folks. I saw that the 'new' forge branch had support for overriding minecraft blocks and items, so I wanted to try and do something with it. Sadly, being the n00b I am, I cannot get it to work for the life of me. This is what I have been doing as a test. First, I made a class to override BlockClay like so... public class TweakClay extends BlockClay { public TweakClay() { super(); } @Override public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { return Item.getItemFromBlock(Blocks.brick_block); } } ...then I registered it using the addSubsitutionAlias method provided by forge during the preInit phase... try { GameRegistry.addSubstitutionAlias("clay", GameRegistry.Type.BLOCK, new TweakClay()); } catch (ExistingSubstitutionException e) { e.printStackTrace(); } ...then loaded the game. No crashes, but nothing happens- clay still drops clay balls. If somebody could tell me where I have derped up, it would be appreciated greatly . -zombiepig333
  5. My god- I forgot to look there. Welp, another derp for me . Haven't really done this kind of stuff before, so thanks for the help- now that I know where all these events are things should be muuuuuuuch easier. Honestly, thanks a ton. I should have looked through more of the documentation before posting this. ~zombiepig333 Edit: Ran into another problem, and I don't think it is of my doing this time. Updated the first post with info.
  6. To package a mod, you should(if you have setup the build.gradle file correctly) just have to run "gradlew build" from the command line. I don't use Eclipse, so I don't know if the "Export as Jar" uses this command or not. I would run this just in case it doesn't. Hopefully this helps a bit. ~zombiepig333
  7. NOTE: Before yelling at me for posting such a mention, please keep in mind that I am trying to do this without a full class patch; I found a tutorial for that, but didn't want to create incompatibilities. I am trying to add a sound for when a player sleeps in a bed. Sadly enough, when I was looking at what that would take, it appears an edit to the onBlockActivated function in BlockBed would need to be made, and I don't have very many ideas as to going about and making this change. I do know that you can edit fields with reflection or asms, but this is adding an entire line to a base class, not simply changing a field. Any help would be greatly appreciated. Okay, when using the solution given below, everything works the way it should EXCEPT for the conditional regarding EnumStatus; through tests I have concluded the event always seems to return null for its status. Thoughts? ~zombiepig333
  8. Yep, confirmed works when you use --refresh-dependencies. Grade 1.2 build 122 must have fixed all the problems. Thanks diesieben07, ~zombiepig333
  9. I actually just found the fix with Forge build 1137. If you use the version that forge provides in build.gradle file in build 1137 and run your tasks with --refresh-dependencies, 1.7.10-pre4 will work. I can confirm that Sedridor's issue is a problem; got the same crash as he did.
  10. Hello, I was trying to update my workspace to Forge 10.12.2.1036 for Minecraft 1.7.10-pre4 when, using the default build.gradle file, crashed with the below error. I tried changing the version number, but with the exact same result. Any help on the matter would be appreciated; I would like to start building on 1.7.10 right away and I don't know what I am doing wrong. ~zombiepig333 Edit: Just realized I put this in the wrong place. Derpy me; if it is big issue for moderators, could you please move it? Crash Logs:
  11. You need to change your java client arguments, the accessToken argument is now required to start the game. They should look like this- --version 1.7.2 --tweakClass cpw.mods.fml.common.launcher.FMLTweaker --accessToken Player1234 I think Player1234 can be changed to any user id, but don't count on it.
  12. Wow.... I should have looked at the gradle docs first. Derpy me. Problem solved, feel free to close the thread.
  13. I have been greatly enjoying the new features that ForgeGradle provides, as it makes building my mod much easier. The only problem I have been having is that since my mod is modular, I have to build multiple .jar files with different packages in them. I am not too familiar with how Gradle functions in this way, and I have only seen a way to build one jar file. Any help on how to build multiple files would be appreciated.
  14. Errrrr.... you are doing it wrong. First, you need to be using forge build 964 if you want to take advantage of gradle. Build 953 will not cut it.' Next, you don't need to download gradle yourself, if you run the right commands forge will do it itself. Other than that, just follow the tutorial you were following. Also, I suggest you run setupDecompWorkspace instead of setupDevWorkspace. I have been having some issues with it, but it supposedly gives you decompiled Minecraft code to work with.
  15. You are soooo close (this actually helped me fix my blocks), you just need to change the following- Before: switch (getGrave1Direction(meta)) { case 0: GL11.glRotatef(0, 0.0F, 1.0F, 0.0F); break; case 1: GL11.glRotatef(90, 0.0F, 1.0F, 0.0F); break; case 2: GL11.glRotatef(180, 0.0F, 1.0F, 0.0F); break; case 3: GL11.glRotatef(270, 0.0F, 1.0F, 0.0F); break; } After: switch (getGrave1Direction(meta)) { case 2: GL11.glRotatef(0, 0.0F, 1.0F, 0.0F); break; case 3: GL11.glRotatef(180, 0.0F, 1.0F, 0.0F); break; case 4: GL11.glRotatef(-90, 0.0F, 1.0F, 0.0F); break; case 5: GL11.glRotatef(90, 0.0F, 1.0F, 0.0F); break;
  16. Fixed, feel free to lock the thread. I have been having a problem getting my modeled block to rotate based on the way it has been placed. I have tried numerous ways, but in the end it boils down to not being able to use the .getBlockMetadata method on TileEntityStorageShelf. It is instead used on TileEntity, and I would like to know where I could make a change to fix this. Again, I have tried implementing a rotation method similar to that of a chest, but due to how the render class has to render differently based on what the block contains, I cannot do it the traditional way. StorageShelfRender class: package enhancedbooks.client.renderers; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.common.FMLLog; import enhancedbooks.client.models.ModelStorageShelf; import enhancedbooks.common.core.Utils; import enhancedbooks.common.tileentities.TileEntityStorageShelf; import net.minecraft.block.Block; import net.minecraft.block.BlockChest; import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelChest; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityChest; import net.minecraft.util.ResourceLocation; import net.minecraft.world.IBlockAccess; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; public class StorageShelfRenderer extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler { ModelStorageShelf model; public static int storageShelfModelID = RenderingRegistry.getNextAvailableRenderId(); private ResourceLocation storageshelf = new ResourceLocation("enhancedbooks:textures/blocks/StorageModel.png"); private int meta; public StorageShelfRenderer() { model = new ModelStorageShelf(); } @Override public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) { GL11.glPushMatrix(); GL11.glTranslatef((float) x, (float) y, (float) z); this.renderStorageShelf(tileEntity.getBlockMetadata(), ((TileEntityStorageShelf) tileEntity).getFilledSlots()); GL11.glPopMatrix(); } private void renderStorageShelf(int direction) { this.renderStorageShelf(direction, new boolean[8]); } private void renderStorageShelf(int direction, boolean[] filledSlots) { GL11.glPushMatrix(); GL11.glTranslatef(0.5F, 0.5F, 0.5F); GL11.glRotatef((float) (360 - (direction * 90)) + 180, 0.0F, 1.0F, 0.0F); GL11.glTranslatef(-0.5F, -0.5F, -0.5F); Minecraft.getMinecraft().func_110434_K().func_110577_a(storageshelf); model.render(0.0625F, filledSlots); GL11.glPopMatrix(); } @Override public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) { GL11.glPushMatrix(); this.renderStorageShelf(1); GL11.glPopMatrix(); } @Override public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { return false; //TESR Overridden } @Override public boolean shouldRender3DInInventory() { return true; } @Override public int getRenderId() { return storageShelfModelID; } } Thanks for any help -zombiepig333
  17. This tutorial should point you in the right direction: http://wuppy29.blogspot.com/2013/04/modding-151-metadata-blocks.html It may say it is for 1.5.x, but it has been working for me on forge build 758
  18. Can you still use that in forge build 758, as they made this change... "Resource packs, part two. FML mods are now resource packs. Vanilla will scan anything under 'assets' and turn it into a resource prefix. Use resourcelocations to look stuff up." Edit: Never mind, that does work.
  19. Same here, been getting that error whenever I try and access one of the blocks my mod adds. Probably another screw-up with the new texture system.
×
×
  • Create New...

Important Information

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