Everything posted by Ebilkill
-
Multi-textured Mob & Glowing Mob
do you know a way i can do that in my case, here's the "mod_" file package net.minecraft.src; import java.util.Map; import net.minecraftforge.client.MinecraftForgeClient; public class mod_Sea extends BaseMod { public static Item submarine = (new ItemSubmarine(15000, 0)).setIconCoord(0, 0).setItemName("submarine"); public static EntitySubmarine sub; public mod_Sea() { //Crabs ModLoader.registerEntityID(EntityCrabWalking.class, "CrabWalking", 115, 0xFE5E31, 0xFE5E31); ModLoader.addLocalization("entity.CrabWalking.name", "en_US", "Walking Crab"); //Submarine ModLoader.registerEntityID(EntitySubmarine.class, "Submarine", 117, 0xFFFF31, 0xFFBC31); ModLoader.addLocalization("entity.Submarine.name", "en_US", "Submarine"); //Submarine Colors ModLoader.addLocalization("item.submarine.black.name", "en_US", "Black Submarine"); ModLoader.addLocalization("item.submarine.red.name", "en_US", "Red Submarine"); ModLoader.addLocalization("item.submarine.green.name", "en_US", "Green Submarine"); ModLoader.addLocalization("item.submarine.brown.name", "en_US", "Brown Submarine"); ModLoader.addLocalization("item.submarine.blue.name", "en_US", "Blue Submarine"); ModLoader.addLocalization("item.submarine.purple.name", "en_US", "Purple Submarine"); ModLoader.addLocalization("item.submarine.cyan.name", "en_US", "Cyan Submarine"); ModLoader.addLocalization("item.submarine.silver.name", "en_US", "Light Gray Submarine"); ModLoader.addLocalization("item.submarine.gray.name", "en_US", "Gray Submarine"); ModLoader.addLocalization("item.submarine.pink.name", "en_US", "Pink Submarine"); ModLoader.addLocalization("item.submarine.lime.name", "en_US", "Lime Green Submarine"); ModLoader.addLocalization("item.submarine.yellow.name", "en_US", "Yellow Submarine"); ModLoader.addLocalization("item.submarine.lightBlue.name", "en_US", "Light Blue Submarine"); ModLoader.addLocalization("item.submarine.magenta.name", "en_US", "Magenta Submarine"); ModLoader.addLocalization("item.submarine.orange.name", "en_US", "Orange Submarine"); ModLoader.addLocalization("item.submarine.white.name", "en_US", "White Submarine"); //Submarine Crafting ModLoader.addRecipe(new ItemStack(mod_Sea.submarine, 1), new Object[] { "I G", "#B#", '#', Item.ingotGold, 'I', Item.ingotIron, 'G', Block.glass, 'B', Block.blockGold }); //Black ModLoader.addShapelessRecipe(new ItemStack(mod_Sea.submarine, 1, 0), new Object[] {new ItemStack(mod_Sea.submarine, 1, 1-2), new ItemStack(Item.dyePowder, 1, 0)}); //Red ModLoader.addShapelessRecipe(new ItemStack(mod_Sea.submarine, 1, 1), new Object[] {new ItemStack(mod_Sea.submarine, 1, 1-2), new ItemStack(Item.dyePowder, 1, 1)}); //Green ModLoader.addShapelessRecipe(new ItemStack(mod_Sea.submarine, 1, 2), new Object[] {new ItemStack(mod_Sea.submarine, 1, 1-2), new ItemStack(Item.dyePowder, 1, 2)}); //Brown ModLoader.addShapelessRecipe(new ItemStack(mod_Sea.submarine, 1, 3), new Object[] {new ItemStack(mod_Sea.submarine, 1, 1-2), new ItemStack(Item.dyePowder, 1, 3)}); //Blue ModLoader.addShapelessRecipe(new ItemStack(mod_Sea.submarine, 1, 4), new Object[] {new ItemStack(mod_Sea.submarine, 1, 1-2), new ItemStack(Item.dyePowder, 1, 4)}); //Purple ModLoader.addShapelessRecipe(new ItemStack(mod_Sea.submarine, 1, 5), new Object[] {new ItemStack(mod_Sea.submarine, 1, 1-2), new ItemStack(Item.dyePowder, 1, 5)}); //Cyan ModLoader.addShapelessRecipe(new ItemStack(mod_Sea.submarine, 1, 6), new Object[] {new ItemStack(mod_Sea.submarine, 1, 1-2), new ItemStack(Item.dyePowder, 1, 6)}); //Silver ModLoader.addShapelessRecipe(new ItemStack(mod_Sea.submarine, 1, 7), new Object[] {new ItemStack(mod_Sea.submarine, 1, 1-2), new ItemStack(Item.dyePowder, 1, 7)}); //Gray ModLoader.addShapelessRecipe(new ItemStack(mod_Sea.submarine, 1, , new Object[] {new ItemStack(mod_Sea.submarine, 1, 1-2), new ItemStack(Item.dyePowder, 1, }); //Pink ModLoader.addShapelessRecipe(new ItemStack(mod_Sea.submarine, 1, 9), new Object[] {new ItemStack(mod_Sea.submarine, 1, 1-2), new ItemStack(Item.dyePowder, 1, 9)}); //Lime ModLoader.addShapelessRecipe(new ItemStack(mod_Sea.submarine, 1, 10), new Object[] {new ItemStack(mod_Sea.submarine, 1, 1-2), new ItemStack(Item.dyePowder, 1, 10)}); //Yellow ModLoader.addShapelessRecipe(new ItemStack(mod_Sea.submarine, 1, 11), new Object[] {new ItemStack(mod_Sea.submarine, 1, 1-2), new ItemStack(Item.dyePowder, 1, 11)}); //Magenta ModLoader.addShapelessRecipe(new ItemStack(mod_Sea.submarine, 1, 12), new Object[] {new ItemStack(mod_Sea.submarine, 1, 1-2), new ItemStack(Item.dyePowder, 1, 12)}); //Light Blue ModLoader.addShapelessRecipe(new ItemStack(mod_Sea.submarine, 1, 13), new Object[] {new ItemStack(mod_Sea.submarine, 1, 1-2), new ItemStack(Item.dyePowder, 1, 13)}); //Orange ModLoader.addShapelessRecipe(new ItemStack(mod_Sea.submarine, 1, 14), new Object[] {new ItemStack(mod_Sea.submarine, 1, 1-2), new ItemStack(Item.dyePowder, 1, 14)}); //White ModLoader.addShapelessRecipe(new ItemStack(mod_Sea.submarine, 1, 15), new Object[] {new ItemStack(mod_Sea.submarine, 1, 1-2), new ItemStack(Item.dyePowder, 1, 15)}); } public void addRenderer(Map map) { map.put(net.minecraft.src.EntityCrabWalking.class, new RenderCrabWalking(new ModelCrabWalking(), new ModelCrabWalking(), 0.5F)); map.put(net.minecraft.src.EntitySubmarine.class, new RenderSubmarine(new ModelSubmarine(), new ModelSubmarine(), 0.5F)); } public void load() { //Item Speadsheet MinecraftForgeClient.preloadTexture("/seaItems.png"); //Crabs ModLoader.addSpawn(EntityCrabWalking.class, 7, 1, 6, EnumCreatureType.creature, BiomeGenBase.beach); } public String getVersion() { return "Sea Life v0.1"; } } First of all: You need to give us the Entity and Item files, otherwise, we can't even bother trying to help you. Second of all: You are on the forge forums. Why not use the real forge methods, rather than the boring, old and slow ModLoader methods?
- Help
-
[Unsolved] Array-related crash when opening container GUI
What about your TileEntity, does it actually have the array size of 11 (or 12, if I misread your post. It needs to be 1 more than the highest number you use in the code, at least). If it doesn't, there is your problem. Else, I have no clue what the problem is...
-
[4.1.1] registerGuiHandler will only open the last one
That's a very good one, indeed.
-
[4.1.1] registerGuiHandler will only open the last one
It's a good thing it's solved now, right? But then the question remains: WHY doesn't it work the other way...
-
[1.3.2] Mounting Entitites [UNSOLVED]
Maybe you should add a check to make sure there isn't a NullPointer. Thid line: EntityPegasus.java:110 has an error, because you try to use a variable which holds the value "null". Just make sure it isn't null when you use it, like so: if(var != null) { // Code Here }
-
Cannot decompile (could not find server jar) minecraftforge-src 4.1.1.265
I can totally understand your indignation...
-
[4.1.1] registerGuiHandler will only open the last one
You need only one handler. But ONE. You need to check the ID of the GUI in your handler, and open the correct GUI accordingly anyways, because otherwise other mods may have problems with you.
-
invalid method annotation PreInit error
The method you are using needs to take an argument, which is a FMLPreInitializationEvent. Maybe you should add that to your method...
-
Forge 4.1.1 Armor is invisible.
Why not use the forge methods? They seem better IMO, since you are using forge anyways RenderingRegistery.addNewArmourRendererPrefix(String armor); 1 minute of searching around and I found it
-
[solved] Custom Item Render
You need to add a new Block renderer. Like this, for instance: public class RendererCircle implements ISimpleBlockRenderingHandler { public static final int blockRenderId = RenderingRegistry.getNextAvailableRenderId(); public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) { } public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { } public boolean shouldRender3DInInventory() { return false; } public int getRenderId() { return blockRenderId; } And in your block, make the render type equal to the blockRenderId variable. I'm not sure what you need to add, because you want to render it in a different way than I do (I have a 2D-ish block) so you'd have to figure it out yourself. (HINT: use the Tesselator.instance !)
-
[1.3.2 UNSOLVED] Create a flat block that can go between two blocks
You can store the TileEntity in the block object and then access it from that method, right?
-
[1.3.2] Mounting Entitites [UNSOLVED]
java.lang.ClassCastException: net.minecraft.src.EntityClientPlayerMP cannot be cast to net.minecraft.src.EntityPlayerMP Have you read this very carefully? Because you would've noticed that this doesn't cast to itself, but it casts a EntityClientPlayerMP to a EntityPlayerMP (see the Client in the first one?) I have no idea how to fix this though...
-
[1.3.2] Mounting Entitites [UNSOLVED]
Dude, the registering is probably fine, because if you look at the crashlog, it'll tell you that he's trying an invalid type-cast. That's probably his main problem now.
-
A critical error when handling a packet
I hope you aren't using the ModLoader.getMinecraftInstance(); on the server side...
-
[1.3.2] Mounting Entitites [UNSOLVED]
That riddenByEntity variable is a EntityPlayerMP object. However, you are trying to cast it to a EntityPlayerSP, which is impossible. Try to use another way
-
[1.3.2] Getting the Orientation/Rotation of a block?
About the first issue, have you tried using a bitwise AND operation? (&) I don't know which number you would need for that to work, but I can imagine that it would work somewhat like that.
-
[UNSOLVED] Force chunk-wide lighting update?
Perhaps with this method? World.markBlockForUpdate(int x, int y, int z); (I believe it was like that, not sure about the params though... )
-
setBlockBounds based on meta/damage?
So where do you get the metadata from?
-
Block Creation help
Perhaps you need to put it into a method?
-
How to make a check other blocks in a radius help?
Just one small issue with that one: It will only find the first one, because it stops at the "return" statement.
-
How do I switch off fall damage?
No problem. It doesn't seem to work for me for some reason though. I jsut updated to the newest forge (build 240... not really "just" but about 2 days ago) and am hoping it works now. If it doesn't, I'm gonna ask a question about it here...
-
How do I switch off fall damage?
I'm sorry, I didn't have my Eclipse open at the time. What I meant was, of course: MinecraftForge.EVENT_BUS.register(new AddNameHereForClassWithMethodAnnotatedWithForgeSubscribe()); Place that in your @Init method and it should be fine. If it isn't, I can't help you any further, sorry about that.
-
Inventory Synchronization
I don't know how/where it is done in vanilla code, but you can always try sending packets. This is as far as my knowledge about packets goes though, so you might want to wait for other people to help you with that.
-
How do I switch off fall damage?
You need to use this method: GameRegistry.EVENt_BUS.registerEventHandler(new ClassWithForgeSubscribeAnnotation()); I believe it was that one, but it might be one of the Forge / FML classes (FMLCommonHandler?)
IPS spam blocked by CleanTalk.