Jump to content

McJty

Members
  • Posts

    129
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

McJty's Achievements

Creeper Killer

Creeper Killer (4/8)

2

Reputation

  1. Is there nobody who knows anything about this or can help me find a way to prevent passive mobs from spawning in freshly generated chunks? Thanks
  2. I am struggling with a problem with LivingSpawnEvent.CheckSpawn. It works perfectly fine for hostile mobs but passive mobs that are generated at chunk generation time (i.e. passive sheep, cows and so on) are not going through that even it seems. Even though according to the Minecraft code it should. Here is the code snippet: @SubscribeEvent public void onEntitySpawnEvent(LivingSpawnEvent.CheckSpawn event) { System.out.println("event.entity.toString() = " + event.entity.toString()); } This code works fine for hostile mob spawns. I can see the print in my console but nothing happens for passive mobs. Any clue?
  3. Ok. Thanks to this I got it working:
  4. Thanks a lot. I think I can manage with that :-)
  5. I would like to render a thick beam of light. So essentially this should be a quad that is oriented in such a way that it always faces the camera. But it should start at some point in 3D and end at another point. And it should also be perspective correct. I have this code so far: private void drawLine(Coordinate c1, Coordinate c2, float width) { Tessellator tessellator = Tessellator.instance; tessellator.startDrawingQuads(); tessellator.setColorRGBA(255, 255, 255, 128); tessellator.setBrightness(240); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE); // Calculate the start point of the laser float mx1 = c1.getX() + .5f; float my1 = c1.getY() + .5f; float mz1 = c1.getZ() + .5f; Vector start = new Vector(mx1, my1, mz1); // Calculate the end point of the laser float mx2 = c2.getX() + .5f; float my2 = c2.getY() + .5f; float mz2 = c2.getZ() + .5f; Vector end = new Vector(mx2, my2, mz2); // Given the two points above I would like to render a quad that // always faces the camera. i guess I need to use things like // this.renderManager.playerViewY ... Vector p1 = ...; Vector p2 = ...; Vector p3 = ...; Vector p4 = ...; drawQuad(tessellator, p1, p2, p5, p6); drawQuad(tessellator, p2, p1, p6, p5); drawQuad(tessellator, p8, p7, p4, p3); drawQuad(tessellator, p7, p8, p3, p4); tessellator.draw(); } So basically I need something for the '...'. Anyone who can help me with the correct formula to get a correct looking laser beam like that? Thanks!
  6. Yes I thought so too but it isn't. Apparently you also have to handle the damage after crafting. In case of the division sigil it gets damaged to above max damage and the minecraft vanilla code then destroys the container. I added similar code to my crafter to solve this issue.
  7. Hi all, In my RFTools auto crafter there is currently a duplication bug with the auto crafter in case there are container items that are supposed to be consumed. Basically when you craft something that outputs the container item (like a bucket) in addition to the output result my crafter puts back the bucket in the inventory. However it appears that there are crafting recipes that use container items that you are supposed to consume while crafting. One example is when you place an inactivated division sigil in the crafting grid. It gives you iron ingots and then goes away. How can I distinguish or know when a recipe is supposed to throw away the container items of the items in the recipe and when it is supposed to keep them? Thanks!
  8. Actually I found the problem. It is not a mod that is causing the issue. It is a mod that is 'FIXING' the issue. Apparently in my local dev env I have a CoFHlib that patches a bug in Minecraft's mergeItemStack() which apparently doesn't respect the maximum number of items in inventory slots. So in my dev env it was fixed because CoFHlib was fixing it. But apparently in some modpacks there is no CoFHlib or perhaps another version of CoFHlib which does not fix this. So I solved the issue by implementing the fix locally in my mod. Thanks for helping though.
  9. Well reproducing it is easy enough. Exactly like I did in the screenshot. Shift-click on a stack. In my dev environment the stack gets evenly distributed on the slots (like the second screenshot shows). In many modpacks however (like FTB Infinity) the first slot of the container gets one item and the rest of the stack is discared (lost).
  10. Nobody has any idea on this? This bug is hitting several of my containers (every container for which the slot in the container only allows one item but the stack itself can contain multiple items).
  11. Ok, here two screenshots. Before shift-click and after shift-click. Notice how it works fine for me. It doesn't for many people and I don't know why: And here is the code for this particular container: https://github.com/McJty/RFTools/blob/master/src/main/java/com/mcjty/rftools/blocks/screens/ScreenContainer.java
  12. There is an annoying bug in RFTools that I cannot reproduce in my dev env so it is somewhat hard to debug. But basically if people shift-click a stack of items into some of my containers (for which the slots only accept one item) then one item of the stack is inserted and the rest is lost. If I do it in my dev env then the items of the stack are nicely distributed to all available slots of the machine and the remainder goes somewhere in the player inventory. Nothing is lost. I'm at a loss as what I could be doing wrong. My transferStackInSlot implementation can be found here: https://github.com/McJty/RFTools/blob/master/src/main/java/com/mcjty/container/GenericContainer.java Anyone who has any insight into what might be wrong? Thanks!
  13. I solved it thanks to advice on irc. Apparently I need to use Blocks.flowing_java instead of Blocks.java.
  14. Hi, I would like to have a block that emits a sound depending on how close the player is. This sound should be continuous (i.e. a bit like a humming sound). I know how to play a single sound effect but I don't know how to make this loop automatically. Thanks!
×
×
  • Create New...

Important Information

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