• 0

    posted a message on Stairway to Aether

    Logo Stairway


    This Mod brings you what should have always been in Minecraft in the first place. Stairs. And Slabs. And Walls. And all the different Cobble and Brick variants for the currently available stone types. So what you get is a whopping amount of over 160 new building blocks.


    Stone Types


    The Mod addresses the following stone types:
    - Stone
    - Granite
    - Diorite
    - Andesite
    - End Stone (only in 1.9.x or higher)

    - Prismarine

    - Red Nether Bricks (only in 1.10.x)

    Those Stone types receive the following Variants:
    - Stone (natural + polished)
    - Cobble (normal + mossy)
    - Brick (normal + mossy + cracked + chiseled)

    Aditionally Hardened Clay Blocks can be crafted into Timber Frame

    To ensure every stone type is treated the same, the normal grey Stone now has a polished stone variant. and to fit in the polished variant certain changes were made to Recipes. Now you can simply craft Stone from Cobblestone, and smelt Stone into polished Stone, but need polished Stone to craft Stone Bricks. A detailed crafting list is found under the Recipes tab.

    On top of that has every stone variant now it's own slab, stair, and wall version.
    All new features can be toggled off in the config at your desire.


    Screenshots


    Showing all different Stone Variants and their accompanied Slab/Stair/Wall Blocks

    Stone
    Types Stone

    Granite
    Types Granite

    Diorite
    Types Diorite

    Andesite
    Types Andesite

    Prismarine
    Types Prismarine

    End Stone
    Types End

    Red Nether Bricks
    Types Red Nether

    Limestone [BoP]
    Limestone

    Silt Stone


    Shale [BoP]


    Crag Rock [BoP]
    Crag Rock

    Timber Frames
    Timber Frames


    Recipes


    All non-stone Types received crafting recipes for everything that uses Stone and Cobblestone. e.g. Furnaces, pressure plates, levers.
    Cobblestone recipes only available if Block is extended in Config.


    The following recipes for all Stone Types.

    Mossy Cobblestone -> Polished Stone
    CobbleMoss to Smooth

    Mossy Bricks -> Cracked Bricks
    BrickMoss to BrickCracked

    Stone -> Polished Stone

    Stone to Smooth

    Cracked Bricks -> Bricks
    BrickCracked to Brick

    Bricks -> Cracked Bricks
    Brick to BrickCracked

    Bricks -> Mossy Bricks
    Brick to BrickMoss

    Cobblestone -> Mossy Cobblestone
    Cobble to CobbleMoss

    Polished Stone -> Bricks
    Smooth to Brick

    Brick Slabs -> Chiseled Bricks
    BrickSlabs to BrickCarved


    Deleted Recipes (if Type is extended)

    Cobblestone -> Stone
    Cobble to Stone

    Stone -> Bricks
    Stone to Brick


    Timber Frame Recipes (Available for all hardened clay colors)

    Basic Timber Frame


    Vertical Timber Frame


    Horizontal Timber Frame


    Diagonal Timber Frame


    Inverted Diagonal Timber Frame


    Crossed Timber Frame


    Plus Timber Frame


    Config Options


    The Config has two categories: Extended Types and Allowed Blocks

    With the Extended Types field you can extend each Stone type to add the new Block and Recipes. Prismarine Blocks don't have those feature since they don't behave like the rest. And Red Nether just didn't get extended.

    With the Allowed Block field you control if Slabs, Stairs, and Walls should show up in the game. This option takes precedence over the Extended config and will disable the selected blocks.


    Editing Timber Frames


    The Timber Frame Blocks are designed to be easily changed out through Resource Packs.
    Inside the models/block folder are the designs for all timber blocks. In those files you'll find the following lines:

    "textures": {
    "particle": "blocks/hardened_clay_stained_black",
    "0": "blocks/hardened_clay_stained_black",
    "1": "blocks/planks_oak"
    },

    "0" handles the appearance of the block itself
    "1" handles the appearance of the timber frame around the block
    both can be changed independently from each other.

    Caution: Changing the appearance won't change it's crafting recipe.


    Downloads




    Modpacks


    You are free to put the mod in modpacks as long as you will tell me and give me credits.

    Posted in: Minecraft Mods
  • 0

    posted a message on Entity Throwable Rendering and other Issues

    I found my mistake. Stupid me forgot to set unique IDs for the Entity Register, so whatever got registered first overwrote the Renderer for all other Entities.


    On another note, could you tell me what TrackingRange, UpdateFrequenzy and SendsVelocityUpdates exactly mean how I can find the best value for my stuff?

    Posted in: Modification Development
  • 0

    posted a message on Entity Throwable Rendering and other Issues

    Hey there, I have 2 problems currently I cannot find any answer for them.


    1.) Register Entity Throwable Renderer

    I moslty have a problem with this line:

    RenderingRegistry.registerEntityRenderingHandler(Entity.class, new Render(*.getRenderManager(), item, *.getRenderItem()));


    This function is now deprecated, but there doesn't seem to be an alternate Factory version for it. Can anyone give me an example of how to do it, or how to translate Minecraft..getMinecraft.getRenderItem() to the new factory system?



    2.) I have 2 throwing items, Nuggets and Dynamite, the nugget works quite nicely, but the dynamite always renders with the nugget texture. I'm not even sure what I did wrong here. So if anyone has the spare time to look over my code it would be much appriciated.

    https://gist.github.com/Epidra/acf7c589de8488d2763352342a29e018

    Posted in: Modification Development
  • 0

    posted a message on Problem with TileEntity Syncing

    So, I have a GUI with a custom button that changes the content of the ItemStacks. It works all fine on Server Side, but the Client Side doesn't get updated, which means I can't properly grab the new Items. Is there a good way to force update the Client once I made the changes?


    The GUI can be tested here: http://mods.curse.com/mc-mods/minecraft/243471-casinocraft


    The TileEntity, if anyone needs them:


    package net.casinocraft.mod.tileentity;
    
    import net.minecraft.entity.player.EntityPlayer;
    import net.minecraft.init.Items;
    import net.minecraft.inventory.IInventory;
    import net.minecraft.item.ItemStack;
    import net.minecraft.nbt.NBTTagCompound;
    import net.minecraft.nbt.NBTTagList;
    import net.minecraft.network.NetworkManager;
    import net.minecraft.network.Packet;
    import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
    import net.minecraft.tileentity.TileEntity;
    
    public class TileEntityVideoPoker extends TileEntity implements IInventory {
    	
    private ItemStack[] itemStacks = new ItemStack[8];
    public boolean active_won = false;
    public boolean active_bet = true;
    public ItemStack bet = null;
    public int card1x = 0;
    public int card1y = 0;
    public int card2x = 0;
    public int card2y = 0;
    public int card3x = 0;
    public int card3y = 0;
    public int card4x = 0;
    public int card4y = 0;
    public int card5x = 0;
    public int card5y = 0;
    public boolean hold1 = false;
    public boolean hold2 = false;
    public boolean hold3 = false;
    public boolean hold4 = false;
    public boolean hold5 = false;
    public int hand = 0;
    public int field = 0;
    	
    	public int getSizeInventory(){
            return this.itemStacks.length;
        }
        
        public ItemStack getStackInSlot(int slot){
            return this.itemStacks[slot];
        }
        
        public ItemStack decrStackSize(int slot, int value){
            if (this.itemStacks[slot] != null){
                ItemStack itemstack;
                if (this.itemStacks[slot].stackSize <= value){
                    itemstack = this.itemStacks[slot];
                    this.itemStacks[slot] = null;
                    return itemstack;
                }else{
                    itemstack = this.itemStacks[slot].splitStack(value);
                    if (this.itemStacks[slot].stackSize == 0){
                        this.itemStacks[slot] = null;
                    }
                    return itemstack;
                }
            }else{
                return null;
            }
        }
        
        public ItemStack getStackInSlotOnClosing(int slot){
            if (this.itemStacks[slot] != null){
                ItemStack itemstack = this.itemStacks[slot];
                this.itemStacks[slot] = null;
                return itemstack;
            }else{
                return null;
            }
        }
        
        public void setInventorySlotContents(int slot, ItemStack stack){
            this.itemStacks[slot] = stack;
            if (stack != null && stack.stackSize > this.getInventoryStackLimit()){
                stack.stackSize = this.getInventoryStackLimit();
            }
        }
        
        public String getInventoryName(){
            return "container.videopoker";
        }
        
        public boolean hasCustomInventoryName(){
            return false;
        }
    	
        public int getInventoryStackLimit(){
            return 64;
        }
        
        public void readFromNBT(NBTTagCompound nbt){
            super.readFromNBT(nbt);
            NBTTagList nbttaglist = nbt.getTagList("Items", 8);
            this.itemStacks = new ItemStack[this.getSizeInventory()];
            for (int i = 0; i < nbttaglist.tagCount(); ++i){
                NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i);
                byte b0 = nbttagcompound1.getByte("Slot");
                if (b0 >= 0 && b0 < this.itemStacks.length){
                    this.itemStacks[b0] = ItemStack.loadItemStackFromNBT(nbttagcompound1);
                }
            }
        }
        
        public void writeToNBT(NBTTagCompound nbt){
            super.writeToNBT(nbt);
            NBTTagList nbttaglist = new NBTTagList();
            for (int i = 0; i < this.itemStacks.length; ++i){
                if (this.itemStacks[i] != null){
                    NBTTagCompound nbttagcompound1 = new NBTTagCompound();
                    nbttagcompound1.setByte("Slot", (byte)i);
                    this.itemStacks[i].writeToNBT(nbttagcompound1);
                    nbttaglist.appendTag(nbttagcompound1);
                }
            }
            nbt.setTag("Items", nbttaglist);
        }
        
        @Override
        public Packet getDescriptionPacket() {
            NBTTagCompound tagCompound = new NBTTagCompound();
            writeToNBT(tagCompound);
            return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, tagCompound);
        }
        
        @Override
        public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
            NBTTagCompound tag = pkt.func_148857_g();
            readFromNBT(tag);
        }
        
        public boolean isUseableByPlayer(EntityPlayer player){
            return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : player.getDistanceSq((double)this.xCoord + 0.5D, (double)this.yCoord + 0.5D, (double)this.zCoord + 0.5D) <= 64.0D;
        }
        
        public void openInventory() {}
        public void closeInventory() {}
        
        public boolean isItemValidForSlot(int slot, ItemStack stack){
            //if(slot == 0){
            	return true;
            //}else{
            //	return false;
            //}
        }
    	
        public void updateEntity(){
        	if(!worldObj.isRemote){
        		System.out.println("CLIENT: " + itemStacks[0]);
        		System.out.println("CLIENT: " + itemStacks[1]);
        		System.out.println("CLIENT: " + itemStacks[2]);
        	}else{
        		System.out.println("SERVER: " + itemStacks[0]);
        		System.out.println("SERVER: " + itemStacks[1]);
        		System.out.println("SERVER: " + itemStacks[2]);
        	}
        	if(!active_bet && !active_won){
        		if(itemStacks[0] != null) itemStacks[0] = null;
        		if(itemStacks[1] != null) itemStacks[1] = null;
        		if(itemStacks[2] != null) itemStacks[2] = null;
        		if(itemStacks[3] != null) itemStacks[3] = null;
        		if(itemStacks[4] != null) itemStacks[4] = null;
        		if(itemStacks[5] != null) itemStacks[5] = null;
        		if(itemStacks[6] != null) itemStacks[6] = null;
        		if(itemStacks[7] != null) itemStacks[7] = null;
        	}
        	markDirty();
        }
        
        public void Click_Start(int stage){
        	if(stage == 0){
        		bet = null;
        		if(itemStacks[0] != null) bet = itemStacks[0];
        		if(itemStacks[0] != null) itemStacks[0] = null;
        		if(itemStacks[1] != null) itemStacks[1] = null;
        		if(itemStacks[2] != null) itemStacks[2] = null;
        		if(itemStacks[3] != null) itemStacks[3] = null;
        		if(itemStacks[4] != null) itemStacks[4] = null;
        		if(itemStacks[5] != null) itemStacks[5] = null;
        		if(itemStacks[6] != null) itemStacks[6] = null;
        		if(itemStacks[7] != null) itemStacks[7] = null;
            	card1x = worldObj.rand.nextInt(13)+1;
            	card1y = worldObj.rand.nextInt(4);
            	card2x = worldObj.rand.nextInt(13)+1;
            	card2y = worldObj.rand.nextInt(4);
            	card3x = worldObj.rand.nextInt(13)+1;
            	card3y = worldObj.rand.nextInt(4);
            	card4x = worldObj.rand.nextInt(13)+1;
            	card4y = worldObj.rand.nextInt(4);
            	card5x = worldObj.rand.nextInt(13)+1;
            	card5y = worldObj.rand.nextInt(4);
            	hand = 0;
            	active_bet = false;
            	hold1 = false;
            	hold2 = false;
            	hold3 = false;
            	hold4 = false;
            	hold5 = false;
        	}else if(stage == 1){
        		if(!hold1){ card1x = worldObj.rand.nextInt(13)+1; card1y = worldObj.rand.nextInt(4); }
            	if(!hold2){ card2x = worldObj.rand.nextInt(13)+1; card2y = worldObj.rand.nextInt(4); }
            	if(!hold3){ card3x = worldObj.rand.nextInt(13)+1; card3y = worldObj.rand.nextInt(4); }
            	if(!hold4){ card4x = worldObj.rand.nextInt(13)+1; card4y = worldObj.rand.nextInt(4); }
            	if(!hold5){ card5x = worldObj.rand.nextInt(13)+1; card5y = worldObj.rand.nextInt(4); }
        		active_won = true;
        		Sort();
        		if(card1x == 9 && card2x == 10 && card3x == 11 && card4x == 12 && card5x == 13 && card1y == card2y && card1y == card3y && card1y == card4y && card1y == card5y) { // Royal Flush
        			hand = 8; field = 7;
        			if(bet != null){
        				itemStacks[1] = bet;
            			itemStacks[2] = bet;
            			itemStacks[3] = bet;
            			itemStacks[4] = bet;
            			itemStacks[5] = bet;
            			itemStacks[6] = bet;
            			itemStacks[7] = bet;
        			}
                } else if(card1x <= 9 && card1x + 1 == card2x && card1x + 2 == card3x && card1x + 3 == card4x && card1x + 4 == card5x && card1y == card2y && card1y == card3y && card1y == card4y && card1y == card5y) { // Straight Flush
                	hand = 7; field = 6;
                	if(bet != null){
        				itemStacks[1] = bet;
            			itemStacks[2] = bet;
            			itemStacks[3] = bet;
            			itemStacks[4] = bet;
            			itemStacks[5] = bet;
            			itemStacks[6] = bet;
        			}
                } else if(card1x == card2x && card1x == card3x && card1x == card4x && card1x != card5x) { // 4 of a Kind
                	hand = 6; field = 5;
                	if(bet != null){
        				itemStacks[1] = bet;
            			itemStacks[2] = bet;
            			itemStacks[3] = bet;
            			itemStacks[4] = bet;
            			itemStacks[5] = bet;
        			}
                } else if(card2x == card3x && card2x == card4x && card2x == card5x && card2x != card1x) { // 4 of a Kind
                	hand = 6;  field = 5;
                	if(bet != null){
        				itemStacks[1] = bet;
            			itemStacks[2] = bet;
            			itemStacks[3] = bet;
            			itemStacks[4] = bet;
            			itemStacks[5] = bet;
        			}
                } else if(card1x == card2x && card1x == card3x && card1x != card4x && card4x == card5x) { // Full House
                	hand = 5;  field = 4;
                	if(bet != null){
        				itemStacks[1] = bet;
            			itemStacks[2] = bet;
            			itemStacks[3] = bet;
            			itemStacks[4] = bet;
        			}
                } else if(card1x == card2x && card1x != card3x && card3x == card4x && card3x == card5x) { // Full House
                	hand = 5; field = 4;
                	if(bet != null){
        				itemStacks[1] = bet;
            			itemStacks[2] = bet;
            			itemStacks[3] = bet;
            			itemStacks[4] = bet;
        			}
                } else if(card1y == card2y && card1y == card3y && card1y == card4y && card1y == card5y) { // Flush
                	hand = 4; field = 3;
                	if(bet != null){
        				itemStacks[1] = bet;
            			itemStacks[2] = bet;
            			itemStacks[3] = bet;
        			}
                } else if(card1x <= 9 && card1x + 1 == card2x && card1x + 2 == card3x && card1x + 3 == card4x && card1x + 4 == card5x) { // Straight
                	hand = 3; field = 3;
                	if(bet != null){
        				itemStacks[1] = bet;
            			itemStacks[2] = bet;
            			itemStacks[3] = bet;
        			}
                } else if(card1x == card2x && card1x == card3x && card1x != card4x && card1x != card5x) { // 3 of a Kind
                	hand = 2; field = 2;
                	if(bet != null){
        				itemStacks[1] = bet;
            			itemStacks[2] = bet;
        			}
                } else if(card2x == card3x && card2x == card4x && card2x != card1x && card2x != card5x) { // 3 of a Kind
                	hand = 2; field = 2;
                	if(bet != null){
        				itemStacks[1] = bet;
            			itemStacks[2] = bet;
        			}
                } else if(card3x == card4x && card3x == card5x && card3x != card1x && card3x != card2x) { // 3 of a Kind
                	hand = 2; field = 2;
                	if(bet != null){
        				itemStacks[1] = bet;
            			itemStacks[2] = bet;
        			}
                } else if(card1x == card2x && card3x == card4x) { // Two Pair
                	hand = 1; field = 1;
                	if(bet != null){
        				itemStacks[1] = bet;
        			}
                } else if(card1x == card2x && card4x == card5x) { // Two Pair
                	hand = 1; field = 1;
                	if(bet != null){
        				itemStacks[1] = bet;
        			}
                } else if(card2x == card3x && card4x == card5x) { // Two Pair
                	hand = 1; field = 1;
                	if(bet != null){
        				itemStacks[1] = bet;
        			}
                } else if(card1x >= 9 && card1x == card2x) { // Jacks or Better
                	hand = 0; field = 0;
                } else if(card2x >= 9 && card2x == card3x) { // Jacks or Better
                	hand = 0; field = 0;
                } else if(card3x >= 9 && card3x == card4x) { // Jacks or Better
                	hand = 0; field = 0;
                } else if(card4x >= 9 && card4x == card5x) { // Jacks or Better
                	hand = 0; field = 0;
                }
        	}else{
        		active_bet = true;
        		active_won = false;
        	}
        	markDirty();
        }
        
        public void Click_Hold(int pos){
        	switch(pos){
    	    	case 1: if(hold1){ hold1 = false; } else { hold1 = true; } break;
    	    	case 2: if(hold2){ hold2 = false; } else { hold2 = true; } break;
    	    	case 3: if(hold3){ hold3 = false; } else { hold3 = true; } break;
    	    	case 4: if(hold4){ hold4 = false; } else { hold4 = true; } break;
    	    	case 5: if(hold5){ hold5 = false; } else { hold5 = true; } break;
        	}
        	markDirty();
        }
        
        private void Sort(){
    		if(card1x > card5x) {
                int z1 = card1x; int z2 = card1y;
                card1x = card2x; card1y = card2y;
                card2x = card3x; card2y = card3y;
                card3x = card4x; card3y = card4y;
                card4x = card5x; card4y = card5y;
                card5x = z1; card5y = z2;
            }
            if(card1x > card4x) {
            	int z1 = card1x; int z2 = card1y;
                card1x = card2x; card1y = card2y;
                card2x = card3x; card2y = card3y;
                card3x = card4x; card3y = card4y;
                card4x = z1; card4y = z2;
            }
            if(card1x > card3x) {
            	int z1 = card1x; int z2 = card1y;
                card1x = card2x; card1y = card2y;
                card2x = card3x; card2y = card3y;
                card3x = z1; card3y = z2;
            }
            if(card1x > card2x) {
            	int z1 = card1x; int z2 = card1y;
                card1x = card2x; card1y = card2y;
                card2x = z1; card2y = z2;
            }
        	if(card2x > card5x) {
            	int z1 = card2x; int z2 = card2y;
                card2x = card3x; card2y = card3y;
                card3x = card4x; card3y = card4y;
                card4x = card5x; card4y = card5y;
                card5x = z1; card5y = z2;
            }
            if(card2x > card4x) {
            	int z1 = card2x; int z2 = card2y;
                card2x = card3x; card2y = card3y;
                card3x = card4x; card3y = card4y;
                card4x = z1; card4y = z2;
            }
            if(card2x > card3x) {
            	int z1 = card2x; int z2 = card2y;
                card2x = card3x; card2y = card3y;
                card3x = z1; card3y = z2;
            }
        	if(card3x > card5x) {
            	int z1 = card3x; int z2 = card3y;
                card3x = card4x; card3y = card4y;
                card4x = card5x; card4y = card5y;
                card5x = z1; card5y = z2;
            }
            if(card3x > card4x) {
            	int z1 = card3x; int z2 = card3y;
                card3x = card4x; card3y = card4y;
                card4x = z1; card4y = z2;
            }
            if(card4x > card5x) {
            	int z1 = card4x; int z2 = card4y;
                card4x = card5x; card4y = card5y;
                card5x = z1; card5y = z2;
            }
        }
        
    }
    



    Posted in: Modification Development
  • 0

    posted a message on CasinoCraft


    Ever wanted to relax with a little card game after a hard day in the mines? Or lose all your potatoes on the roulette table? Then you're at the right place.

    CasinoCraft adds 25 different MiniGames to Minecraft for you to enjoy.


    Blocks


    There are 2 very different Blocks to play games on. A Card table, which Comes in a small and wide variant and an Arcade Machine. Both can be dyed in 16 Colors.


    Upon plancement right-click with an empty hand on the block the settings GUI.
    The game You want to run goes into the Module field.

    Place an item in the KeyCard field to lock the activate the block. The settings GUI can only be opened again with the right KeyCard. All other items and the empty hand open the mini game instead.

    If you want to enable betting place an item in the Token field. The type and size of the itemstack defines how much the player has to pay to play the game.

    The Fields on the right are the Tables own inventory where it stores all its token. For the betting system to properly function it needs a base amount of token. While there is set minimum defined, one full stack of token is recommended.

    Note: While all Card Table Games can collect token at the beginning, only a few have a proper betting system in place. See "MiniGames" for a list.

    The Arcade setting has only a Module and KeyCard field.

    Mini Games

    Card Table Games (with betting)
    - BlackJack
    - Baccarat
    - Acey Deucey
    - Rouge et Noir
    - Craps
    - SicBo
    - Roulette
    - Video Poker

    Card Table Games:
    - Pyramid
    - TriPeak
    - FreeCell
    - Klondike
    - Spider
    - Memory
    - Mystic Square
    - Sudoku
    - Halma
    - Minesweeper

    Arcade Games:
    - Tetris
    - Columns
    - MeanMinos
    - 2048
    - Sokoban
    - Snake

    Instructions


    Basic:

    Games on the Card Table are designed to work with the mouse.
    Roulette/Craps/SicBo require a press on ENTER to roll the dice / rotate the wheel and a second press to go to the results.
    Arcade Games work with ARROW keys for movement and M and N to rotate pieces. Minesweeper only works with mouse.

    A few notes on how to use the block inventories:
    - the wide table doens't behave correctly. You can right click only one side of it.
    - The arcade block changes ist Picture on sneak-right-click. Or on world load.
    - I added a creative mode. It's not perfect but does it's Job.
    In the config file you Need to enable the creative button. in the inventory GUI there is a button with C on it, press it to activate creative mode. In that mode the inventory of the tale has infinite resources. But you still Need to put a token in it. After that you can simply disable the button in the config file. That way it gives map makers Access to the creative mode, while disabling it for Players who want to build their own Casinos.
    - The Arrows showing to and from the inventory field are clickable. Once activates the inventory Slots in ist sides will put stuff in or take out of the inventory, depending on the side. The arrows above and below Change the Minimum and Maximum bet. Not really intuitive, but easy to figure out. Putting bets on 0 is essentially free-play mode. The Maximum bet has no Limit. The arcade machine has a simple bet (no max/min), because it gives no rewards and the bet is simply seen as entry fee.
    - the second config Option is simply how fast it Transfers stuff in the inventory. Either one per tick, or everything at once.

    Screenshots


    BlackJack



    Baccarat


    Acey Deucey


    Rouge et Noir


    left
    FreeCell


    Pyramid


    Klondike


    Memory
    Memory

    Mystic Square


    Sudoku


    Halma


    left
    2048


    Mean Minos


    Columns


    Tetris

    Downloads



    Mod Packs


    You are free to put the mod in modpacks as long as you will tell me and give me credits.


    Block Models made with MrCrayfish's Model Creator

    Posted in: Minecraft Mods
  • 1

    posted a message on Uncharted

    Logo Uncharted


    Ever came out of a cave and didn't know where you are? Or wondered if you are standing in a desert or just a really long beach? Say no more.

    With this nifty little mod you'l get a pop-up message everytime you traverse into a new biome. And since you're not supposed to know where the heck you are while traveling underground, the panel is only activated when you are standing under the clear blue sky. Stormy weather is also OK.


    I strongly suggest using the provided Texture Pack, as the original minecraft resolution leaves all assets in a slightly ugly state.


    Screenshots


    16x Texture

    Screenshot_16x


    32x Texture

    Screenshot_32x


    Adding new Biomes


    The mod comes with build-in support for Biomes'O'Plenty, Highlands, and ExtrabiomesXL. Adding any new Biomes or native ones I might have missed out just drop a picture in a TexturePack (see the provided 32xPack for reference). To properly function you will need the Name of the Biome. You can get it by pressing F3 ingame. Name your texture EXACTLY like it's shown ingame, with spaces and capital letters and all.


    Downloads



    Modpacks


    You are free to put the mod in modpacks as long as you will tell me and give me credits.

    Posted in: Minecraft Mods
  • 0

    posted a message on Help with Custom Mob

    The boolean and array get set through a Forge Hook. The mob is an alternate approach of the Death Chest Mod. Once the Player dies the mob gets summoned and through an additional function receives the player inventory and the boolean. All of that seems to only happen on the Client Side.

    Posted in: Modification Development
  • 0

    posted a message on Help with Custom Mob

    That 40 was an oversight. I looked into PlayerEntity to get an idea how to save an inventory. Player has 40 inventory Slots in total, thats where the number comes from. I made it variable now by saving the size of the array as an extra int for the for-loop. Thanks for pointing out.


    For the boolean, they get updated and saved properly, but only on the client side, not on the server. And parts of the code here doesn't work properly, due to how and when the functions get loaded up, but that's minor.


    What I need now is a way to sync data in an entity from client to server. Any idea how to do that?

    Posted in: Modification Development
  • 0

    posted a message on Help with Custom Mob

    So, I got a little stuck here and maybe you guys can help me.

    I created a new monster with some additional custom data. Everything works fine, except that all custom data doesn't get saved no matter what. Is there a way to force SaveToNBT or do I miss something lese here?



    package net.phantomforce.mod;
    
    import java.util.ArrayList;
    
    import net.minecraft.entity.Entity;
    import net.minecraft.entity.SharedMonsterAttributes;
    import net.minecraft.entity.ai.EntityAIAttackOnCollide;
    import net.minecraft.entity.ai.EntityAIHurtByTarget;
    import net.minecraft.entity.ai.EntityAIMoveThroughVillage;
    import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
    import net.minecraft.entity.ai.EntityAIWander;
    import net.minecraft.entity.ai.EntityAIWatchClosest;
    import net.minecraft.entity.item.EntityItem;
    import net.minecraft.entity.monster.EntityMob;
    import net.minecraft.entity.passive.EntityVillager;
    import net.minecraft.entity.player.EntityPlayer;
    import net.minecraft.init.Items;
    import net.minecraft.item.Item;
    import net.minecraft.item.ItemStack;
    import net.minecraft.nbt.NBTTagCompound;
    import net.minecraft.nbt.NBTTagList;
    import net.minecraft.world.World;
    import net.minecraftforge.common.IExtendedEntityProperties;
    
    public class EntityGhost extends EntityMob {
    	
    	protected NBTTagCompound nbttag = new NBTTagCompound();
    	
    	ArrayList<EntityItem> loot = new ArrayList<EntityItem>();
    	int experience = 0;
    	int level = 0;
    	boolean despawn = true;
    	
    	public EntityGhost(World world) {
    		super(world);
    		//this.tasks.addTask(0, new EntityAISwimming(this));
    		this.tasks.addTask(2, new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.0D, false));
    		this.tasks.addTask(4, new EntityAIAttackOnCollide(this, EntityVillager.class, 1.0D, true));
    		this.tasks.addTask(6, new EntityAIMoveThroughVillage(this, 1.0D, false));
            this.tasks.addTask(7, new EntityAIWander(this, 2.0D));
            this.tasks.addTask(8, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
            this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true));
            this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true));
            this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityVillager.class, 0, false));
            this.setSize(1f, 1.5f);
            this.experienceValue = 0;
            despawn = true;
            if(!world.isRemote){
            	NBTTagList list = new NBTTagList();
        		for(int i = 0; i < loot.size(); i++){
        			NBTTagCompound compound = new NBTTagCompound();
        			loot.get(i).writeToNBT(compound);
        		}
        		nbttag.setTag("Loot", list);
        		nbttag.setBoolean("despawn", despawn);
        		nbttag.setInteger("EXP", experience);
        		nbttag.setInteger("Level", level);
        		writeToNBT(nbttag);
            }
    	}
    	
    	public EntityGhost(World world, ArrayList<EntityItem> drops, float experience, float level){
    		super(world);
    		//this.tasks.addTask(0, new EntityAISwimming(this));
    		this.tasks.addTask(2, new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.0D, false));
    		//this.tasks.addTask(4, new EntityAIAttackOnCollide(this, EntityVillager.class, 1.0D, true));
    		//this.tasks.addTask(6, new EntityAIMoveThroughVillage(this, 1.0D, false));
            //this.tasks.addTask(7, new EntityAIWander(this, 1.0D));
            this.tasks.addTask(8, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
            this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true));
            //this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true));
            //this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityVillager.class, 0, false));
            this.setSize(1f, 1.5f);
            this.experienceValue = (int) experience;
            despawn = false;
            NBTTagList list = new NBTTagList();
    		for(int i = 0; i < loot.size(); i++){
    			NBTTagCompound compound = new NBTTagCompound();
    			loot.get(i).writeToNBT(compound);
    		}
    		nbttag.setTag("Loot", list);
    		nbttag.setBoolean("despawn", despawn);
    		nbttag.setInteger("EXP", this.experience);
    		nbttag.setInteger("Level", this.level);
    		writeToNBT(nbttag);
    	}
    	
    	public void TransferLife(ArrayList<EntityItem> drops, float experience, float level){
    		loot = drops;
    		this.experience = (int)experience;
    		this.level = (int)level;
    		despawn = false;
    	}
    	
    	@Override
    	protected void applyEntityAttributes(){
    		super.applyEntityAttributes();
    		if(this.experienceValue == 0){
    			this.getEntityAttribute(SharedMonsterAttributes.followRange)        .setBaseValue(80.00D);
    			this.getEntityAttribute(SharedMonsterAttributes.movementSpeed)      .setBaseValue( 0.25D);
    			this.getEntityAttribute(SharedMonsterAttributes.attackDamage)       .setBaseValue( 3.00D);
    			this.getEntityAttribute(SharedMonsterAttributes.maxHealth)          .setBaseValue(18.00D);
    			this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(50.00D);
    			this.experienceValue = 5;
    		}else{
    			this.getEntityAttribute(SharedMonsterAttributes.followRange)        .setBaseValue(1.0D +  2.50D * this.level);
    			this.getEntityAttribute(SharedMonsterAttributes.movementSpeed)      .setBaseValue(1.0D +  0.35D * this.level);
    			this.getEntityAttribute(SharedMonsterAttributes.attackDamage)       .setBaseValue(1.0D +  0.50D * this.level);
    			this.getEntityAttribute(SharedMonsterAttributes.maxHealth)          .setBaseValue(6.0D +  3.00D * this.level);
    			this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(100.00D);
    		}
    	}
    	
    	@Override
    	public void readFromNBT(NBTTagCompound nbt){
            super.readFromNBT(nbt);
            NBTTagList list = nbt.getTagList("Loot", 40);
    		for(int i = 0; i < list.tagCount(); i++){
    			NBTTagCompound compound = (NBTTagCompound) list.getCompoundTagAt(i);
    			loot.get(i).readFromNBT(compound);
    		}
            this.despawn   = nbt.getBoolean("despawn");
            this.experience = nbt.getInteger("EXP");
            this.level = nbt.getInteger("Level");
        }
    	
    	@Override
        public void writeToNBT(NBTTagCompound nbt){
            super.writeToNBT(nbt);
            NBTTagList list = new NBTTagList();
    		for(int i = 0; i < loot.size(); i++){
    			NBTTagCompound compound = new NBTTagCompound();
    			loot.get(i).writeToNBT(compound);
    		}
    		nbt.setTag("Loot", list);
    		nbt.setBoolean("despawn", despawn);
    		nbt.setInteger("EXP", experience);
    		nbt.setInteger("Level", level);
        }
    	
    	protected boolean isAIEnabled(){
            return true;
        }
    	
    	protected String getLivingSound(){
            return "phantomforce:ghost-say";
        }
    	
        protected String getHurtSound(){
            return "phantomforce:ghost-hurt";
        }
        
        protected String getDeathSound()
        {
            return "phantomforce:ghost-death";
        }
        
        protected Item getDropItem(){
            return Items.slime_ball;
        }
        
        protected boolean canDespawn(){
    		return despawn;
        	
        }
    }



    Posted in: Modification Development
  • 0

    posted a message on Setting Up Bounding Boxes

    Hey there,

    I am working on a mod with a costum block in the size of 1x2x2 and I have problems setting up the collision boxes to cover up the space. Can someone explain to me how to do that properly? (with source code if possible)

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