Jump to content

1.5 updating so much fun


ashtonr12

Recommended Posts

error one;

the error is under .adddungeonLoot i assume this has been reworded but couldnt find the replacement.

DungeonHooks.addDungeonLoot(new ItemStack(Item.diamond.ItemID), 1, 1, 1);

error two;

package ashtonsmod.common;

import static net.minecraftforge.common.ForgeDirection.EAST;
import static net.minecraftforge.common.ForgeDirection.NORTH;
import static net.minecraftforge.common.ForgeDirection.SOUTH;
import static net.minecraftforge.common.ForgeDirection.WEST;

import java.util.Random;

import javax.swing.text.html.parser.Entity;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

public class BlockStickyGrips extends Block
{
    protected BlockStickyGrips(int par1)
    {
        super(par1, Material.circuits);
        this.setCreativeTab(CreativeTabs.tabDecorations);
    }

    /**
     * Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been
     * cleared to be reused)
     */
    public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
    {
        this.setBlockBoundsBasedOnState(par1World, par2, par3, par4);
        return super.getCollisionBoundingBoxFromPool(par1World, par2, par3, par4);
    }
    
    public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity)
    {
    	par5Entity.motionY = 0.2;
    	par5Entity.fallDistance = 0.0F;
    }

    @SideOnly(Side.CLIENT)

    /**
     * Returns the bounding box of the wired rectangular prism to render.
     */
    public AxisAlignedBB getSelectedBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
    {
        this.setBlockBoundsBasedOnState(par1World, par2, par3, par4);
        return super.getSelectedBoundingBoxFromPool(par1World, par2, par3, par4);
    }

    /**
     * Updates the blocks bounds based on its current state. Args: world, x, y, z
     */
    public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
    {
        this.updateLadderBounds(par1IBlockAccess.getBlockMetadata(par2, par3, par4));
    }

    /**
     * Update the ladder block bounds based on the given metadata value.
     */
    public void updateLadderBounds(int par1)
    {
        float f = 0.125F;

        if (par1 == 2)
        {
            this.setBlockBounds(0.0F, 0.0F, 1.0F - f, 1.0F, 1.0F, 1.0F);
        }

        if (par1 == 3)
        {
            this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, f);
        }

        if (par1 == 4)
        {
            this.setBlockBounds(1.0F - f, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
        }

        if (par1 == 5)
        {
            this.setBlockBounds(0.0F, 0.0F, 0.0F, f, 1.0F, 1.0F);
        }
    }

    /**
     * Is this block (a) opaque and (b) a full 1m cube?  This determines whether or not to render the shared face of two
     * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
     */
    public boolean isOpaqueCube()
    {
        return false;
    }

    /**
     * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
     */
    public boolean renderAsNormalBlock()
    {
        return false;
    }

    /**
     * The type of render function that is called for this block
     */
    public int getRenderType()
    {
        return 8;
    }

    /**
     * Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z
     */
    public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4)
    {
        return par1World.isBlockSolidOnSide(par2 - 1, par3, par4, EAST ) ||
               par1World.isBlockSolidOnSide(par2 + 1, par3, par4, WEST ) ||
               par1World.isBlockSolidOnSide(par2, par3, par4 - 1, SOUTH) ||
               par1World.isBlockSolidOnSide(par2, par3, par4 + 1, NORTH);
    }

    /**
     * Called when a block is placed using its ItemBlock. Args: World, X, Y, Z, side, hitX, hitY, hitZ, block metadata
     */
    public int onBlockPlaced(World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9)
    {
        int j1 = par9;

        if ((j1 == 0 || par5 == 2) && par1World.isBlockSolidOnSide(par2, par3, par4 + 1, NORTH))
        {
            j1 = 2;
        }

        if ((j1 == 0 || par5 == 3) && par1World.isBlockSolidOnSide(par2, par3, par4 - 1, SOUTH))
        {
            j1 = 3;
        }

        if ((j1 == 0 || par5 == 4) && par1World.isBlockSolidOnSide(par2 + 1, par3, par4, WEST))
        {
            j1 = 4;
        }

        if ((j1 == 0 || par5 == 5) && par1World.isBlockSolidOnSide(par2 - 1, par3, par4, EAST))
        {
            j1 = 5;
        }

        return j1;
    }

    /**
     * Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are
     * their own) Args: x, y, z, neighbor blockID
     */
    public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5)
    {
        int i1 = par1World.getBlockMetadata(par2, par3, par4);
        boolean flag = false;

        if (i1 == 2 && par1World.isBlockSolidOnSide(par2, par3, par4 + 1, NORTH))
        {
            flag = true;
        }

        if (i1 == 3 && par1World.isBlockSolidOnSide(par2, par3, par4 - 1, SOUTH))
        {
            flag = true;
        }

        if (i1 == 4 && par1World.isBlockSolidOnSide(par2 + 1, par3, par4, WEST))
        {
            flag = true;
        }

        if (i1 == 5 && par1World.isBlockSolidOnSide(par2 - 1, par3, par4, EAST))
        {
            flag = true;
        }

        if (!flag)
        {
            this.dropBlockAsItem(par1World, par2, par3, par4, i1, 0);
            par1World.func_94571_i(par2, par3, par4);
        }

        super.onNeighborBlockChange(par1World, par2, par3, par4, par5);
    }

    /**
     * Returns the quantity of items to drop on block destruction.
     */
    public int quantityDropped(Random par1Random)
    {
        return 1;
    }

    @Override
    public boolean isLadder(World world, int x, int y, int z)
    {
        return true;
    }


@Override
public String getTextureFile(){
return CommonProxy.blocks_png;
}}

the errors are under .montionY and .fallDistance , i dont know why these are errors they work perfectly in my other blocks, maybe something to do with this block being a ladder.

 

error three

package ashtonsmod.common;

import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.monster.EntityBlaze;
import net.minecraft.entity.projectile.EntityThrowable;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;

public class EntityInkBall extends EntityThrowable
{
    public EntityInkBall(World par1World)
    {
        super(par1World);
    }

    public EntityInkBall(World par1World, EntityLiving par2EntityLiving)
    {
        super(par1World, par2EntityLiving);
    }

    public EntityInkBall(World par1World, double par2, double par4, double par6)
    {
        super(par1World, par2, par4, par6);
    }

    /**
     * Called when this EntityThrowable hits a block or entity.
     */
    protected void onImpact(MovingObjectPosition par1MovingObjectPosition)
    {
        if (par1MovingObjectPosition.entityHit != null)
        {
            byte var2 = 0;

            if (par1MovingObjectPosition.entityHit instanceof EntityBlaze)
            {
                var2 = 3;
            }

            par1MovingObjectPosition.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.func_85052_h()), 2);    		
            }

        for (int var3 = 0; var3 < 8; ++var3)
        {
            this.worldObj.spawnParticle("snowballpoof", this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);
        }

        if (!this.worldObj.isRemote)
        {
            this.setDead();
        }
    }
}

this error is under func_85052_h i assume the function has been renamed once again couldnt find the replacement anywhere.

 

i have searched the internet for answers to these problems and have found none i am trying to use this place as a last resort because some of the people on here get a bit cranky when i make noob mistakes or basic java error because of my lack of knowledge and for this i am sorry. if anyone could please help me solve these errors i would be very grateful. this is my first major update too so  if there is any obvious updating mistakes let me know.

 

P.S

i know i haven't updated my item or block textures yet i am doing that now i just thought i would give you lovely people some time to have a looky at these ones whilst i do :)

 

Use examples, i have aspergers.

Examples make sense to me.

Link to comment
Share on other sites

ok so i have done all my textures but i just cannot get that dungeon chest hook thing

the best i have is

	 ChestGenHooks.addDungeonLoot(new ItemStack(ashtonsmod.LSboots), 5, 1, 1);

 

but its missing an argument and the visibility of the hook is private anywho ?

im stuck...

Use examples, i have aspergers.

Examples make sense to me.

Link to comment
Share on other sites

i thought about that class

and i saw

public static final String DUNGEON_CHEST            = "dungeonChest";

and assumed that dungeonChest was the catagory but that was wrong so i tried DUNGEON_CHEST but that didnt work either :/

i am trying :(

Use examples, i have aspergers.

Examples make sense to me.

Link to comment
Share on other sites

OK sorry I wasn't specific enough the code is invalid an red error line appears under the area where i am meant to put a category no matter what I seem to put except null but that would defeat the point correct?

 

maybe it starts like this?

ChestGenHooks.DUNGEON_CHEST

but i dont know how to finish the line if this is the case.

Use examples, i have aspergers.

Examples make sense to me.

Link to comment
Share on other sites

i know but if i type

 

ChestGenHook. it suggest .DUNGEON_CHEST and .addItem and viable methods for adding loot to a dungeon chest.

 

if i choose .DUNGEONCHEST i cant fingure out how to finish the line

if i choose . add Item the generated line is

 

ChestgenHook.addItem(catagory, item);

 

then i change it too

 

ChestGenHook.addItem(catagory, ashtonsmod.IngotBush,1,1,1);

 

and i cannot figure out a catagory variable that does not become an error.

the 1,1,1 is the max, min and chance correct? that is not an error i just wanted to check.

Use examples, i have aspergers.

Examples make sense to me.

Link to comment
Share on other sites

no need to start getting upset with each other :)

i do not know very much about java at it isnt my fualt that they changed the dungeon hooks thing but all i am looking for the new solution, last night i got this far;

 

chestGenHooks.additem("dungenChest", new WeightedRandomChestContent(1,1,1,1,1))

 

and i know what some of the didgets do but not all of them and i cant find the right order and i dnot know if this is actually correct it just gives no errors :)

(the didgets are maxstacksize, minstacksize,chance and i dont knwo the other two and i dont knwo the order)

if this is incorrect could someone just post the correct one? if it is correct can someone tell me the order of the numbers and what they each mean please?

Use examples, i have aspergers.

Examples make sense to me.

Link to comment
Share on other sites

its not that bad of an idea as it is something you have an enthusiasm towards, the learning style is different.

if you learn java first then you just have to put in place what you have learnt, if you learn by modding then you just have to learn part by part. ie learn how to add a custom block, then a custom item, etc

and then in your next mod you already know how to do these things and if you forget you can refer to your old one :)

Use examples, i have aspergers.

Examples make sense to me.

Link to comment
Share on other sites

I am leaning java from Moding

That is a very very bad idea.
and that problem is in 1.5 they changed his hook for the dungeons and I have a mod that's going good 50 downloads but I am still updating to 1.5

It was depreciated looong before (if you weren't learning java from modding you'd know what that means), so people had time to get away from it.

Was not depreciated in 1.4.7 or many forge tutorials good for 1.4.7 on the wiki were wrong because I was going to use it for my spawner item.

Link to comment
Share on other sites

  • 2 weeks later...

Having problems with Generated Loots in chests: The Items spawn correctly, however upon right Clicking the item in your Inventory that Item disappears (Gets removed). This occurs not all the time.

 

Here is an Example of the Code I use placed in my Load() Method.

 

ChestGenHooks.getInfo(ChestGenHooks.BONUS_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(mod_HarkenScythe.HSNecronomiconPage, 1), 0, 1, 5));

 

 

Yes I know what everything means, just I am coming across this odd glich.

Link to comment
Share on other sites

I know c which is what java is made off of I understand java

 

If you would know anything about coding, software architecture and programming languages, you would know how stupid this sentence is ... I am professionally coding within an legacy code base written in c and I'm writing GUI's in c# and I have build and coded software tools using java and I can tell you, if you know c, apart from basic structures like loops and branching, you do know nothing about java... and if you know "just" java, you'll probably get hurt if you get your hands dirty in pointer arithmetic...

 

with out the need to learn it I can help but Realy stop bashing first time mod makes in the face with "Go learn java and then come back." That makes people mad.

 

That is the only way to do it. Learn java (and as many other languages as you can), learn the ideas of oop, get to know about patterns, read about this patterns, use them, learn about the intrinsic attributes of the languages you are using, LEARN TO PRODUCE CLEAN CODE!!!, learn about software architecture and then and only then try to produce a mod that's more than yet another funny additional sword mod ...

 

And if you still don't get it after 20odd posts and still think you'll become an instant coding hero just by copying some lines from a tutorial into your main mod class, the tone you're addressed with will get a bit harsher, live with it ...

 

Btw, tutorials, I use them too, but it helps if you know why what is done is done, so you can vary the code and actually use the knowledge gained by following the tutorial. If you just copy paste the stuff found in the tutorials, not you will be the author of your mod, but the different tutorial authors and you have gained nothing ...

running minecraft on Mac OS X - Sierra --- creating code since 1986 ... --- मेरा दिल भारतवासी है!

width=289 height=100http://www.arno-saxena.de/pictures/chococraft/banner_signature.png[/img]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • As the title say, game suddenly crushed during the loading. I got this error message The game crashed whilst rendering overlay Error: java.lang.RuntimeException: null   And Here's the link of crash log bit.ly/3IcVUQG
    • Do these mods have incompatibles: Dynamic View[Forge] (by someaddon) Server Performance - Smooth Chunk Save[Forge/Fabric] (by someaddon) EdivadLib (by 3divad99) Krypton Reforged (by Anthxny) AttributeFix (by DarkhaxDev) Create Stuff & Additions (by Furti_Two) Cristel Lib (by Cristelknight) Resourceful Config (by ThatGravyBoat) Applied Cooking (by ItsSebastrn) Thermal Cultivation (by TeamCoFH) SuperMartijn642's Config Lib (by SuperMartijn642) Create: Bells & Whistles (by sudolev) Thermal Integration (by TeamCoFH) SebastrnLib (by ItsSebastrn) Farmer's Delight (by vectorwing) Right Click, Get Crops (by TeamCoFH) Observable (by tasgon) FPS optimizer (by The_TCT) Dungeons and Taverns (by Nova_Wostra) Explorify – Dungeons & Structures (by bebebea_loste) Fast Leaf Decay (by olafskiii) Create: Vintage Improvements (by Negodya1) Sophisticated Backpacks (by P3pp3rF1y) SuperMartijn642's Core Lib (by SuperMartijn642) Create Crafts & Additions (by MRHminer) Structory (by botanydev) Oculus (by Asek3) Tectonic (by Apollo) Embeddium (Rubidium) Extra (by dimadencep) Athena (by CodexAdrian) Jade 🔍 (by Snownee) Mekanism Tools (by bradyaidanc) Carry On (by Tschipp) Create: Sweets & Treats (by AstralButOnCurseForge) Extreme Reactors Create Compat (by ZeroNoRyouki) AI Improvements (by QueenOfMissiles) AE2 QoL Recipes (by Christofmeg) Create: ComputerCraft (CC: Tweaked) (by EndRage) Create Enchantment Industry (by DragonsPlus) Macaw's Fences and Walls (by sketch_macaw) Better Villages - Forge (by jtl_elisa) Puzzles Lib [Forge & Fabric] (by Fuzs) Mekanism (by bradyaidanc) Create Recycle Everything (by nocubeyt) Searchables (by Jaredlll08) Immersive Paintings [Fabric/Forge] (by Conczin) Create Deco (by talrey) Thermal Foundation (by TeamCoFH) Controlling (by Jaredlll08) Kotlin for Forge (by thedarkcolour) Lithostitched (by Apollo) Let Me Despawn (by frikinjay) MCEF (Minecraft Chromium Embedded Framework) (by ds58) FPS Boost (by The_TCT) Ad Astra (by AlexNijjar) TerraBlender (Forge) (by TheAdubbz) Falling Leaves (Forge) (by Cheaterpaul) CC:C Bridge (by Sammy_echt) Xaero's Minimap (by xaero96) CoFH Core (by TeamCoFH) Create: Applied Kinetics (by Forsteri123) AE Additions - ExtraCells2 Fork (by MasterYodAT9G) Just Enough Items (JEI) (by mezz) Biomes O' Plenty (by Forstride) Curios API (Forge/NeoForge) (by TheIllusiveC4) AE2 Network Analyser (by GlodBlock) Resourceful Lib (by ThatGravyBoat) ChoiceTheorem's Overhauled Village (by ChoiceTheorem) Clockwork: Create x Valkyrien Skies (by triode_) Architectury API (Fabric/Forge/NeoForge) (by shedaniel) Canary (by AbdElAziz333) Structure Essentials[Forge/Fabric] (by someaddon) Library Ferret - Forge (by jtl_elisa) Create Confectionery (by Furti_Two) Leaky - Farm leak detection[Forge/Fabric] (by someaddon) Game Menu Mod Option [Forge] (by morimori0317) Macaw's Bridges (by sketch_macaw) FramedBlocks (by XFactHD) Cherished Worlds (Fabric/Forge/NeoForge/Quilt) (by TheIllusiveC4) Entangled (by SuperMartijn642) Refined Storage: Requestify (by Buuz135) ME Requester (by Relentless) Inventory Sorter (by cpw) Xaero's World Map (by xaero96) William Wythers' Expanded Ecosphere (by Cristelknight) Cloth Config API (Fabric/Forge/NeoForge) (by shedaniel) FTB Library (Forge) (by FTB) Cupboard (by someaddon) Thermal Dynamics (by TeamCoFH) Patchouli (by Vazkii) Entity Culling Fabric/Forge (by tr7zw) Chipped (by terrariumearth) FTB XMod Compat (by FTB) FerriteCore ((Neo)Forge) (by malte0811) Extra Disks (by MelanX) Nature's Compass (by Chaosyr) Thermal Locomotion (by TeamCoFH) TexTrue's Embeddium Options (by TexTrue) Traveler's Backpack (by Tiviacz1337) Geophilic – Vanilla Biome Overhauls (by bebebea_loste) Create: Power Loader (by Lysine) Polymorph (Fabric/Forge/Quilt) (by TheIllusiveC4) Enlightend (by lixir) Create Central Kitchen (by DragonsPlus) Energy Meter (by Relentless) Botarium (by CodexAdrian) FTB Teams (Forge) (by FTB) Storage Drawers (by Texelsaur) Create: Extended Cogwheels (by Rabbitminers) Embeddium/Rubidium Dynamic Lights (by Anthxny) Biome Makeover (Forge) (by Lemonszz) Create Guardian Beam Defense (by ibarnstormer_) Create: The Factory Must Grow (by Dr_Mango_Tea) Create Chunkloading (by embeddedt) Balm (Forge Edition) (by BlayTheNinth) Glodium (by GlodBlock) Thermal Expansion (by TeamCoFH) Chunk-Pregenerator (by Speiger) Advanced Peripherals (by srrendi) Create: Garnished (by DakotaPrideModding) Tidal Towns (by joshieman) Easy Magic [Forge & Fabric] (by Fuzs) Extreme Reactors (by ZeroNoRyouki) Applied Energistics 2 Wireless Terminals (by Mari_023) Redstone Arsenal (by TeamCoFH) ExtraStorage (by 3divad99) Thermal Innovation (by TeamCoFH) Collective (by Serilum) Wizard's Reborn (by MaxBogomol) GraveStone Mod (by henkelmax) Mekanism Additions (by bradyaidanc) Create: New Age (by nilBlade) Refined Storage (by raoulvdberge) Embeddium/Rubidium Extras (by Anthxny) ZeroCore 2 (by ZeroNoRyouki) Mekanism Generators (by bradyaidanc) WebDisplays (by ds58) Clumps (by Jaredlll08) Vein Mining (Fabric/Forge/Quilt) (by TheIllusiveC4) Villager Names (by Serilum) Create Slice & Dice (by possible_triangle) Embeddium (by embeddedt) Create: Steam 'n' Rails (by mattentosh) Get It Together, Drops! (by bl4ckscor3) Sophisticated Core (by P3pp3rF1y) Supplementaries (by MehVahdJukaar) Jade Addons (Forge) (by Snownee) Create: Design n' Decor (by MilkyFur) Construction Wand (by ThetaDev) Create: Diesel Generators (by george8188262) Create : Misc & Things (by to0pa_fr) Valkyrien Skies (Forge/Fabric) (by triode_) Refined Storage Addons (by raoulvdberge) FTB Chunks (Forge) (by FTB) FTB Ranks (Forge) (by FTB) Moonlight Lib (by MehVahdJukaar) CC: Tweaked (by SquidDev) Waystones (by BlayTheNinth) Applied Energistics 2 (by thetechnici4n) Trowels fork (by Luciano_cz) Cooking for Blockheads (by BlayTheNinth) Create (by simibubi) Towns and Towers (by Biban_Auriu)
    • Hi, you guys are probably all tired of having to deal with the same topic everytimes. I want to play mods, but forge doesn't want me to. And after days of videos and forum, i have no choices to ask before giving up.. The classic Error code 1 ( here's my debug.log : https://paste.ee/p/0WMSP). I tryed everything. The Forge version fit the mod version. I have java jdk 17 and the path to java is set. My mods folder is empty. My Minecraft luncher path has been changed. Java, Minecraft and Forged has been reinstalled 3 times. I tryed with the curseforge luncher. The only thing i didn't do, and I think it might be the problem, is updating my graphic card drivers. For the only reason that my computer is an Ace Magician ( Tiny pc) that don't have a graphic card. But then I went with Fabric. And it works just fine.  Anyway I can't find anything so thank you for your help. Sorry for my english if there's any mistake. Razziel.  
    • I am trying to make my own modpack and at the moment it crashes before I can get to the main menu. I have been trying to google and figure it out myself but would really appreciate some help. I've been using CurseForge to install mod and think I've gotten all the dependencies but I'm not 100% sure. I hope I got the paste.ee thing right Thanks in advance! https://paste.ee/p/NXdSO
  • Topics

×
×
  • Create New...

Important Information

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