Jump to content

Voidi

Forge Modder
  • Posts

    11
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Voidi's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I'm trying to setup a Jenkins server to build mods. But builds fails with: 10:11:14 :decompileMcJava HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000770fa3000, 547803136, 0) failed; error='Nicht genügend Hauptspeicher verfügbar' (errno=12) 10:11:22 10:11:22 # 10:11:22 # There is insufficient memory for the Java Runtime Environment to continue. 10:11:22 # Native memory allocation (mmap) failed to map 547803136 bytes for committing reserved memory. I assume that i should set some Java Memory limits but which and where (for Jenkins or Gradle via GRADLE_OPTS)? My Server has only 2 GiB of RAM, is this even enough to run this?
  2. Vanilla Hoppers can exchange items with Entities if they implement IInventory. (Look at TileEntityHopper.getInventoryAtPosition) The Forge Hook added in the Hopper tileentity is checking only for Blocks/TileEntitys with the ItemHandler Capability. Although this isn't used in vanilla, as no Entities implement IInventory, Forge should stay compatible with Vanilla in this point, and should check for Entities with ItemHandler Capability, too.
  3. Uhm i feel dumb now. Yes totally logical. I am too long awake.
  4. I want to make some Actions after the Player harvested a Block (Log in my case). I try following in my Eventhandler Method: @SubscribeEvent public void activate(BlockEvent.HarvestDropsEvent event) { //Some check for not-null .... event.getWorld().getBlockState(event.getPos()); // Gets minecraft:air event.getState(); //Gets minecraft:log[axis=y,variant=oak] Original i want to pass down to my methods only word an blockpos, and retrieve the blockstate via those. So why i seems to get not a correct blockstate with getBlockState()?
  5. My Intention was to only break blocks with the same type, so this would be ok. A Problem i probably have to accept: If a other mod would modifiy Breakspeed via the event, it won't modify this breaking. Another solution would be a tickhandler. I think Opencomputers has solved this with some kind of tickhandler for their nanomachines (which are player effects) I don't know if this variant is better/easier then the first.
  6. And sendBlockBreakProgress wouldn't fire a PlayerEvent.BreakSpeed? The problem is: i'm programming (at the moment) for 1.7.10 where this method doesn't exist and destroyBlockInWorldPartially which seems similar fire the Event. Edit: the Real problem is to calculate Block Damage i must call Block#getPlayerRelativeBlockHardness which fires PlayerEvent.BreakSpeed
  7. Hello, I want to make an Enchantment that work like the Tinkers Construct Excavator/Hammer (Harvesting Multiple Blocks at once). But it should additional break all blocks with the vanilla breaking animation. What are the good ways to do this? I think i have to constantly send Packages for updating the Block damage to the server. First i try to do this via suscribing to PlayerEvent.BreakSpeed as this seems repeatedly called during breaking. But my harvesting of the other surrounding Blocks would fire a PlayerEvent.BreakSpeed too and result in an infinity loop. What are the alternative solutings?
  8. What I found: Various events and functions updates the Entities motionX/Y/Z values, but applying these motion is done in the specific onUpdate Methods. So if one has a Entity which extends only the Entity Baseclass you have call this.moveEntity(this.motionX, this.motionY, this.motionZ); My basic solution To the Boundingbox thing: while they seems to work, there ingame offset is directly correlated with theProperty Entity#yOffset. Has anybody an idea how this used?
  9. Yeah sure, learning is best done with reading others code, but with poorly commented code or no idea where to look this is quite a pain. EntityItem has no Collision enabled and reaction to Players / Water is done via a specific Methods So i don't think i can use these method, if want a behaviour like other pushable Entities. Something i found while digging through code is the Entity.applyEntityCollision(Entity) method: I dampens and revert the motion of both collided Entities. In LivingEntities, it's called via onUpdate()->onLivingUpdate()->collideWithNearbyEntities()->collideWithEntity()->applyEntityCollision() I copied collideWithNearbyEntities and collideWithEntity to my class and called in onUpdate (after super.onUpdate). I get following behaviour: The Movement of my player behaves as it should in code (slightly pushed back) but my ModEntity doesn't move. My entity doesn't move in flowing water, which it should, since this is also implemented in Entity.class I call setSize in the constructor of my Entity, this should be enough to working correctly on the Client isn't it?
  10. Hello, Where can i find more detailed information about how Entities work? I don't talking about the "Extend EntityAnimal/EntityMob, extend render with your custom texture and register these classes.". My Problem is: i want to make a non-living, passive Entity, which can be pushed by other Entitys. In my Entity class i let return canBeCollidedWith canBePushed true, also return getBoundingBox and getCollisionBox the boundingboxes. Another thing: are Boundingboxes just another name for Collisionboxes? And what are the Boxes which get Displayed In-Game after you hit F3+b ? Because for my Entity they definitely look other then I set with setSize(1.0F, 1.0F); Greetings Voidi
×
×
  • Create New...

Important Information

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