Jump to content

abused_master

Members
  • Posts

    235
  • Joined

  • Last visited

Everything posted by abused_master

  1. so @Nullable @Override public ICapabilityProvider initCapabilities(ItemStack stack, @Nullable NBTTagCompound nbt) { return super.initCapabilities(stack, nbt); } ? or am is that completely wrong and i have to do something else
  2. how can i do that? player.fallDistance = 0; ? Two ways either Subscribe to the LivingFallEvent or litterally in your onArmorTick constantly set it to 0. All right ill take care of that in a bit, but running into a bit of a problem, when i charge up the jetpack in my inventory it also charges all the jetpacks in the world, how do i fix that?
  3. how can i do that? player.fallDistance = 0; ?
  4. @Override public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { if(KeybindHandler.keybind.isKeyDown()) { player.addVelocity(0, 0.2, 0); } super.onArmorTick(world, player, itemStack); } or do u want my entire class code?
  5. I got all that stuff sorted but there are 2 problems, #1 going up is too fast, would i change the player.addVelocity(0, 0.2, 0); to player.addVelocity(0, 0.1, 0); #2 the moment the player touches the ground he takes a ton of damage, even if its just 1 block above, a few more and he is dead, how can i fix that?
  6. player.addVelocity(0, 0.2/** Running speed 0.1 walking speed*/, 0); Also you may want to add a cap, y velocity. I see, thank you, so i just have to set it to detect the energy stored and if the player is pressing the space bar, and use energy, which should be easy
  7. yeah i just got that, putting on the jetpack lags the f*** outta me, RIP minecraft so what values would i put in to make it how i want?
  8. would this be correct? @Override public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { double x = player.posX; double y = player.posX; double z = player.posX; player.addVelocity(x, y, z); super.onArmorTick(world, player, itemStack); }
  9. Probably but again im terrible with packets, which is why with everything iv made i haven't used em, ill learn them but idk about rn
  10. All right, i think im good with keybinds, how about the flight? would it go in: and if so how would i accomplish that @Override public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { super.onArmorTick(world, player, itemStack); }
  11. i know how to make it use energy, just the other stuff i dont know how to do
  12. Hey y'all, im back, again This time im working on a jetpack, yes a jetpack Iv made the item, made it implement IEnergyContainerItem for power, made the model, and rendered it, all that stuff, but how can i make it so when the player is pressing space bar he gets jetpack flight, not creative flight, but ones like Redstone Arsenal had, and the player had to keep his hand on space otherwise he could fall and die
  13. Yeah ik i was told that i should change it and i will soon, just glad i got it working rn
  14. Here is the thing though, if say my mod was used on a multiplayer server, usually it would be 1 of 2 things, public, where they would have a claim protection plugin to protect against grief, my quarry will not affect claims, and 2, private, whitelisted servers, those types of servers would usually have all friends/people who know each other well, so if the quarry was used it would be very unlikely that someone would place it on top of anothers base, also players dont usually put quarries in the overworld since they would ruin the look of the world they usually do it in another dimension like the aroma dimension, or the one that i have created in my mod, those are the considerations i did take in mind when i was making this. Also i fixed the quarry not outputting to the chests, if anyone wants to take a look here it is: @Override public void update() { BlockPos quarrypos = getPos(); if (y == -1) y = pos.getY() - 1; int chunkX, chunkZ; { Chunk c = worldObj.getChunkFromBlockCoords(pos); chunkX = c.xPosition; chunkZ = c.zPosition; } if (atTickRate(10) && storage.getEnergyStored() >= 100) { storage.setEnergyStored(storage.getEnergyStored() - 100); boolean hasBrokenBlock = false; start: for (int x = 0; x < 16; ++x) for (int z = 0; z < 16; ++z) { BlockPos pos = new BlockPos(chunkX * 16 + x, y, chunkZ * 16 + z); Block bb = worldObj.getBlockState(pos).getBlock(); if (!hasBrokenBlock && !worldObj.isAirBlock(pos) && FluidRegistry.lookupFluidForBlock(bb) == null && bb != Blocks.FLOWING_LAVA && bb != Blocks.FLOWING_WATER) { IBlockState state = worldObj.getBlockState(pos); World world; Block b = state.getBlock(); if (b.getBlockHardness(state, worldObj, pos) < 0F) continue; List<ItemStack> drops; drops = new ArrayList<ItemStack>(); drops = state.getBlock().getDrops(getWorld(), pos, state, 0); for (ItemStack drop : drops) { for (EnumFacing side : EnumFacing.VALUES) { BlockPos cip = quarrypos.offset(side); TileEntity ite = worldObj.getTileEntity(cip); if (ite instanceof IInventory) { drop = TileEntityHopper.putStackInInventoryAllSlots(null, (IInventory) ite, drop, side.getOpposite()); } if (drop == null) { break; } } if (drop != null) { EntityItem ent = new EntityItem(getWorld(), quarrypos.getX() + 0.5, quarrypos.getY() + 1, quarrypos.getZ() + 0.5); ent.setEntityItemStack(drop); getWorld().spawnEntityInWorld(ent); } } hasBrokenBlock = true; worldObj.destroyBlock(pos, false); break start; } } if (!hasBrokenBlock) y--; } }
  15. I dont fine them silly at all, and i appreciate everyone here who is trying to help me, so let me answer these questions #1 What happens is players/mobs that are standing on the area that is being quarried will basically be following the y the quarry is at, every layer mined is another layer they fall down, if lava is exposed and a player/mob is there they will be effected by it, #2 the quarry will only mine starting 1 y below it, so anything placed on any side besides the bottom will be safe, i find it odd that anyone would want to place a chest under the quarry anyways, and as iv seen so far, iv placed a chest and hopper below the quarry, and it has not destroyed them, this is probably as it already cleared the layer below it and has moved on to the next one not coming back for that 1 block.
  16. It is, its using 100RF/tick not just 100RF for the entire chunk, and its breaking only one block at a time at a steady speed
  17. Completes the chunk and spits the blocks it mines on top of it
  18. would i change my if to: if (atTickRate(10) && storage.getEnergyStored() >= 100 && y > 0) { ?
  19. And never, ever stop. The method will never return. It will continue trying to do something and never do so, thereby never exiting your statement as far as I can tell. How would i allow it to detect when it hits y level 0 to stop
  20. As of right now it will continuously try to mine the bedrock but not be able to is that really the reason of it not being able to output the items to a nearby inventory?
  21. What do u mean? i am multiplying them by 16 and the quarry works fine, the blocks it mines get spit out on top of it, but its not outputting to a chest or inventory thats touching it is what im implying
  22. Did a bit of testing with another modder but we still weren't able to figure out why it wasnt working
  23. Trees/logs will be quarried aswell. iv been tinkering for a little bit and have gotten "some progress" accomplished, basically the blocks the quarry mines will be spawned on top of where the quarry is, and i tried a method to get it to output to nearby inventories but that didnt work @Override public void update() { BlockPos quarrypos = getPos(); if (y == -1) y = pos.getY() - 1; int chunkX, chunkZ; { Chunk c = worldObj.getChunkFromBlockCoords(pos); chunkX = c.xPosition; chunkZ = c.zPosition; } if (atTickRate(10) && storage.getEnergyStored() >= 100) { storage.setEnergyStored(storage.getEnergyStored() - 100); boolean hasBrokenBlock = false; start: for (int x = 0; x < 16; ++x) for (int z = 0; z < 16; ++z) { BlockPos pos = new BlockPos(chunkX * 16 + x, y, chunkZ * 16 + z); Block bb = worldObj.getBlockState(pos).getBlock(); if (!hasBrokenBlock && !worldObj.isAirBlock(pos) && FluidRegistry.lookupFluidForBlock(bb) == null && bb != Blocks.FLOWING_LAVA && bb != Blocks.FLOWING_WATER) { IBlockState state = worldObj.getBlockState(pos); World world; Block b = state.getBlock(); if (b.getBlockHardness(state, worldObj, pos) < 0F) continue; List<ItemStack> drops; drops = new ArrayList<ItemStack>(); drops = state.getBlock().getDrops(getWorld(), pos, state, 0); for (ItemStack drop : drops) { for (EnumFacing side : EnumFacing.VALUES) { BlockPos cip = pos.offset(side); TileEntity ite = worldObj.getTileEntity(cip); if (ite instanceof IInventory) { drop = TileEntityHopper.putStackInInventoryAllSlots(null, (IInventory) ite, drop, side.getOpposite()); } if (drop == null) { break; } } if (drop != null) { EntityItem ent = new EntityItem(getWorld(), quarrypos.getX() + 0.5, quarrypos.getY() + 1, quarrypos.getZ() + 0.5); ent.setEntityItemStack(drop); getWorld().spawnEntityInWorld(ent); } } hasBrokenBlock = true; worldObj.destroyBlock(pos, false); break start; } } if (!hasBrokenBlock) y--; } }
  24. A suggestion i got was "i gather drops from Block class, and put those items in internal inventory. Then quarry looks for all sides except EnumFacing.DOWN, and look for TileEntity, that implements IInventory. And the last thing is extracting from internal to those tiles using HammerCore." would this be a good idea? how would i be able to do it?
  25. I dont want it to store any in an internal inventory/slot, i just want it to push the blocks it breaks into an adjacent inventory such as a hopper or chest directly without the need of a hopper under it other mod's transfer conduits and such
×
×
  • Create New...

Important Information

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