• 0

    posted a message on Extreme Reactors 2 - A Big Reactors port to MC 1.10.2, 1.11.2 and 1.12/1.12.2 / 1.16.3/4/5
    I'm putting ZeroCore and Extreme Reactors in my private server pack, due to overwhelming demand. I'm trying to do the legal stuff right so I have the option to publish at some point in the future, so here's your heads up as requested in the license on CurseForge :D

    Thanks for writing this awesome stuff!

    Posted in: Minecraft Mods
  • 0

    posted a message on Develop two mods in one Eclipse workspace?

    I appreciate it when mods are as focused as possible, each with one main idea that they do well. Because of this, I'm considering splitting an existing mod I haven't yet published into two separate jars, based on the type of feature in each. The first is a little mod that allows players to upgrade the attack speed of weapons with Ender Pearls (as a compromise solution for those who hate 1.9+ combat, and those who love it), and the second is yet another one of *those* mods that adds recipes for Vanilla items that really should have them.


    It feels wrong for them to be one mod, but before I split them, I was wondering if there was a way to develop and export two entirely separate mods, each a separate .jar with its own mcmod.info file, from one Eclipse workspace. Is it possible to do this, or do I have to create an entirely new Eclipse workspace and development folder from scratch?

    Posted in: Modification Development
  • 0

    posted a message on JSON Modelling - Call Vanilla Texture File For New Item

    Thanks! That was a lot easier than I thought it would be; I assumed I would have to specify the path further up than "items/", and didn't know at what level to start. But apparently, omitting the modid prefix in the layer0 line makes it choose vanilla textures. I seem to have a pattern of assuming things are more complicated than they actually are...

    Posted in: Modification Development
  • 0

    posted a message on JSON Modelling - Call Vanilla Texture File For New Item

    This is pretty much what is says on the tin. I'm creating a mod for 1.9.4 and 1.10.2 that revolves around taking advantage of the Attack Speed mechanic to create a second tier of accelerated tools. It was motivated by the conflicted community response to the mechanic, and is designed to serve as a compromise between those who love it and those who despise it.


    However, I'm stuck on the texturing. I'd like the modded items to have the same textures as the vanilla items they serve as upgrades to. E.g., a "Zippy Iron Sword" should have the same texture as a normal "Iron Sword". I would rather not copy the texture files from the vanilla game, as they would be such a large part of the mod that fair use would no longer apply. It would also be a headache for resource pack development.


    Ideally, I'd like to mirror the vanilla textures on my Items so resource packs will automatically work with no special effort. Mr. Crayfish's Furniture Mod somehow uses the vanilla oak bark and oak planks textures for his furniture, without actually having copies of them in the mod assets. What would I have to put into the JSON model files to reference vanilla textures that aren't actually in my mod?

    Posted in: Modification Development
  • 0

    posted a message on Make Blocks drop ItemStack objects
    Quote from Bright_Spark»

    For information of the json files, have a look at this:

    http://minecraft.gamepedia.com/Model


    They're actually really good. Bit strange to adjust from 1.7.10, but I love the ease of making models now.


    The actual contents of the models make perfect sense to me; more sense in most cases than the roundabout way things were put together in 1.7.10. What I have trouble with is how to connect the blockstate files to my actual java code. Most tutorials these days are on Youtube, which is a huge problem for me; learning anything from a video, be it coding, calculus, or how to build a piece of furniture, is nearly impossible for me, as I have a very nonlinear learning style. Text tutorials seem to be in short supply...

    This is starting to get off-topic on a thread already marked solved, so I think I should probably start a new one.
    Posted in: Modification Development
  • 0

    posted a message on Make Blocks drop ItemStack objects

    Of course it's outdated. The fact remains that I write mods to play with other mods, and while I don't want to play with mods that have already declared an intent not to update, there are still some that have higher priorities than updating. Therefore, I started with 1.7.10 with the plan of developing in parallel even though it's likely to double my work, simply for the sake of being able to play with Erebus and Applied Energistics. It will be a while before they see updates, as the former is a MASSIVE project whose developers want to complete the feature-set before updating, and the latter is suffering from manpower shortages, and has the same mindset of overhauling the mod from a solid base. I can see the appeal of this myself, even if I'm not doing it personally; once I know how to do something, I simply need to relearn the parts that are different.


    Also, it's stupidly hard to find tutorials for the 1.8+ json modeling system. I mean, I love the system when I use it in resource packs, I just haven't been able to find a good explanation of how it fits into the java code. Personally, I don't retain information on how to do something until I know why it works that way; the tutorials I've been able to find only address the former. :)


    UPDATE: I recently discovered stuff in the plans for Applied Energistics that makes my mod partially redundant. Enough so that I can just develop for 1.10. You have no idea how relieved I am that I no longer have a reason to parallel develop.

    Posted in: Modification Development
  • 0

    posted a message on Make Blocks drop ItemStack objects

    SOLVED


    Apparently, I just need to leave public int damageDropped() in there for the sake of making silk touch work correctly, and the item metadata will automatically inherit. Slick! Relevant methods:

    @Override
    public int damageDropped(int par1){
        return par1;
    }
    @Override
    public Item getItemDropped(int metadata, Random rand, int fortune){
        return MasonCraft.garnet;
    }
    Posted in: Modification Development
  • 0

    posted a message on Make Blocks drop ItemStack objects

    I already tried that. getItemDropped doesn't return an itemStack; it returns a plain Item, and I can't change the type of the method to return an itemStack. I need to return an itemStack in order to include the metadata of the item to be dropped, and allow for the possibility of dropping multiple items.

    Posted in: Modification Development
  • 0

    posted a message on Make Blocks drop ItemStack objects

    The title pretty much says it all. I have an ore block (Garnet Ore) that I want to drop specific metadata items, a la lapis lazuli ore. However, I can't figure out how to make a block spawn an ItemStack object when broken. Specifically, I need to check the metadata value of the ore block (from 0 to 3) and drop the garnet item with the corresponding metadata:

    ItemStack(garnet, 1, metadata)



    However, I can't find any methods in Block that return an ItemStack object... What do I override? Is it some obtuse multiple-method maze of things calling each other that eventually spits out an ItemStack, or am I just terribly oblivious to something staring me in the face?


    Block class:



    package com.ejmeyer.MasonCraft;
    
    import java.util.List;
    import java.util.Random;
    
    import cpw.mods.fml.relauncher.Side;
    import cpw.mods.fml.relauncher.SideOnly;
    import net.minecraft.block.Block;
    import net.minecraft.block.Block.SoundType;
    import net.minecraft.block.material.Material;
    import net.minecraft.client.renderer.texture.IIconRegister;
    import net.minecraft.creativetab.CreativeTabs;
    import net.minecraft.item.Item;
    import net.minecraft.item.ItemStack;
    import net.minecraft.util.IIcon;
    
    public class BlockGarnetOre extends Block {
    	private String name = "";
    	private String[] typeName = {"red","yellow","green","blue"};
    	@SideOnly(Side.CLIENT)
    	private IIcon[] typeIcons;
    	
    	public BlockGarnetOre(String blockName){
    		super(Material.rock);
    		name = blockName;
    		setBlockName(MasonCraft.MODID + "_" + name);
    		setCreativeTab(CreativeTabs.tabBlock);
    		
    		setHardness(5.0F);
    		setResistance(10.0F);
    		setHarvestLevel("pickaxe", 1);
    		setStepSound(Block.soundTypeStone);
    	}
    	//SPECIFY DROPS HERE SPECIFY DROPS HERE SPECIFY DROPS HERE SPECIFY DROPS HERE
    	//SPECIFY DROPS HERE SPECIFY DROPS HERE SPECIFY DROPS HERE SPECIFY DROPS HERE
    	//SPECIFY DROPS HERE SPECIFY DROPS HERE SPECIFY DROPS HERE SPECIFY DROPS HERE
    	//SPECIFY DROPS HERE SPECIFY DROPS HERE SPECIFY DROPS HERE SPECIFY DROPS HERE
    	
    	@SideOnly(Side.CLIENT)
    	@Override
    	public void registerBlockIcons(IIconRegister par1IconRegister){
    		typeIcons = new IIcon[4];
    		for (int k = 0; k < typeIcons.length; k++){
    			typeIcons[k] = par1IconRegister.registerIcon(MasonCraft.MODID + ":" + "garnet_block" + "_" + typeName[k]);
    		}
    	}
    	@SideOnly(Side.CLIENT)
    	@Override
    	public IIcon getIcon(int par1, int par2){
    		if (par2 > 3){
    			par2 = 0;
    		}
    		return typeIcons[par2];
    	}
    	@SuppressWarnings({"unchecked","rawtypes"})
    	@SideOnly(Side.CLIENT)
    	@Override
    	public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List){
    		for (int k = 0; k < 4; ++k){
    			par3List.add(new ItemStack(par1, 1, k));
    		}
    	}
    }
    


    ItemBlock class:

    package com.ejmeyer.MasonCraft;
    
    import net.minecraft.block.Block;
    import net.minecraft.item.ItemBlock;
    import net.minecraft.item.ItemStack;
    
    public class ItemBlockGarnet extends ItemBlock {
     public ItemBlockGarnet(Block block){
     super(block);
     setHasSubtypes(true);
     }
     @Override
     public String getUnlocalizedName(ItemStack itemstack){
     String name = "";
     switch(itemstack.getItemDamage()){
     case 0:
     name = "red";
     break;
     case 1:
     name = "yellow";
     break;
     case 2:
     name = "green";
     break;
     case 3:
     name = "blue";
     break;
     default:
     System.out.println("Invalid Metadata for BlockGarnet");
     name = "broken";
     break;
     }
     return getUnlocalizedName() + "." + name;
     }
     @Override
     public int getMetadata(int par1){
     return par1;
     }
    }
    
    Posted in: Modification Development
  • 0

    posted a message on ItemAxe secondary constructor - Example?

    I knew I would have a 'percussive facepalm moment' when I got an answer! I was not disappointed. :P


    Thanks! The more I learn about Java as a language, the more I like it. Just like C++!


    As a side note, I discovered that the first constructor of your example isn't strictly necessary; I just took line 17 and threw it in.

    Posted in: Modification Development
  • 0

    posted a message on ItemAxe secondary constructor - Example?

    I am working on a little mod to expand combat mechanics for 1.9+. (Katanas, jians, grenades, admin sword, etc.) I have a full set of Bismuth tools put together, but, like everybody else, I'm having trouble with the axe. Due to the fact that the speeds and damages of various Vanilla axes are stored in fixed-size arrays, extending ItemAxe leads to a crash at launch - any new axe with a new ToolMaterial will exceed the bounds of the array. According to the link at the end of this post, the official (and cleanest - much easier than simply extending ItemTool) way to get around this is to use the second constructor of ItemAxe when extending it, but that's about all I've been able to find on the entire internet.


    Does anybody have some more specific ideas of what to do? This is my first real project that hasn't been in C++, so I would appreciate being walked through the necessary Java steps to properly extend the class.


    Code for ItemToolAxe (extends ItemAxe):

    package com.yaractys.testMod;
    
    import net.minecraft.creativetab.CreativeTabs;
    import net.minecraft.item.Item;
    import net.minecraft.item.ItemTool;
    import net.minecraft.item.ItemAxe;
    
    public class ItemToolAxe extends ItemAxe {
    	private String name = "";
    	
    	public ItemToolAxe(ToolMaterial material, float damage, float speed, String itemName) {
    		super(material);
    		setRegistryName(itemName);
    		setUnlocalizedName(TestMod.MODID + "_" + itemName);
    		setCreativeTab(CreativeTabs.TOOLS);
    		this.damageVsEntity = damage;
            this.attackSpeed = speed;
    		name = itemName;
    	}
    	public String getName() {
    		return name;
    	}
    }



    http://www.minecraftforge.net/forum/index.php?topic=39920.0

    Posted in: Modification Development
  • To post a comment, please .