Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Leonardlasardine

Members
  • Content Count

    16
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Leonardlasardine

  • Rank
    Tree Puncher

Recent Profile Visitors

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

  1. It's was not evident ! I couldn't guess that. New version have removed GameRegistry, EnumHelper, IWorodGeneraror ect... It was possible that packets were removed.
  2. AH YES OK it's for that ! I need to click an on/off button to start and it don't send the information to the server. Thank you. I remember in 1.12 we had to use packets for sending information across sides. Is it always that in 1.15 or there is an other way to send data? Ok thank you I will use pickBlock because I want my quarry to use skill touch. Good evening
  3. Ok, I will use only one variable. Ah ok thank you, it because of that it was a lot complicated to use the inventory of the block, thank you I will use ItemStackHandler. It's because the booelan dropBlock is used on other class like the gui. Ok I haven't tested with complicated items, I have only tested on the ground with the dirt, grass stone, iron, ect it work. So how should I collect the ItemStack ? *Suspicion* Oops...
  4. DestroyBlock is called in the method tick, every 40 tick (1 second) * the radius (by default is 3 blocks). This is the code in QuarryTileEntity : package fr.leonard.erasium.quarry; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerInventory; import net.minecraft.fluid.IFluidState; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.ISidedInventory; import net.minecraft.in
  5. DestroyBlock is called in the method tick, every 40 tick (1 second) * the radius (by default is 3 blocks). This is the code in QuarryTileEntity : package fr.leonard.erasium.quarry; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerInventory; import net.minecraft.fluid.IFluidState; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.ISidedInventory; import net.minecraft.in
  6. Ok thank you, so 3 is good. And my last question is why it only work on solo ?
  7. Yes I have seen that but what mean "OR-ed" ? I am not english sorry I am don't understand this. But yes I will use the 4. Thank you
  8. Thank you, The javadoc is : ** * Sets a block state into this world.Flags are as follows: * 1 will cause a block update. * 2 will send the change to clients. * 4 will prevent the block from being re-rendered. * 8 will force any re-renders to run on the main thread instead * 16 will prevent neighbor reactions (e.g. fences connecting, observers pulsing). * 32 will prevent neighbor reactions from spawning drops. * 64 will signify the block is being moved. * Flags can be OR-ed */ Should I use 1, 2, or 4? Or maybe I need copy the method 3 ti
  9. AHH, I'm sorry I have the solution. Yes I you where right it work. I have just forgoted a line at the end of the void ! 🤦‍♀️ RAHHHH ! I was replacing the block : Ah yes sorry I can post my code into text but he haven't got colors. This was my old code : private void destroyBlock(BlockPos pos, boolean dropBlock, Block blockRemoved) { assert world != null; BlockState blockstate = world.getBlockState(pos); if (!blockstate.isAir(world, pos) && blockstate.getBlock() != Blocks.BEDROCK) { IFluidState ifluidstate = world
  10. Yes I am using the world field in TileEntity as you said but it doesn't work. I apologize you had to tell it two times. I thought I needed to use an other thing because it doesn't work but if I must use this, why it doesn't work ? The block is not removed
  11. Ok, so I have re read all the doc about threads in Oracle docs and in the forge website. Now my code is : https://github.com/Leonardlasardine/Erasium/blob/master/src/main/java/fr/leonard/erasium/quarry/ErasiumQuarry.java Ok thanks you, so what should I use instead? I have found ServerWorld, ServerMultiWorld and MinecraftServer but it's not them. Thanks for your help.
  12. Hello, Ok thanks for your advices, I have already learned all about threads and sides, ect... but I will listen you and revise it. Maybe I will find my answer... Thanks you for your answer fast eat the light.
  13. I don't understand sorry. What is the "opposite" ? World.getMinecraft() ? 🤔 No, I don't think you want to say that. Or maybe there is a ServerWorld class ? I am verty confused sorry. But thanks a lot for answering.
  14. Thanks a lot for the very quick answer, First,I have removed assert and this : Ah, should I replace world by Minecraft.getInstance().world ? world is from TileEntity : So if Minecraft is only for the client... how can I break a block ? Thanks for your answer
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.