Jump to content

Aes123

Members
  • Posts

    12
  • Joined

  • Last visited

Recent Profile Visitors

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

Aes123's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I want to add a custom dimension to my mod that is not randomly generated. I want this world to be a void world with a huge island I have created. I don't want to use jigsaw and structure blocks for this as the island does not have procedural elements and is very large (500x500 blocks). I have taken a look at the end dimension which has a big island in the center but I haven't figured out how to do it myself.
  2. Hi, i'm making a new command which requires a new argumentType called StringPlusArgumentType. I have effectively copied StringArgumentType and only changed it so '=' is considered a valid character. I'm having trouble registering it. public static final DeferredRegister<ArgumentTypeInfo<?,?>> ARGUMENT_TYPES = DeferredRegister.create(ForgeRegistries.COMMAND_ARGUMENT_TYPES, MODID); public static final RegistryObject<ArgumentTypeInfo<?,?>> STRING_PLUS_ARGUMENT_TYPE = ARGUMENT_TYPES.register("string_plus", () -> new StringPlusArgumentSerializer()); And then: ARGUMENT_TYPES.register(modEventBus); MinecraftForge.EVENT_BUS.register(this); But when i try to join a world it crashes with the message "Invalid player data" Crash log: java.lang.IllegalArgumentException: Unrecognized argument type string() (class me.aes123.commands_plus.commands.StringPlusArgumentType) at net.minecraft.commands.synchronization.ArgumentTypeInfos.byClass(ArgumentTypeInfos.java:155)
  3. Im relatively new to modding too but i think you can pass the itemstack from the xpball constructor
  4. I am unable to find how to make biomes generate in the overworld in 1.16. Any help would be appreciated.
  5. Found it thanks so much for the help
  6. In 1.16 TileEntity class doent have the read fucn and i cant seem to find any way to save data with TileEntities. Any help how to do it?
  7. Hey im having the same problem, could you send me the code which fixed the issue?
  8. Nevermind, i changed the event to BreakEvent and i modified this line to be like this player.getEntityWorld().setBlockState(e.getPos().add(0,0,0), Blocks.STONE.getDefaultState()); and it works fine. Thanks anyways
  9. player.getEntityWorld().setBlockState(e.getPos(), Blocks.STONE.getDefaultState()); This part doesnt work.
  10. I just tried that but it didnt work.
  11. Having trouble understanding why this piece of code doesnt work. It's meant to replace the ruby_ore when mined by player to stone. Note : it doesnt throw any errors. package com.aes123.atomicrevolution.events; import com.aes123.atomicrevolution.AtomicRevolution; import com.aes123.atomicrevolution.util.BlockInit; import net.minecraft.block.Blocks; import net.minecraft.entity.player.PlayerEntity; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.event.entity.living.LivingDestroyBlockEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.event.entity.player.PlayerDestroyItemEvent @Mod.EventBusSubscriber(modid = AtomicRevolution.MOD_ID, bus = Mod.EventBusSubscriber.Bus.FORGE, value = Dist.CLIENT) public class PlayerBrokeIronEvent { @SubscribeEvent public static void playerBrokeRubyOre(LivingDestroyBlockEvent e) { if(e.getEntityLiving() instanceof PlayerEntity){ PlayerEntity player = (PlayerEntity) e.getEntityLiving(); if(e.getState().getBlock() == BlockInit.ruby_ore){ player.getEntityWorld().setBlockState(e.getPos(), Blocks.STONE.getDefaultState()); } } } } Thanks in advance
×
×
  • Create New...

Important Information

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