Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public TypedActionResult<ItemStack> use(World world, PlayerEntity user, Hand hand) {
- if(!world.isClient() && hand == Hand.MAIN_HAND){
- ServerWorld overworld = world.getServer().getWorld(World.OVERWORLD);
- user.moveToWorld(overworld);
- world.playSound(null, user.getBlockPos(), ModSounds.MAGIC_MIRROR_USE,
- SoundCategory.PLAYERS, 0.25f, 1f);
- user.getItemCooldownManager().set(this, 100);
- }
- return super.use(world, user, hand);
- }
Advertisement
Add Comment
Please, Sign In to add comment