Jump to content

Luis_ST

Members
  • Posts

    5704
  • Joined

  • Last visited

  • Days Won

    72

Everything posted by Luis_ST

  1. As already stated in the title, I have problems saving my custom tileentity data, the saving itself works, but when I change the data I close the world and open it again I get an error message (see log). What I don't understand about it when loading the world, the save method should not be called in my tileentity because the data should actually be loaded. why is the method called? this is my TileEntity this is the log: error log.log
  2. okay first of all, used the code feature to post code in the forum the part with the enchantment registration is not relevant for the function (event) of the enchantment this will not work because the ItemStack required in the method does not exist when the event is registered, In addition, the event would only be called if the player take damge and something changed in the equipment public static void onWithVoidSpeedEnchantment(LivingEquipmentChangeEvent event, ItemStack itemStack, LivingDamageEvent event2) you don't want to add any damge to the player here
  3. show what you created
  4. I guess your event won't call because you should use a subclass here and not directly the PlayerEvent class For example, the PlayerTick event would be conceivable but this Event is not located in the PlayerEvent class (TickEvent§PlayerTickEvent). Idea: In my opinion, the ticket event is not the best solution. I would use the LivingEquipmentChangeEvent for the speed effect, then check whether the entity is a player and the item enchatend is in your enchantment, and then add an effect to the player that is infinite (you then have to remove it the same way) and because of the damage, check out the Damage Events(LivingDamageEvent and LivingHurtEvent) read the java docs for more information about the events.
  5. First of all, is the method executes which initialize the DeferredRegister? is only the item of the block not available or does the block not exist? (use the setBlock command to check this)
  6. Internet? if you found this site you will also find one for java just have a look here...
  7. Update: I'm trying to adapt my TileEntity, I used the CampfireTileEntity as an example because it actually works the same way
  8. I changed it, but the inventory remains empty
  9. okay i'm now checking whether the world is a ServerWorld but this has not fixed the error, if I print the inventory on the console after interacting, every slot is empty this is the updated class
  10. I have created a tileentity which should add items to an ItemStackHandler when you right-click. if after adding the item I check whether the item is present in the ItemStackHandler, It returns false. this is my TE I suspect it is due to the synchronization between client and server, but I'm not sure, because it could be something else does anyone have any idea what I have to change?
  11. okay thanks for your help and i think it was a error in my idea, because i re-imported my forge project and now everything works
  12. thanks and do i get an answer to this question? is that on purpose or a error in my IDE
  13. which command do i have to use because when i use !mcpm i get the old the names
  14. okay i'm trying to use the discord bot and why are some classes not readable?
  15. I know that the latest version of forge no longer uses the forge but the mojang mappings therefore i cannot find some methods is there a list or something similar where i can find the new name of the method I would find the methods myself, if not most of the classes look like this: here are some methods with their old names VoxelShapes#combineAndSimplify Block#updatePostPlacement Block#allowsMovement does anyone know the new mapping names? and does anyone have any idea why many classes are not readable / look strange?
  16. use the FMLClientSetupEvent and not the FMLCommonSetupEvent set all RenderLayer to translucent (not cutout or cutoutMipped)
  17. used a git client, and created your repo with it, then it contains all the files that are needed
  18. to find the problem we need more than just the "src" folder short: your repo is incomplete
  19. public class ModGlassBlock extends GlassBlock{ public ModGlassBlock(AbstractBlock.Properties p_i48392_1_) { super(p_i48392_1_); } public boolean isOpaqueCube() { return false; } public boolean notSolid() { return true; } } this will not work because Block or GlassBlock does not contain any of these methods and I said add this (notSolid) to the block properties so to the following public static final RegistryObject<Block> BERYLGLASS = BLOCKS.register("beryl_glass", () ->newModGlassBlock(AbstractBlock.Properties.of(Material.LEAVES).strength(0.3F).sound(SoundType.GLASS) .noOcclusion().harvestTool(ToolType.PICKAXE).harvestLevel(1))); Edit: if I see that correctly you are using the latest Forge version (the one with the Mojang mappings), which means notSolid is now called noOcclusion (I'm not 100% sure -> it could also be called differently)
  20. I'm not sure what you mean by connecting the texture, but try to add notSolid to the block properties and add a RenderTypeLookup to the block
×
×
  • Create New...

Important Information

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