• 0

    posted a message on Willing to make 3D models

    I sent you a friend request a few days but you didn't respond to it, is this still open?

    Posted in: Modification Development
  • 0

    posted a message on In Need Of Modeller and Coder!!!

    "I do not offer pay, a Minecraft mod doesn't require money so don't ask." This makes you seem a little sharp, good luck getting help with that attitude.

    Posted in: Modification Development
  • 0

    posted a message on How is the sign GUI opened?

    Hey, the title is my issue here. I'm creating custom signs which extend all of the default sign classes, but I can't find anywhere in the vanilla code that causes the sign GUI to open, so I can change the GUI on my own signs. However, I have been unable to find where the sign gets the GUI open and thus have been stuck using the default oak sign GUI on my signs. I really am confused here as I've combed through every single class and other classes the sign references, but could not find any trace of any code that opens the GUI. I can find the .java file for the GUI easily, but I'm at a complete loss as to what causes that code to run. Any help is appreciated, as I really want to change the GUI look for my own custom signs, so they can all match and not just have the same oak GUI that does not match. Thanks.

    Posted in: Modification Development
  • 0

    posted a message on SOLVED!! - Check what the player is holding in a block class

    I managed to solve it while waiting. If anyone else was wondering, I was checking if getCurrentItem().getItem() was null, instead of if getCurrentItem was null, so by that time the game would already be running null code and crashing when I held nothing.


    Here's how I fixed it:

        	EntityPlayer player = Minecraft.getMinecraft().thePlayer;
        	Item heldItem;
        	
        	if (Minecraft.getMinecraft().thePlayer.inventory.getCurrentItem() != null) {
        		heldItem = Minecraft.getMinecraft().thePlayer.inventory.getCurrentItem().getItem();
            	if(player.capabilities.isCreativeMode && heldItem == barrier) {
                    world.spawnParticle(particle, d0, d1, d2, 255.0D, -255D, 0.0D);
                    world.spawnParticle(particle, d0, d1, d2, 255.0D, -255D, 0.0D);
            	}
        	} 


    As you can see, I don't let heldItem ever be set if getCurrentItem() is null unlike the old code, instead of going to .getItem(), since by then the getCurrentItem() will be null.

    Posted in: Modification Development
  • 0

    posted a message on SOLVED!! - Check what the player is holding in a block class

    UPDATE: Okay, so I found out that Minecraft.getMinecraft() has thePlayer which is nothing new, but I learned that this allows me to basically do the same thing as EntityPlayer. (I was under the impression it was missing a few things.) However...

        	EntityPlayer player = Minecraft.getMinecraft().thePlayer;
        	boolean holdingBarrier;
        	
        	if(player.getCurrentEquippedItem().getItem() == Item.getItemFromBlock(VanillaEnhanced.blockBarrier) && player.getCurrentEquippedItem().getItem() != null) {
        		holdingBarrier = true;
        	} else {
        		holdingBarrier = false;
        	}
    		if(player.capabilities.isCreativeMode == true && holdingBarrier == true) {



    (If you're wondering why there's a variable for checking what's in the hand instead of it just being where the last if statement is, I did this just as a placeholder to see what sets the holdingBarrier to true or false for testing. Once I get things working, I'll be cleaning this up.)
    So, here's a little snippet of code I'm having trouble with. The if statement with checking the item crashes the game. If I remove the .getItem() part, and the item.getItemFromBlock parts, instead of crashing, it will just ignore what the player is holding and always return false. If I remove the holding check completely, it'll successfully check the player's game mode but that's only half of what I want.

    If it helps, the block of code this is in, is in onDisplayTick in a block's code, and is marked with @SideOnly(Side.CLIENT). Please go easy on me if I'm missing something obvious; I'm new to code, but I want to get better.

    Posted in: Modification Development
  • 0

    posted a message on SOLVED!! - Check what the player is holding in a block class

    Hey, I'm trying to find out, within my block's class, if the player is holding the block, so that way a variable can be set for use in other areas in that block's class if that is true. I already know where I want to use this, and how I'll implement it, (I'm going to be using it to determine if the code in onDisplayTick will run by if checking if the player is holding the block, be it directly or through a variable, however I can get this done) just my only roadblock is getting that crucial held item check.
    Will I need to create a class for its ItemBlock and modify that, or can this be done solely within the block class? Any help is appreciated.


    On a slightly less important note, is there a way to get a block's texture from the items folder or vice versa? (I didn't make this a separate thread to avoid double posting, and also this isn't big enough of an issue to me to make a new thread, so I just slapped this extra question right here.)

    Posted in: Modification Development
  • 0

    posted a message on Remove default mob drop

    Me again.
    I've tried adding a new withered bones for wither skeletons. For the most part this works just fine but I can't remove just bones from their drops.

    		if(event.entity instanceof EntitySkeleton) {
    			
    			Random random = new Random();
    			int j = random.nextInt(4) + 1;
    			
    			ItemStack itemDrop = new ItemStack(VanillaEnhanced.itemWitheredBone, j);
    
    			if (((EntitySkeleton)event.entityLiving).getSkeletonType() == 1){
    				event.drops.remove(Items.bone); // LINE THAT WON'T WORK
    			}
    			
    			if (((EntitySkeleton)event.entityLiving).getSkeletonType() == 1 && random.nextInt(100) <= 75){
    				event.drops.add(new EntityItem(event.entity.worldObj, event.entity.posX, event.entity.posY, event.entity.posZ, itemDrop));
    			}
    			
    			}


    I've wrote a comment on the line that's SUPPOSED to make it not drop bones, but it doesn't seem to work.

    Posted in: Modification Development
  • 0

    posted a message on [Beta 1.7.3] Basic FOV Slider Mod

    Actually I'm good. New Frontier Craft adds its own FOV slider and doesn't scale the hand, which was added after I made my post.

    Posted in: Minecraft Mods
  • 0

    posted a message on [SOLVED] Checking for specific UUID

    Ya know how Notch drops an apple when he dies? I'm doing something similar with my own food item. (Anthracite is a test before I add the item.)
    Just as a fun little thing I wanted to add. Thanks.


    Open the spoiler to see me being an idiot.



    EDIT:

    Crash Report


    A few things I've tried: (Note Eclipse wanted me to change .getUUID to getUniqueID. I've also tried the same things below but with the version of the UUID that has the hyphen and no luck.)

    	@SubscribeEvent
    	public void onLivingDrop(LivingDropsEvent event) {
    		if(event.entity instanceof EntityPlayer) {
    			if(event.entity.getUniqueID().toString() == "390d0a3955414e8e8f07115bb41684c4") {
    			ItemStack itemDrop = new ItemStack(VanillaEnhanced.blockAnthracite, 1);
    				event.drops.add(new EntityItem(event.entity.worldObj, event.entity.posX, event.entity.posY, event.entity.posZ, itemDrop));
    			}
    			}
    		}




     @SubscribeEvent
     public void onLivingDrop(LivingDropsEvent event) {
     if(event.entity.getUniqueID().toString().equals("390d0a3955414e8e8f07115bb41684c4") == true {
     ItemStack itemDrop = new ItemStack(VanillaEnhanced.blockAnthracite, 1);
     event.drops.add(new EntityItem(event.entity.worldObj, event.entity.posX, event.entity.posY, event.entity.posZ, itemDrop));
     }
     }
     }




    	@SubscribeEvent
    	public void onLivingDrop(LivingDropsEvent event) {
    		if(event.entity instanceof EntityPlayer) {
    			if(event.entity.getUniqueID().toString().equals("390d0a3955414e8e8f07115bb41684c4")) {
    			ItemStack itemDrop = new ItemStack(VanillaEnhanced.blockAnthracite, 1);
    				event.drops.add(new EntityItem(event.entity.worldObj, event.entity.posX, event.entity.posY, event.entity.posZ, itemDrop));
    			}
    			}
    		}




    EDIT 2:
    Turns out the world decided to randomly die. I'll fix my world and try again.

    EDIT 3:
    Yep, it works. Thanks.

    Posted in: Modification Development
  • 0

    posted a message on [SOLVED] Checking for specific UUID
        @SubscribeEvent
        public void onLivingDrop(LivingDropsEvent event) {
            if(event.entity instanceof EntityPlayer) {
                ItemStack itemDrop = new ItemStack(VanillaEnhanced.blockAnthracite, 1);
                    event.drops.add(new EntityItem(event.entity.worldObj, event.entity.posX, event.entity.posY, event.entity.posZ, itemDrop));
                }
            }
    }


    How can I make it so this checks for my UUID? (390d0a39-5541-4e8e-8f07-115bb41684c4)
    I tried a few different things here and nothing worked. I got weird errors. What's the correct way to check for a specific UUID?

    Posted in: Modification Development
  • 0

    posted a message on [SOLVED] Armour model texture not working

    Wow! This fixed it! I hadn't even noticed I had imported the wrong thing! Thank you so much, it finally works!

    I will be more carefully checking my imports next time.

    Posted in: Modification Development
  • 0

    posted a message on [SOLVED] Armour model texture not working

    The texture is exactly correct in the folder as shown in the OP screenshots.



    Here are the exact images used.

    Another clarification of my folders:

    Posted in: Modification Development
  • 0

    posted a message on Modifying default blocks

    I'm trying to modify the default fences and walls to connect to mine. However, the farthest I am able to get is my fence connects to it, but the vanilla fence doesn't connect back, leaving me with a weird half-and-half connection.

    I have found a way to subscribe to default events and change them. I got sheep to drop my Anthracite blocks, but so far that's the farthest I could get. I couldn't figure out what to write to make it check for fences.

    I saw something about BlockList, removing the vanilla entry and adding your version over it in a thread over at the Forge forums. I am trying desperately to find this thread again with no luck. I can't find any other way to change default blocks and information on how to do so is scarce.

    Posted in: Modification Development
  • 0

    posted a message on [SOLVED] Armour model texture not working

    Still nothing.



    	public String getArmorTexture(ItemStack itemstack, Entity entity, int slot, String type)
    	{
    		if (itemstack.getItem() == VanillaEnhanced.itemEmeraldHelmet || itemstack.getItem() == VanillaEnhanced.itemEmeraldChestplate || itemstack.getItem() == VanillaEnhanced.itemEmeraldBoots)
    		{
    			return VanillaEnhanced.modid + ":textures/models/armor/emerald_layer_1.png";
    		}
    		
    		else if (itemstack.getItem() == VanillaEnhanced.itemEmeraldLeggings)
    		{
    			return VanillaEnhanced.modid + ":textures/models/armor/emerald_layer_2.png";
    		}
    		
    		else
    		{
    			return null;
    		}
    	}
    Posted in: Modification Development
  • To post a comment, please or register a new account.