
Shamboozle
Members-
Posts
26 -
Joined
-
Last visited
Everything posted by Shamboozle
-
[1.7.x][SOLVED] Overriding World's base-block - Stone.
Shamboozle replied to Ernio's topic in Modder Support
Why are you trying to use an event to change things in your own dimension. Just generate your block in the dimension in the first place. -
A different way of doing it is making one model for the entire thing that is two blocks high(or how ever high you want it) then having a block render that model. So then you have a block rendering a model two blocks tall, to solve that have the block that is rendering the model place a block on top of its self when it is placed that is empty no texture or anything. Then just check using the onBlockDeystroyedByPlayer () to see if the top block is broken then delete the bottom block and to check when the bottom block is broken delete the top block. That should give you a two high block with a model, if that made sense. Also just give the bottom block the TileEntity not the top.
-
You are searching an area of 16x16x16, when a chunk is 16x256x16
-
I don't think there is a way with the vanilla furnace, other than creating you own TileEntity.
-
use player.getCurrentHeldItem().getItem() instanceof SoulCraft.creeperBow instead of player.inventory.getStackInSlot(player.inventory.currentItem).getItem() == SoulCraft.creeperBow
-
[1.6.4] Custom GUI with dynamic mapping *help*
Shamboozle replied to hugo_the_dwarf's topic in Modder Support
OK so in your writeToNBT() and readFromNBT() you aren't reading or writing the locations so that will not be saved if they are unloaded. Secondly GUIs are client side only so you need a packet send a packet to the client saying what the locations are so you can show then on the GUI. Also, I can't see the rest of your GUI class, but from what I can see you are doing the TileEntity stuff client side. If you could add the rest of your GuiBaseBuilder it would help. -
[1.7.10] Lighting issue with custom rendered blocks
Shamboozle replied to Delfil's topic in Modder Support
You can just call GL11.glDisable(GL11.GL_LIGHTING) before your rendering then GL11.glEnable(GL11.GL_LIGHTING), that will remove the lighting for you block. -
Custom Structure with Metadata and Other Problems
Shamboozle replied to ess0523's topic in Modder Support
Use setBlockMetadataWithNotify(int x, int y, int z, int metadata, int flag) -
[1.7.2] Custom main menu and 3D-Block breaking
Shamboozle replied to Bektor's topic in Modder Support
So to make your own custom main menu, just hook into the GuiOpenEvent that forge provides, and when the vanilla main menu is open set it to you main menu. I don't know about the second thing you want to do, maybe use the PlayerInteractEvent and detect left clicks on blocks, and change the model. I don't know about that its just an educated guess. -
Ok thankyou for the quick reply.
-
Hi, Can some one help me, I am looking for a way to cancel the entity death animation, when the entity turns red and falls over. I can't seem to find any event that will help me do so.
-
If your checking for the same thing in all of them, then no. (Like delphi said remove the second EntitySkeleton).
-
[1.7.2] Looping through players inventory to check for best item.
Shamboozle replied to Shamboozle's topic in Modder Support
ok, I noticed that I was looking for wooden first just after I posted it, so I changed it to diamond but it still didn't work, I am trying a different way now. -
[1.7.2] Looping through players inventory to check for best item.
Shamboozle replied to Shamboozle's topic in Modder Support
OK I will give that a try, thanks for the reply I appreciate it -
I wondering if anyone can help me... Here's my code private Minecraft mc = Minecraft.getMinecraft(); private List<ItemStack> playerItems = new ArrayList<ItemStack>(); @SideOnly(Side.CLIENT) @SubscribeEvent public void onPlayerRender(RenderPlayerEvent.Specials.Post event) { if (event.isCanceled()) return; ItemStack stackToRender = getSelectItem(event.entityPlayer.inventory); if (stackToRender != null && stackToRender != event.entityPlayer.getCurrentEquippedItem()) { System.out.println(stackToRender.getDisplayName()); renderItemIn3D(stackToRender); } } private ItemStack getSelectItem(InventoryPlayer inventory){ ItemStack selectedItem = null; for(int i = 0; i < inventory.getSizeInventory(); i++){ ItemStack curStack = inventory.getStackInSlot(i); if (curStack != null) { if ((curStack.getItem() instanceof ItemSword) && !(playerItems.contains(curStack))) { playerItems.add(curStack); } } } for(int j = 0; j < playerItems.size(); j++){ ItemStack currItem = playerItems.get(j); if(currItem.getItem() == Items.wooden_sword){ selectedItem = currItem; return selectedItem; } else if(currItem.getItem() == Items.stone_sword){ selectedItem = currItem; return selectedItem; } else if(currItem.getItem() == Items.iron_sword){ selectedItem = currItem; return selectedItem; } else if(currItem.getItem() == Items.stone_sword){ selectedItem = currItem; return selectedItem; } else if(currItem.getItem() == Items.wooden_sword){ selectedItem = currItem; return selectedItem; } } return selectedItem; } I am trying to get it so I can render the best Sword on the players inventory, but it only renders a wooden sword even though I check for all the swords and It should render the diamond one if that is the best in the inventory, then gold, then iron etc. But it doesn't work so can some one point me in the right direction. (I have tried the if statements the other way round starting with the diamond sword btw)
-
Have you tried using ScaledResolution
-
bump
-
Any help?
-
I wondering if anyone out there can help me with my predicament, its probably simple code and i'm just being blind. But I am trying to set a ItemStack to he previous item the player was holding before they switch to a new one. @SubscribeEvent public void onPlayerRender(RenderPlayerEvent.Specials.Post event){ if(event.isCanceled()) return; ItemStack currentHeldItem = event.entityPlayer.getCurrentEquippedItem(); ItemStack tempStk = null; ItemStack prevHeldItem = null; if(currentHeldItem != null){ tempStk = currentHeldItem; } if(tempStk != null && prevHeldItem != currentHeldItem){ prevHeldItem = tempStk; } System.out.println(prevHeldItem.getDisplayName()); if (prevHeldItem != currentHeldItem) { if ((prevHeldItem.getItem() instanceof ItemSword) || (prevHeldItem.getItem() instanceof ItemTool) || (prevHeldItem.getItem() instanceof ItemHoe)) { renderItemIn3D(prevHeldItem); } } } I need to get the currentHeldItem and set it to the prevHeld so it can be renderer when they are holding a different Item. Help would be greatly appreciated.
-
[1.7.2] Syncing client and server not working.
Shamboozle replied to Shamboozle's topic in Modder Support
Didn't work. -
[1.7.2] Syncing client and server not working.
Shamboozle replied to Shamboozle's topic in Modder Support
ok. -
[1.7.2] Syncing client and server not working.
Shamboozle replied to Shamboozle's topic in Modder Support
Im sending the packet from the server to the client, the server doesn't need to be in sync with the client, needs to be other way round. -
Hello, I have created a mod with tubes and I want it so that when you right click with a wrench it enables the feature that extracts from inventories. When the pipe is right clicked it want it to change texture to show what mode it is in, but when I click right click the pipe with the wrench it switches mode to extract but wont go back again. Here is my code if you have the time to look at it. https://github.com/Shamboozle/TubesMod.git
-
[1.7.2][SOLVED] Searching for surrounding tile entitys
Shamboozle replied to Shamboozle's topic in Modder Support
I didn't work but thanks for the reply and help. -
Hi, Can someone help me fix a problem I am having with my tile entity, I can't seem to find the neighbouring tile entitys from my block, so that I can render some pipes. Here is my code https://github.com/Shamboozle/FluidTransport if some one could look at it and point me i the right direction it would be greatly appreciated. ~Sham (I'm sufficient in Java and Minecraft modding BTW)