Jump to content

Whompy

Members
  • Posts

    36
  • Joined

  • Last visited

Posts posted by Whompy

  1. 4 hours ago, diesieben07 said:

    Because Forge cannot develop more than 2 versions at once. And because 1.12.2 is old now. That's how updates work.

     

     

    Not updating 1.12.2 makes sense, however I do think that there should be a place to ask modding questions regarding old versions. This could be achieved via creating a new forum area call

    Old Mod Version Development. In this area moderators could just ignore questions, and let people willing to work with older versions answer questions.

  2. Why has the forums dropped 1.12.2 support?

    Wouldn't it be better to create a section devoted to issues in "old versions" which moderators don't give help too?

     

    Also when did it drop 1.12 support just curious

  3. On 12/29/2019 at 10:07 AM, loordgek said:

    dont use getItemById

     

    where does enableStats come from?

     

    entity.getItem().getItem() == glass.getItem()

    what is glass

     

    can you post your code on github so we can see everything

    I am too lazy to make a github, sorry for not responding earlier btw

     

    Here's the variables I forgot to put in the thread

     

    when I created the public Boolean, enablestats was what appeared in the autogenerated return statement. I honestly don't know what it does nor have I looked into it

     

    	ItemStack glass = new ItemStack(Blocks.GLASS);
    	ItemStack Magic_orb = new ItemStack(ModItems.ORB_OF_CHANNELING);
    	Item sponge = Item.getItemFromBlock(Blocks.SPONGE);

     

  4. I have two blocks that I am trying to use to craft items from my mod. The first block when right clicked, is supposed to check for an item above it in this case a glass block, then check for a ball of magma cream and a modded item I made in the first two slots of the container. However, nothing is happening when the block is right clicked so I assume one of the if statements is faulty.

     

     

    Here's my onblockactivated method (idk why indents are weird in eclipse they look fine):

     

    @Override
    public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
        
        
    	if(!playerIn.isSneaking()) {
    		if(worldIn.getBlockState(pos.down(1)) == ModBlocks.Magic_Sponge.getDefaultState()) {		
                List<EntityItem> entities = worldIn.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(pos.getX(), pos.getY(), pos.getZ(), pos.getX()+1,pos.getY() + 1, pos.getZ()+1));
                for (EntityItem entity : entities) {
                    if(entity.getItem().getItem() == glass.getItem()) {
                        TileEntityMagicSponge tileentity = (TileEntityMagicSponge)worldIn.getTileEntity(pos.down());
                        Item Magma_cream = tileentity.getStackInSlot(1).getItem();
                        Item Magic_Caytalist = tileentity.getStackInSlot(2).getItem();
                        ItemStack stack = entity.getItem();
                        if(Magma_cream == Items.MAGMA_CREAM.getItemById(378) && Magic_Caytalist == ModItems.CAYTALIST.getItemById(4110)) {
    	                	if(!worldIn.isRemote) {
    	                        while (stack.getCount() > 0) {
    	                        	EntityItem item = new EntityItem(worldIn, pos.getX()+0.5F, pos.getY(), pos.getZ()+0.5F, Magic_orb);
    	                			worldIn.spawnEntity(item);
    	                    		stack.shrink(1);
    	                    		tileentity.removeStackFromSlot(0);
    	                    		tileentity.removeStackFromSlot(1);
    	                    		worldIn.playSound(null, pos.getX(), pos.getY(), pos.getZ(), SoundEvents.ENTITY_FIREWORK_LAUNCH, entity.getSoundCategory(), 0.8F, 0.8F + entity.world.rand.nextFloat() * 0.4F);
                            		}
                            	}
                            }
                    	}  
            		}
                }
    		}
    	return enableStats;
    	}
    }

     

     

     

     

  5.             List<EntityItem> entities = worldIn.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(pos.getX(), pos.getY(), pos.getZ(), pos.getX(),pos.getY() + 1D, pos.getZ()));

    I gave this a shot, however it didn't quite work. I assume the issue is with the letter D I put after the number 1. Am I right?

  6. So I put some code together to check if a glass block entityItem is on top of my block.

     

    It doesn't quite work

     

    what am I doing wrong?

     

     

    	ItemStack glass = new ItemStack(Blocks.GLASS);
    
    @Override
    public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
        
        
    	
    		
    	if(!playerIn.isSneaking()) {
    		if(worldIn.getBlockState(pos.down(1)) == ModBlocks.MAGIC_BLOCK.getDefaultState()) {		
                List<EntityItem> entities = worldIn.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(0D, 0, 0D, 1D, 1D, 1D));
                for (EntityItem entity : entities) {                
                    if(entity.getItem() == glass) {
                    	EntityItem item = new EntityItem(worldIn, pos.getX()+0.5F, pos.getY(), pos.getZ()+0.5F, glass);
                    	item.setNoPickupDelay();
                        entity.setFire(90000);
                        worldIn.playSound(null, pos.getX(), pos.getY(), pos.getZ(), SoundEvents.ENTITY_FIREWORK_LAUNCH, entity.getSoundCategory(), 0.8F, 0.8F + entity.world.rand.nextFloat() * 0.4F);
                    }                    
                       
            		}
                }else {
                	
                }
    		}
    	return enableStats;
    	}
    }

     

  7. I have created a custom model for an ordinary block that functions perfectly, now I am trying to create a model for a Block that extends BlockContainer. As of now, everything works including the container itself and GUI. However, I was unable to apply a non-animated model to said block. What am I doing wrong?

     

    Blockstates Json file:

     

    {
        "variants": {
            "normal": { "model": "magi:block_sponge" }
        }
    } 

     

    Model Json file:

    {
        "__comment": "Model generated using MrCrayfish's Model Creator (https://mrcrayfish.com/tools?id=mc)",
        "textures": {
            "anvil_top_damaged_0": "minecraft:blocks/anvil_top_damaged_0",
            "magic_essense_block": "magi:blocks/magic_essense_block"
        },
        "display": {
            "gui": {
                "rotation": [ 30, 45, 0 ],
                "translation": [ 0, 0, 0 ],
                "scale": [ 0.625, 0.625, 0.625 ]
            },
            "ground": {
                "rotation": [ 0, 0, 0 ],
                "translation": [ 0, 3, 0 ],
                "scale": [ 0.25, 0.25, 0.25 ]
            },
            "fixed": {
                "rotation": [ 0, 180, 0 ],
                "translation": [ 0, 0, 0 ],
                "scale": [ 1, 1, 1 ]
            },
            "head": {
                "rotation": [ 0, 180, 0 ],
                "translation": [ 0, 0, 0 ],
                "scale": [ 1, 1, 1 ]
            },
            "firstperson_righthand": {
                "rotation": [ 0, 315, 0 ],
                "translation": [ 0, 2.5, 0 ],
                "scale": [ 0.4, 0.4, 0.4 ]
            },
            "thirdperson_righthand": {
                "rotation": [ 75, 315, 0 ],
                "translation": [ 0, 2.5, 0 ],
                "scale": [ 0.375, 0.375, 0.375 ]
            }
        },
        "elements": [
            {
                "name": "Cube",
                "from": [ 1, 0, 0 ], 
                "to": [ 15, 1, 1 ], 
                "faces": {
                    "north": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 2, 13, 3 ] },
                    "south": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 13, 1 ] },
                    "up": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 13, 1 ] },
                    "down": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 13, 1 ] }
                }
            },
            {
                "name": "Cube",
                "from": [ 1, 0, 15 ], 
                "to": [ 15, 1, 16 ], 
                "faces": {
                    "north": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 13, 1 ] },
                    "south": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 13, 1 ] },
                    "up": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 13, 1 ] },
                    "down": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 13, 1 ] }
                }
            },
            {
                "name": "Cube",
                "from": [ 0, 0, 1 ], 
                "to": [ 1, 1, 15 ], 
                "faces": {
                    "east": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 13, 1 ] },
                    "west": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 13, 1 ] },
                    "up": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 1, 13, 0 ], "rotation": 90 },
                    "down": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 13, 1 ], "rotation": 90 }
                }
            },
            {
                "name": "Cube",
                "from": [ 15, 0, 1 ], 
                "to": [ 16, 1, 15 ], 
                "faces": {
                    "east": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 13, 1 ] },
                    "west": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 13, 1 ] },
                    "up": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 13, 1 ], "rotation": 90 },
                    "down": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 13, 1 ], "rotation": 90 }
                }
            },
            {
                "name": "Cube",
                "from": [ 0, 0, 0 ], 
                "to": [ 1, 16, 1 ], 
                "faces": {
                    "north": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 4, 15 ] },
                    "east": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 4, 15 ] },
                    "south": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 4, 16 ] },
                    "west": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 4, 16 ] },
                    "up": { "texture": "#anvil_top_damaged_0", "uv": [ 10, 5, 11, 6 ] },
                    "down": { "texture": "#anvil_top_damaged_0", "uv": [ 9, 5, 10, 6 ] }
                }
            },
            {
                "name": "Cube",
                "from": [ 0, 0, 15 ], 
                "to": [ 1, 16, 16 ], 
                "faces": {
                    "north": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 4, 15 ] },
                    "east": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 4, 15 ] },
                    "south": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 4, 16 ] },
                    "west": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 4, 16 ] },
                    "up": { "texture": "#anvil_top_damaged_0", "uv": [ 10, 5, 11, 6 ] },
                    "down": { "texture": "#anvil_top_damaged_0", "uv": [ 9, 5, 10, 6 ] }
                }
            },
            {
                "name": "Cube",
                "from": [ 15, 0, 15 ], 
                "to": [ 16, 16, 16 ], 
                "faces": {
                    "north": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 4, 15 ] },
                    "east": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 4, 15 ] },
                    "south": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 4, 16 ] },
                    "west": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 4, 16 ] },
                    "up": { "texture": "#anvil_top_damaged_0", "uv": [ 10, 5, 11, 6 ] },
                    "down": { "texture": "#anvil_top_damaged_0", "uv": [ 9, 5, 10, 6 ] }
                }
            },
            {
                "name": "Cube",
                "from": [ 15, 0, 0 ], 
                "to": [ 16, 16, 1 ], 
                "faces": {
                    "north": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 4, 15 ] },
                    "east": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 4, 15 ] },
                    "south": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 4, 16 ] },
                    "west": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 4, 16 ] },
                    "up": { "texture": "#anvil_top_damaged_0", "uv": [ 10, 5, 11, 6 ] },
                    "down": { "texture": "#anvil_top_damaged_0", "uv": [ 9, 5, 10, 6 ] }
                }
            },
            {
                "name": "Cube",
                "from": [ 1, 15, 0 ], 
                "to": [ 15, 16, 1 ], 
                "faces": {
                    "north": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 2, 13, 3 ] },
                    "south": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 13, 1 ] },
                    "up": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 13, 1 ] },
                    "down": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 13, 1 ] }
                }
            },
            {
                "name": "Cube",
                "from": [ 1, 15, 15 ], 
                "to": [ 15, 16, 16 ], 
                "faces": {
                    "north": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 2, 13, 3 ] },
                    "south": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 13, 1 ] },
                    "up": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 13, 1 ] },
                    "down": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 13, 1 ] }
                }
            },
            {
                "name": "Cube",
                "from": [ 15, 15, 1 ], 
                "to": [ 16, 16, 15 ], 
                "faces": {
                    "east": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 13, 1 ] },
                    "west": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 13, 1 ] },
                    "up": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 13, 1 ], "rotation": 90 },
                    "down": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 13, 1 ], "rotation": 90 }
                }
            },
            {
                "name": "Cube",
                "from": [ 0, 15, 1 ], 
                "to": [ 1, 16, 15 ], 
                "faces": {
                    "east": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 13, 1 ] },
                    "west": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 13, 1 ] },
                    "up": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 13, 1 ], "rotation": 90 },
                    "down": { "texture": "#anvil_top_damaged_0", "uv": [ 3, 0, 13, 1 ], "rotation": 90 }
                }
            },
            {
                "name": "Cube",
                "from": [ 1, 1, 1 ], 
                "to": [ 15, 15, 15 ], 
                "faces": {
                    "north": { "texture": "#magic_essense_block", "uv": [ 1, 1, 15, 15 ] },
                    "east": { "texture": "#magic_essense_block", "uv": [ 1, 1, 15, 15 ] },
                    "south": { "texture": "#magic_essense_block", "uv": [ 1, 1, 15, 15 ] },
                    "west": { "texture": "#magic_essense_block", "uv": [ 1, 1, 15, 15 ] },
                    "up": { "texture": "#magic_essense_block", "uv": [ 1, 1, 15, 15 ] },
                    "down": { "texture": "#magic_essense_block", "uv": [ 1, 1, 15, 15 ] }
                }
            }
        ]
    }

     

×
×
  • Create New...

Important Information

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