• 1

    posted a message on [SOLVED]Item is partially 3-dimensional and is also held like a normal item

    I found the problem. In my json file, instead of putting "item/generated" I needed to put "item/handheld".

    Posted in: Modification Development
  • 0

    posted a message on [SOLVED]Item is partially 3-dimensional and is also held like a normal item

    For my texturing, I simply used paint.net. But all of my model files are simply something like this:

    {
    "parent": "item/generated",
    "textures": {
    "layer0": "toweomod:items/shadow_slicer"
    }
    }
    but the shadow sword is the only one that doesn't have a side texture.

    Posted in: Modification Development
  • 0

    posted a message on [SOLVED]Item is partially 3-dimensional and is also held like a normal item

    Hey, so I'm creating a weapon (Shadow Slicer). When I load up the game, the sword texture isn't 3D like it's supposed to be. Bit hard to explain, here's an image: https://imgur.com/7komdPL. The model is the same as every other model and I redid the texture and nothing happened.


    All of my tools are also being held like normal items are: https://imgur.com/PmfFMKv. And yes, I did try this.bFull3D = true, it did not work. All my models seem fine, and classes almost all have the exact same code in them. Though I'm using a general class for each type of tool except for sword that have special effects, such as invisibility or explosions.


    Heres my ModItems.java:


    package epicoreo.toweo.objects.items;
    
    import java.util.ArrayList;
    import java.util.List;
    
    import epicoreo.toweo.objects.armor.ArmorBase;
    import epicoreo.toweo.objects.items.tools.FireSword;
    import epicoreo.toweo.objects.items.tools.ShadowSword;
    import epicoreo.toweo.objects.items.tools.ToolAxe;
    import epicoreo.toweo.objects.items.tools.ToolHoe;
    import epicoreo.toweo.objects.items.tools.ToolPickaxe;
    import epicoreo.toweo.objects.items.tools.ToolSpade;
    import epicoreo.toweo.objects.items.tools.ToolSword;
    import epicoreo.toweo.util.References;
    import net.minecraft.init.SoundEvents;
    import net.minecraft.inventory.EntityEquipmentSlot;
    import net.minecraft.item.Item;
    import net.minecraft.item.Item.ToolMaterial;
    import net.minecraft.item.ItemArmor.ArmorMaterial;
    import net.minecraftforge.common.util.EnumHelper;
    
    public class ModItems {
    
    	public static final List<Item> ITEMS = new ArrayList<Item>();
    
    	// Tool Materials
    	public static final ToolMaterial TOOL_FLAME = EnumHelper.addToolMaterial("tool_flame", 4, 5000, 10.0F, 15.0F, 0);
    	public static final ToolMaterial TOOL_BONE = EnumHelper.addToolMaterial("tool_bone", 3, 2000, 9.0F, 4.0F, 0);
    	public static final ToolMaterial TOOL_SHADOW = EnumHelper.addToolMaterial("tool_shadow", 5, 7500, 15.0F, 20.0F, 0);
    	public static final ToolMaterial TOOL_OBSIDIAN = EnumHelper.addToolMaterial("tool_obsidian", 0, 1021, 0.0F, 5.5F, 15);
    	
    	// Armor Materials
    	public static final ArmorMaterial ARMOR_FLAME = EnumHelper.addArmorMaterial("armor_flame", References.MODID + ":flame", 5000, new int[]{5, 8, 10, 5}, 0, SoundEvents.ITEM_ARMOR_EQUIP_IRON, 4.0F);
    	
    	// Dagger Materials
    	public static final ToolMaterial STONEDAGGER = EnumHelper.addToolMaterial("stonedagger", 0, 131, 0.0F, 0.7F, 8);
    	public static final ToolMaterial IRONDAGGER = EnumHelper.addToolMaterial("irondagger", 0, 250, 0.0F, 1.5F, 5);
    	public static final ToolMaterial DIAMONDDAGGER = EnumHelper.addToolMaterial("diamonddagger", 0, 1561, 0.0F, 2.5F, 10);
    	public static final ToolMaterial OBSIDIANDAGGER = EnumHelper.addToolMaterial("obsidiandagger", 0, 1021, 0.0F, 3.5F, 15);
    	
    	// Items
    	public static final Item COMPRESSED_FLAME = new ItemBase("compressed_flame");
    	public static final Item REINFORCED_STICK = new ItemBase("reinforced_stick");
    	public static final Item SHADOW_SOUL = new ItemBase("shadow_soul");
    	public static final Item SHADOW_ROD = new ItemBase("shadow_rod");
    	public static final Item SHADOW_CORE = new ItemBase("shadow_core");
    	
    	// Swords
    	public static final Item FLAME_BLADE = new FireSword("flame_blade", TOOL_FLAME);
    	public static final Item BONE_CRUSHER = new ToolSword("bone_crusher", TOOL_BONE);
    	public static final Item SHADOW_SLICER = new ShadowSword("shadow_slicer", TOOL_SHADOW);
    	public static final Item OBSIDIAN_SWORD = new ToolSword("obsidian_sword", TOOL_OBSIDIAN);
    
    	
    	// Daggers
    	public static final Item STONE_DAGGER = new ToolSword("stone_dagger", STONEDAGGER);
    	public static final Item IRON_DAGGER = new ToolSword("iron_dagger", IRONDAGGER);
    	public static final Item DIAMOND_DAGGER = new ToolSword("diamond_dagger", DIAMONDDAGGER);
    	public static final Item OBSIDIAN_DAGGER = new ToolSword("obsidian_dagger", OBSIDIANDAGGER);
    	
    	// Pickaxes
    	public static final Item FLAME_PICKAXE = new ToolPickaxe("flame_pickaxe", TOOL_FLAME);
    	public static final Item BONE_PICKAXE = new ToolPickaxe("bone_pickaxe", TOOL_BONE);
    	public static final Item SHADOW_PICKAXE = new ToolPickaxe("shadow_pickaxe", TOOL_SHADOW);
    	
    	// Axes
    	public static final Item FLAME_AXE = new ToolAxe("flame_axe", TOOL_FLAME);
    	public static final Item BONE_AXE = new ToolAxe("bone_axe", TOOL_BONE);
    	public static final Item SHADOW_AXE = new ToolAxe("shadow_axe", TOOL_SHADOW);
    	
    	// Spades
    	public static final Item FLAME_SPADE = new ToolSpade("flame_spade", TOOL_FLAME);
    	public static final Item BONE_SPADE = new ToolSpade("bone_spade", TOOL_BONE);
    	public static final Item SHADOW_SPADE = new ToolSpade("shadow_spade", TOOL_SHADOW);
    	
    	// Hoes
    	public static final Item FLAME_HOE = new ToolHoe("flame_hoe", TOOL_FLAME);
    	public static final Item BONE_HOE = new ToolHoe("bone_hoe", TOOL_BONE);
    	public static final Item SHADOW_HOE = new ToolHoe("shadow_hoe", TOOL_SHADOW);
    	
    	// Armor
    	public static final Item FLAME_HELMET = new ArmorBase("flame_helmet", ARMOR_FLAME, 1, EntityEquipmentSlot.HEAD);
    	public static final Item FLAME_CHESTPLATE = new ArmorBase("flame_chestplate", ARMOR_FLAME, 1, EntityEquipmentSlot.CHEST);
    	public static final Item FLAME_LEGGINGS = new ArmorBase("flame_leggings", ARMOR_FLAME, 2, EntityEquipmentSlot.LEGS);
    	public static final Item FLAME_BOOTS = new ArmorBase("flame_boots", ARMOR_FLAME, 1, EntityEquipmentSlot.FEET);
    }



    Here's my ShadowSword.java:


    package epicoreo.toweo.objects.items.tools;
    
    import epicoreo.toweo.main.Main;
    import epicoreo.toweo.objects.items.ModItems;
    import net.minecraft.entity.player.EntityPlayer;
    import net.minecraft.init.MobEffects;
    import epicoreo.toweo.util.IHasModel;
    import net.minecraft.item.ItemStack;
    import net.minecraft.item.ItemSword;
    import net.minecraft.potion.PotionEffect;
    import net.minecraft.util.ActionResult;
    import net.minecraft.util.EnumActionResult;
    import net.minecraft.util.EnumHand;
    import net.minecraft.world.World;
    
    public class ShadowSword extends ItemSword implements IHasModel{
    
    	public ShadowSword(String name, ToolMaterial material) {
    		
    		super(material);
    		setUnlocalizedName(name);
    		setRegistryName(name);
    		setCreativeTab(Main.toweoitems);
    		bFull3D = true;
    		
    		ModItems.ITEMS.add(this);
    	}
    	
    	@Override
    	public void registerModels() {
    		Main.proxy.registerItemRenderer(this, 0, "inventory");
    	}
    	
    	@SuppressWarnings({ "unchecked", "rawtypes" })
    	@Override
    	public ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer playerIn, EnumHand handIn) {
    	
    		if(!worldIn.isRemote){
    			
    			playerIn.addPotionEffect(new PotionEffect(MobEffects.INVISIBILITY, 200, 1, false, false));
    			
    			return new ActionResult(EnumActionResult.SUCCESS, new ItemStack(this));
    		}
    		
    		else{
    		    return new ActionResult(EnumActionResult.FAIL, new ItemStack(this));
    		}
    	}
    
    }


    Here's the general ToolSword.java file:


    package epicoreo.toweo.objects.items.tools;
    
    import epicoreo.toweo.main.Main;
    import epicoreo.toweo.objects.items.ModItems;
    import epicoreo.toweo.util.IHasModel;
    import net.minecraft.item.ItemSword;
    
    public class ToolSword extends ItemSword implements IHasModel {
    
    	public ToolSword(String name, ToolMaterial material) {
    		
    		super(material);
    		setUnlocalizedName(name);
    		setRegistryName(name);
    		setCreativeTab(Main.toweoitems);
    		this.bFull3D = true;
    		
    		ModItems.ITEMS.add(this);
    	}
    	
    	@Override
    	public void registerModels() {
    		Main.proxy.registerItemRenderer(this, 0, "inventory");
    	}
    }



    Can anyone tell me why this is happening and how I can fix it? Thanks!!


    ~EpicOweo

    Posted in: Modification Development
  • To post a comment, please or register a new account.