
makromoo
Members-
Posts
20 -
Joined
-
Last visited
Everything posted by makromoo
-
Yea I'd do that.. Use the vanilla stem method and just override where necessary.
-
Source: http://www.minecraftforge.net/wiki/Create_a_Fluid
-
[1.6.4] I'm creating a NEI plugin for TerraFirmaCraft
makromoo replied to caramba2654's topic in Modder Support
3. -
[1.7.2]Function func_150297_b & generation
makromoo replied to Hamster_Furtif's topic in Modder Support
One that extends RecipesArmorDyes... Less work.. -
[SOLVED-ish][1.7.x]Why is last attacker for EntityCow always null?
makromoo replied to jabelar's topic in Modder Support
FYI: If the player is hurt it doesn't return null: Last attacker was EntityZombie['Zombie'/81939, l='New World', x=705.84, y=4.00, z=-2137.55] -
Ah I see at what you getting at @Kriki98, @diesieben07 I also figured out why it was returning 0, 0, 0. I shouldn't put that in the constructor but in the updateEntity() method. Thanks for all your help!
-
a) Alright done b) When I use xCoord, yCoord, zCoord. Problem is they always are 0, 0, 0 c) Ahh never knew that So how could I get xCoord, yCoord, zCoord not to be 0, 0, 0?
-
Hello Everybody! I'm having issues getting a TileEntity from using: worldObj.getTileEntity(xCoord, yCoord, zCoord); I just get null pointer exceptions... -Using try/catch solved the crash but doesn't fix the issue... Below is the TileEntity Class: package com.example.examplemod.entity; import net.minecraft.tileentity.TileEntity; public class TileMultiBlock extends TileEntity { public TileMultiBlock(int x, int y, int z) { System.out.println(String.format("X: %d y: %d Z: %d", x, y, z)); // Returns block's co-ordinates System.out.println(String.format("X: %d y: %d Z: %d", xCoord, yCoord, zCoord)); // Returns 0, 0, 0 try { TileEntity TE = worldObj.getTileEntity(xCoord, yCoord, zCoord); System.out.println(TE.blockMetadata); } catch (Exception e) { e.printStackTrace(); } //updateEntity(); //TileEntity tileEnt2 = worldObj.getTileEntity(x, y, z); } And below here is the Block Class: I have it passing it's co-ordinates to the TileEntity.. package com.example.examplemod.blocks; import com.example.examplemod.entity.TileMultiBlock; import com.example.examplemod.misc.CreativeTab; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; public class BlockMainBlock extends BlockContainer { int x; int y; int z; public BlockMainBlock(Material mat) { super(mat); setBlockName("mainBlock"); setCreativeTab(CreativeTab.tabSlime); } @Override public void onBlockAdded(World world, int x, int y, int z) { this.x = x; this.y = y; this.z = z; } @Override public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) { return new TileMultiBlock(x, y, z); } } Thanks for all your troubles!
-
[Solved][1.7.2] Modifying original ore XP drops
makromoo replied to HavocMasterChief's topic in Modder Support
So, diesieben07: Would this be the correct way of going about it? @SubscribeEvent public void brokeBlock(BreakEvent event) { if (event.block instanceof BlockOre) { event.setExpToDrop(0); } } -
I'm going further on what Lomeli12 has said: He has showed you how to create a tile entity. --Make sure it is registered by the game. Create a Block Class which extends the BlockContainer Class: Below is an example, I have to it passing the x, y, z co-ordinates which the block was placed. package com.example.examplemod.blocks; import com.example.examplemod.entity.TileMultiBlock; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; public class BlockMainBlock extends BlockContainer { // Normal setting up block stuff public BlockMainBlock() { super(Material.rock); setBlockName("mainBlock"); setCreativeTab(CreativeTabs.tabBlock); } // Called when block is placed @Override public void onBlockAdded(World world, int x, int y, int z) { this.x = x; this.y = y; this.z = z; } // Method you must use to create a new TileEntity. @Override public TileEntity createNewTileEntity(World world, int p_149915_2_) { return new TileMultiBlock(x, y, z); } } Later I'll get back to you on detecting stone.. Thank You Lomeli12, For your tutorial! Helped me a ton!
-
[1.7.2/1.7.10] Checking Item Right-Clicked with
makromoo replied to makromoo's topic in Modder Support
Oh yes, a topic hijack: When it changes the block metadata, it changes all of the placed blocks metadata. Would there be a way to change just that specific block's metadata that got right-clicked. Or Would it be better to have a separate block and delete and replace block1 with block2? -
[1.7.2/1.7.10] Checking Item Right-Clicked with
makromoo replied to makromoo's topic in Modder Support
Ah, Blind me! Thank You, very much! Works like a bomb now! Yea you we're right about it being "random.fizz" -
[1.7.2/1.7.10] Checking Item Right-Clicked with
makromoo replied to makromoo's topic in Modder Support
Will do! Tried print line as well just not meeting if conditional.. -
Hey guys! I want to check if this block is right-clicked with a slime ball. Everything works just even if it is right-clicked with a slime ball the code doesn't know that... [embed=425,349]@Override public boolean onBlockActivated(World world, int parX, int parY, int parZ, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { ItemStack stack = player.getHeldItem(); ItemStack stack2 = player.inventory.getCurrentItem(); if(stack != null) { if(stack == (new ItemStack(Items.slime_ball))) { metaToBe = 1; world.playSoundAtEntity(player, "random:fizz", 0.7F, 0.8F); } } world.setBlockMetadataWithNotify(parX, parY, parZ, metaToBe, 2); return false; }[/embed] Thanks in advance for the help!
-
Preventing vanilla world gen and removing the nether
makromoo replied to JusticeOF666's topic in Modder Support
@SubscribeEvent public void checkDimension(PlayerEvent.PlayerChangedDimensionEvent event) { int dimension = event.player.dimension // -1 Is the nether // 0 Is the overworld // 1 Is the end } -
From what I understand from dieseben07's posts are that you should do: ItemStack blueWoolStack = new ItemStack(Items.wool, 1, 11); First parameter is the Item Second is the quantity Third is the metadata (Blue wool uses a metadata of 11)
-
[1.7.2]/[1.7.10] [SOLVED] Texture Bush Troubles
makromoo replied to makromoo's topic in Modder Support
Problem is solved! Any way I can edit this post's heading to have [solved]? -
[1.7.2]/[1.7.10] [SOLVED] Texture Bush Troubles
makromoo replied to makromoo's topic in Modder Support
@MoxEmerald Yes that seemed to do it! @jabelar Yip the textures are in the correct place This code seems to be working: Would you say this would be the way of going about it? @Override @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int meta) { if (meta == 0) { return iIcon[0]; // Default when planted } else if (meta >= 4){ System.out.println("Ran through if. Meta is " + meta); return iIcon[4]; // If higher than max allowed then set to last stage which is iIcon[4] } else if (meta == 1) { return iIcon[meta]; // Which is 1 } else { System.out.println(getClass() + " Meta is " + meta); // If anything else print class and Meta is followed by metadata value return iIcon[meta]; } } -
Hey Guys! I'm trying to create a bush, everything's working except that the texture isn't quite what I had in mind... I've checked the console, no trace that file hasn't been found. Here's the code for the two classes: https://gist.github.com/anonymous/2c0fa918e6ac560c636a#file-blockslimyparentcrop Thanks in advance for someone willing to help me