
Ewe Loon
Members-
Posts
158 -
Joined
-
Last visited
Everything posted by Ewe Loon
-
Item disappears when dragged from first slot in container
Ewe Loon replied to SnowyEgret's topic in Modder Support
ok, do you want each stack of the items to have a separate inventory , or do all stacks of the item to share the same inventory I ask because they will currently be sharing the same inventory , to use separate inventories you will need to store the inventory in the ItemStack not the Item (Item is only referenced not instanced) to store inventory on an ItemStack you will need to store it in the NBTTags check out the following itemstack.hasTagCompound(); itemstack.getTagCompound(); itemstack.setTagCompound(arg0); as far as them being out of sync with one another you should not be changing the inventory on the client, you should only change it on the server also if you are using a shared inventory you might need a container on the server, so it can notify all players who are viewing it -
Item disappears when dragged from first slot in container
Ewe Loon replied to SnowyEgret's topic in Modder Support
No, i was opening a new GUI for an enchanting table which has no inventory on the block, but uses placeholders like crafting and the original enchanting table it would sort of work, but 4 of the slots where giving me my armor when i picked up from them (armor didnt show in the slot though ) and when i placed the items in the slots it went to my armor, even though it should have gone to my gui's temp inventory giving an inventory to an item would be relatively easy and to explain the apparent double clicking (getting 2 items in stead of one,) that is because you are manipulating the data on both client and server I had that problem too -
I have done up to 8 texture blends for terrain generation it is not something that i would recommend trying to implement into minecraft in case you want to try to do it you would have to add custom block rendering then add cgi pixel shading (including a cgi pixel shader program) if you havnt done any pixel shading before i would recommend getting used to using it in a standalone enviroment (google LWJDL they have some good tutorials to get you started and its what minecraft uses)
-
[1.7.10]How to make custom machine with custom recipes have 2 outputs
Ewe Loon replied to slugslug's topic in Modder Support
ok firstly, when you define hashmaps, put you classes in don't leave them a s just Map or HashMap (you will only see Map in decompiled code) this prevent adding incorrect stuff to it by accident For what you are doing would probably be better off not to use hashmaps and simply add the recipes to a list then search the list for a match and you can then get the 2 output from the recipe -
Item disappears when dragged from first slot in container
Ewe Loon replied to SnowyEgret's topic in Modder Support
i had a similar problem to this myself it appears that for some stupid reason some of the custom inventory gets mixed up with the players armor slots, my solution was to not use containers and to implement you own system from scratch, took about a day to get working, -
can anyone tell me the events for when a player joins a server and when a player starts a single player game I need these events for the server side, not client side
-
[1.6.4] Why world.isRemote is always true?
Ewe Loon replied to BlackCrafer666's topic in Modder Support
since no-one has actually answered your question i will onItemRightClick is called by the client only when you right click with an item the client will always returns true because it is connected to either a local-server task(started by the singleplayer client) or a server -
Solved, thankyou jabelar dont know how i missed that , but sometimes it takes a different viewer to see some of the stupidest mistakes
-
here is my code package me.el.mcFarms; import net.minecraftforge.event.entity.living.LivingSpawnEvent; import net.minecraftforge.event.entity.living.LivingSpawnEvent.CheckSpawn; import net.minecraftforge.event.entity.player.EntityInteractEvent; import net.minecraftforge.event.entity.player.ItemTooltipEvent; import net.minecraftforge.event.entity.player.PlayerInteractEvent; import net.minecraftforge.event.world.BlockEvent.BreakEvent; import net.minecraftforge.event.world.BlockEvent.HarvestDropsEvent; import cpw.mods.fml.common.eventhandler.SubscribeEvent; public class EventDetector { @SubscribeEvent public void leaves(HarvestDropsEvent event){ System.out.println("EventDetector HarvestDropsEvent"); } @SubscribeEvent public void onbreak(BreakEvent event){ System.out.println("EventDetector BreakEvent"); } @SubscribeEvent private void spawnentity(CheckSpawn event) { System.out.println("EventDetector spawnentity"); } @SubscribeEvent private void spawnentity(LivingSpawnEvent event) { System.out.println("EventDetector LivingSpawnEvent"); } @SubscribeEvent private void clickentity(EntityInteractEvent event) { System.out.println("EventDetector EntityInteractEvent"); } @SubscribeEvent private void tooltip(ItemTooltipEvent event) { System.out.println("EventDetector ItemTooltipEvent"); } @SubscribeEvent public void onInteract(PlayerInteractEvent event){ System.out.println("EventDetector PlayerInteractEvent"); } } i and getting results from HarvestDropsEvent BreakEvent PlayerInteractEvent getting nothing from any others
-
tried it, getting no response, which bus is it on, and how do i use it ?
-
How do I make a Gui open when an item is right clicked? - SOLVED
Ewe Loon replied to iLegendx98's topic in Modder Support
in your item class add @Override public ItemStack onItemRightClick(ItemStack i, World w, EntityPlayer pl) { pl.openGui( fill in your own parameters here ); return i; } during initialization register your gui NetworkRegistry.INSTANCE.registerGuiHandler(yourMod.instance,new GUIHandler()); here is what is in my gui handler public class GUIHandler implements IGuiHandler { @Override public Object getServerGuiElement(int id, EntityPlayer pl, World wld, int x, int y, int z) { MagicEnchant.debug("getServerGuiElement"); if ( id == GuiEnchantTable.GUI_ID ){ return null; } return null; } @Override public Object getClientGuiElement(int id, EntityPlayer pl, World wld, int x, int y, int z) { MagicEnchant.debug("getClientGuiElement"); if ( id == GuiEnchantTable.GUI_ID ){ return new GuiEnchantTable(pl,x,y,z); } return null; } } -
is there a cancel-able event that is called just before mobs spawn, preferable also having the reason for them spawning
-
how do i post and receive packets between client and server ( or single player server task ) need help for sending both directions
-
if you dont want to use bonemeal, then create your one block for the sapling, use the random ticking to get them to grow (i asume you have your own code for generating grown trees) there is aslo a event in blocks fro when a player clicks them , use that or the click with item event items has for fast growing I would like to see one of your grown trees, I have not been able to generate random ones that look good yet
-
anyone know where i can find 1.7.10 tutorials for a custom inventory gui, I prefer text and image not video
-
firstly, by "drag items in my inventory" i assume you mean , picking up a stack then dragging around to place them into multiple slots if this is the case then i cant see anything that would stop the dragging add the function i said , and add a diagnostic line to see if it is being called , System.out.println("Candrag is being called"); then watch the consol when you try dradging
-
Weird, I looked everywhere for it, and there it is
-
It would be helpful to be able to search for all post made and started by a user in particular i would like to search for my own posts
-
how do i detect when a player breaks a block ?
Ewe Loon replied to Ewe Loon's topic in Modder Support
cool, now i know the event , how do i use it i tried @SubscribeEvent public void onbreak(BreakEvent event){ System.out.println("BreakEvent"); } but nothing happens -
how do i detect when a player breaks a block ?
-
thanks, got it working now , changed everything to lowercase, including the modid
-
as you will see by the edit time of my first post, i found your tutorial while you where typing the reply, firstly let me say thankyou, its a good tutorial, but, the details about accessing the texture is a bit hard to understand (at least i couldnt figure it out) the package for my main class is package me.el.mcFarms; the name of my main class is "McFarms" it is registered as @Mod(modid = "McFarms", name="McFarms", version="1.7.2-v1" ) in /Minecraft/src/main/resources/ i have a package "assets.textures.entity.bork" in that package i have "bork.png" in package "me.el.mcFarms.entities.bork" my render class is public class RenderBork extends RenderLiving{ this dosnt work texture = new ResourceLocation("textures/entity/bork/bork.png"); i get [06:58:35] [Client thread/WARN]: Failed to load texture: minecraft:textures/entity/bork/bork.png i tried texture = new ResourceLocation("McFarms:textures/entity/bork/bork.png"); but get [07:02:24] [Client thread/WARN]: Failed to load texture: mcfarms:textures/entity/bork/bork.png what should the path be
-
I had this in 1.6 using mcp, in you container you need public boolean canDragIntoSlot(Slot slt){ //System.out.println("canDragIntoSlot "+slt.slotNumber); if (slt.slotNumber<34) return true; if (slt.slotNumber>36) return true; return false; } it might be called something else now but this should point you in the right direction
-
there is away to stop animals climbing it, but you would have to use some sort of override for players and the way is simple, make the collision hull for it 1.5 blocks high , thats how fences work I have ideas for something similar, but what i was going to do was, if a player walks up to it , teleport them across it to the other side , (possibly on right click) if nothing else this idea might get it working for you till a better solution is found
-
I created a skyblock for a bukkit server, this is what i did I created a small world in the center zone, that all people spawn in, (but cant edit), then they issue a command to teleport to there zone another option is when they respawn, teleport them to there home, before they can fall out of the world another few things you might want to consider , force the area the sky-block creates in into a specific biome, (I had one in an ice biome once, made it very hard to farm) for server world creation, is to put walk-ways around the edges of each zone, so once you build to it , you can visit otheres, and have them visit you