KakesRevenge
Members-
Posts
153 -
Joined
-
Last visited
Everything posted by KakesRevenge
-
[1.7.10][SOLVED] How to find out color of sheep
KakesRevenge replied to KakesRevenge's topic in Modder Support
Im stilll wondering how EXACTLY get the color of the sheep that im interacting with ... in entitysheep class the getFleeceColor method isnt static so i cant use it... -
[1.7.10][SOLVED] How to find out color of sheep
KakesRevenge replied to KakesRevenge's topic in Modder Support
dunno if thats a problem i will do it another way -
[1.7.10][SOLVED] How to find out color of sheep
KakesRevenge replied to KakesRevenge's topic in Modder Support
Thats my eventhandler -
[1.7.10][SOLVED] How to find out color of sheep
KakesRevenge replied to KakesRevenge's topic in Modder Support
This is what ive got so far ... but its crashing public class ClayBucketHandler { protected DataWatcher dataWatcher; public boolean getSheared() { return (this.dataWatcher.getWatchableObjectByte(16) & 16) != 0; } @SubscribeEvent public void EntityInteract(EntityInteractEvent event) { if(event.target instanceof EntitySheep) { Item equipped = event.entityPlayer.getCurrentEquippedItem().getItem(); EntityPlayer player = event.entityPlayer; int color = dataWatcher.getWatchableObjectByte(16) & 15; if(equipped == ItemsHandler.ClayBucketFired) { player.inventory.setInventorySlotContents(player.inventory.currentItem, new ItemStack(ItemsHandler.ClayBucketWool)); player.inventory.addItemStackToInventory(new ItemStack(Blocks.wool, 1, color )); } } -
[1.7.10][SOLVED] How to find out color of sheep
KakesRevenge replied to KakesRevenge's topic in Modder Support
ok thank you it looks like this : But i cant get the datawatcher in public int getFleeceColor() { return EntitySheep.getDataWatcher().getWatchableObjectByte(16) & 15; } -
[1.7.10][SOLVED] How to find out color of sheep
KakesRevenge replied to KakesRevenge's topic in Modder Support
i have looked and i dont understand it this is the interactwithentity method in ItemShears -
Hey, Im trying to find out what wool color a particular sheep has. So when I right click the sheep, I want to get the color it has. And I want to make the sheep sheared when I get the wool out of it. Any ideas will be appreciated
-
you should really look on more tuts apperantly you dont understand how recipes work
-
[1.7.10] [SOLVED!] Trouble removing drops from a block
KakesRevenge replied to HappyKiller1O1's topic in Modder Support
Im removing drops like so if (event.drops != null && event.drops.size() != 0) { for (int x = event.drops.size() - 1; x >= 0; x--) { event.drops.remove(x); -
[1.7.10]Checking if itemstack is block/item
KakesRevenge replied to KakesRevenge's topic in Modder Support
Please be specific ... How to get the item first ? -
[1.7.10]Checking if itemstack is block/item
KakesRevenge replied to KakesRevenge's topic in Modder Support
error is "incompatible conditional operand types ItemStack and ItemBlock" smeltedblockoneye looks like this ItemStack smeltedblockoneye = FurnaceRecipes.smelting().getSmeltingResult(new ItemStack(blockoneye)).copy(); -
[1.7.10]Checking if itemstack is block/item
KakesRevenge replied to KakesRevenge's topic in Modder Support
if(smeltedblockoneye instanceof ItemBlock) { this gives me an error -
Hey, how can i check if itemstack is item ? i want to set here that if the smelting result is instance of block then do my thing nad the same thing with item how to this ?
-
well reinstalling eclipse did not work but remaking workspace did
-
It doesnt work ... im gonna try re-install eclipse
-
Hello, so i have weird issue when when im triying to run game it says i have an error but eclipse does not show any errors ? what is happening ? Thanks for any response ...
-
[1.7.10] Setting extra reach doesnt work
KakesRevenge replied to KakesRevenge's topic in Modder Support
Ok thank you all im gonna try it -
[1.7.10] Setting extra reach doesnt work
KakesRevenge replied to KakesRevenge's topic in Modder Support
In My eventhandler class @SubscribeEvent public void checksomething (LivingUpdateEvent event) { if(event.entityLiving instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) event.entityLiving; if(player.inventory.hasItem(ItemsHandler.Corn)) { System.out.println("SOMETHING !"); FMTMethods.setExtraReach(player, 3.5F); } } } This will get printed out but the setExtraEach doesnt work System.out.println("SOMETHING !"); -
Hello, trying to increase range of players hand public static void setExtraReach(EntityLivingBase entity, float reach) { if(entity instanceof EntityPlayerMP) ((EntityPlayerMP) entity).theItemInWorldManager.setBlockReachDistance(Math.max(5, ((EntityPlayerMP) entity).theItemInWorldManager.getBlockReachDistance() + reach)); } This Method doesnt work my question is why ? and how to fix it ?
-
[1.7.10] ItemCraftedEvent doesnt work
KakesRevenge replied to KakesRevenge's topic in Modder Support
Ok im just littlebit derpy i did register it wrong way so now it works For anybody Main class : MinecraftForge.EVENT_BUS.register(handler); FMLCommonHandler.instance().bus().register(handler); handler class @SubscribeEvent public void whenCrafted(ItemCraftedEvent event) { if(event.crafting.getItem().equals(Items.sugar)) { event.player.inventory.addItemStackToInventory(new ItemStack(Items.diamond)); } } -
Hello, Im trying to use ItemCraftedEvent and it doesnt work private static EntityPlayer player; @SubscribeEvent public void whenCrafted(ItemCraftedEvent event) { if(event.crafting.getItem().equals(Items.sugar)) { player.inventory.addItemStackToInventory(new ItemStack(BadItems.Molasses)); } } EDIT : That doesnt work either event.player.inventory.addItemStackToInventory(new ItemStack(BadItems.Molasses));
-
[1.7.10] Texture not render right and missing
KakesRevenge replied to Xetapro12's topic in Modder Support
Well it doesnt matter i found it you got problem in here : @Override public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layer){ if(stack.getItem().equals(BetterArmourAndTools.helmetEmerald)|| stack.getItem().equals(BetterArmourAndTools.chestplateEmerald)|| stack.getItem().equals(BetterArmourAndTools.legsEmerald)){ return "tools:textures/armor/Emerald_1.png"; } if(stack.getItem().equals(BetterArmourAndTools.legsEmerald)){ return "tools:textures/armor/Emerald_2.png"; } in the first one emerald 1 you need to change legs to boots -
[1.7.10] Texture not render right and missing
KakesRevenge replied to Xetapro12's topic in Modder Support
Ok thats usefull too but i mean your BetterArmourAndTool class -
[1.7.10] Texture not render right and missing
KakesRevenge replied to Xetapro12's topic in Modder Support
and show me code in your class where you are registering the armor -
[1.7.10] Texture not render right and missing
KakesRevenge replied to Xetapro12's topic in Modder Support
Show me your Emerald_1.png and Emerald_2.png