Jump to content

MrGirboto

Members
  • Posts

    14
  • Joined

  • Last visited

Everything posted by MrGirboto

  1. Prior to posting, I tried to dig around to see if I could find anything for 1.13/1.14. I have an item whose recipe includes a water bucket, and after crafting, an empty bucket is returned to the player's inventory. How do I go about preventing the empty bucket from being returned? Is there a way to do so within the JSON file of the new item? I'm currently using forge 1.14.3.
  2. I know how to make imports, it's just with the most recent update I have too many imports, what with all the minecraft files grouped into so many packages. It won't let me use "net.minecraft.*" either. Is there some way to just import all the minecraft javas without having to add "net.minecraft.blocks""net.minecraft.entity""net.minecraft.item", etc. i just want one "net.minecraft.*"
  3. is there a way i can check if a certain item is in the smeltable slot in the furnace. (where iron ore, gold ore, etc goes). I'm trying to make a block change its texture depending on what item is in the smeltable slot. I tried an if statement like: if (tile.inv[0] == new ItemStack(Item.wheat)) { bindTextureByName("/****/****/*********.png"); } where "tile" is the tileEntity, "inv" is the inventory slot, and "[0]" is the smeltable slot. instead of changing the texture to what i want it just changes it to a glitchy terrain.png.
  4. have you heard of Techne? if not look up some tutorials on how it works
  5. is there a way i can either; -Get an entity to stop jumping around (in water), and move smoothly like a squid (or like how a ghast flies in the air) -Get and entity to stop jumping ever.
  6. Anyone know of a way i can either; 1. Make the EntityPlayer class breathe underwater without editing base classes. or 2. Make a helmet (armor) spawn with respiration and have it count towards the entityplayer being able to breathe underwater without editing base classes. i know it might be much to ask, but maybe to some people out there there is an easy solution to either of these.
  7. i dont know any of the forge methods. i know i need to learn them, but ill do that later. ENTITY Mod_ Render
  8. 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"; } }
  9. alright i'll give that a try, i'll report back to you later if that works for me,
  10. NOTE: Please DO NOT COPY OR STEAL any of the following code below. It is copyrighted by me. I want to make a mob that when you place a certain item with multiple data values it spawns only that colored mob. Example; if i made dyes spawn a sheep and each dye would spawn the specific colored sheep (blue dye spawns blue sheep). how would i go about doing this. here's le code if its needed to help. Entity Class package net.minecraft.src; import java.util.List; import cpw.mods.fml.common.Side; import cpw.mods.fml.common.asm.SideOnly; import net.minecraft.src.EntityPlayer; import net.minecraftforge.client.MinecraftForgeClient; public class EntitySubmarine extends EntityAnimal { public boolean stationary; private double boatYaw; public EntityPlayer Player; public ItemSubmarine isub; public mod_Sea sea; public EntitySubmarine(World par1World) { super(par1World); this.texture = "/mob/seamob/submarine/Submarine_Black.png"; this.setSize(1.5F, 1.5F); this.setSprinting(isInWater()); this.moveSpeed = 0.3F; stationary = false; } public boolean canBreatheUnderwater() { return true; } public double getMountedYOffset() { return (double)this.height * 0.0D - -0.07500000D; } public int getMaxHealth() { return 6; } public EntitySubmarine(World par1World, double par2, double par4, double par6) { this(par1World); this.setPosition(par2, par4 + (double)this.yOffset, par6); this.motionX = 0.0D; this.motionY = 0.0D; this.motionZ = 0.0D; this.prevPosX = par2; this.prevPosY = par4; this.prevPosZ = par6; } protected boolean isMovementCeased() { return stationary; } protected int getDropItemId() { return mod_Sea.submarine.shiftedIndex; } public boolean isInWater() { return this.worldObj.handleMaterialAcceleration(this.boundingBox.expand(0.0D, -0.6000000238418579D, 0.0D), Material.water, this); } public void onLivingUpdate() { if (riddenByEntity != null && (riddenByEntity instanceof EntityPlayer)) { moveEntityWithHeading(moveStrafing, moveForward); prevRotationYaw = rotationYaw = riddenByEntity.rotationYaw; prevRotationPitch = rotationPitch = 0.0F; EntityLiving entityliving = (EntityLiving)riddenByEntity; if (entityliving.isJumping && isInWater()) { motionY = 0.10000000000000001D; } if (isInWater()) { entityliving.addPotionEffect(new PotionEffect(Potion.nightVision.getId(), 100, 5)); } if (entityliving.isJumping && isAirBorne) { motionY = 0D; } double d = Math.abs(Math.sqrt(motionX * motionX + motionZ * motionZ)); if (d > 0.20000000000000001D) { double d1 = 0.20000000000000001D / d; motionX = motionX * d1; motionZ = motionZ * d1; } return; } List list = worldObj.getEntitiesWithinAABBExcludingEntity(this, boundingBox.expand(0.20000000298023224D, 0.0D, 0.20000000298023224D)); if(list != null && list.size() > 0) { for(int i = 0; i < list.size(); i++) { Entity entity = (Entity)list.get(i); if(entity.canBePushed()) { entity.applyEntityCollision(this); if(moveSpeed > 0.3) { //should deal damage from collision } } } } } public void moveEntity(double d, double d1, double d2) { if(riddenByEntity != null) { stationary = true; motionX += riddenByEntity.motionX; // * 0.20000000000000001D; motionZ += riddenByEntity.motionZ; // * 0.20000000000000001D; super.moveEntity(motionX, motionY, motionZ); }else { super.moveEntity(d, d1, d2); stationary = true; } } public boolean interact(EntityPlayer par1EntityPlayer) { if (this.riddenByEntity != null && this.riddenByEntity instanceof EntityPlayer && this.riddenByEntity != par1EntityPlayer) { return true; } else { if (!this.worldObj.isRemote) { par1EntityPlayer.mountEntity(this); stationary = true; } return true; } } /** * This function is used when two same-species animals in 'love mode' breed to generate the new baby animal. */ public EntityAnimal spawnBabyAnimal(EntityAnimal par1EntityAnimal) { return null; } } Please let me know if you need to see more code and info. Also, is there anyway to get a mob to emit a light? If you can help me with either of these i'm greatly appreciative.
×
×
  • Create New...

Important Information

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