Jump to content

Arrows Do No Damage


Lumby

Recommended Posts

I have a block that shoots an arrow every time it is activated by right click whilst holding cobblestone. The arrows it spawn, however, bounce off of any entity it hits. Any idea what might cause this, and possible fixes? Thanks!

 

Code:

   public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float side, float hitX, float hitY)
    {
    	
    	if(playerIn.getHeldItemMainhand().getItem().equals(Item.getItemFromBlock(Blocks.COBBLESTONE))) {
    		if(facing == ((EnumFacing)state.getValue(FACING))) {
    			return true;
    		}
			if(rechargeTimer == 0) {
				if(worldIn.isRemote) {
					EntityTippedArrow entityarrow;
	        		if(((EnumFacing)state.getValue(FACING)).getIndex() ==2){
	        			entityarrow = new EntityTippedArrow(worldIn, (double)pos.getX()+0.5, ((double)pos.getY()+0.9), (double)pos.getZ()-0.1);
	        		}else if(((EnumFacing)state.getValue(FACING)).getIndex() ==3) {
	        			entityarrow = new EntityTippedArrow(worldIn, (double)pos.getX()+0.5, ((double)pos.getY()+0.9), (double)pos.getZ()+1.1);
	        		}else if(((EnumFacing)state.getValue(FACING)).getIndex() ==4) {
	        			entityarrow = new EntityTippedArrow(worldIn, (double)pos.getX()-0.1, ((double)pos.getY()+0.9), (double)pos.getZ()+0.5);
	        		}else {
	        			entityarrow = new EntityTippedArrow(worldIn, (double)pos.getX()+1.1, ((double)pos.getY()+0.9), (double)pos.getZ()+0.5);
	        		}
	        		
	        		entityarrow.setPotionEffect(new ItemStack(Items.ARROW));
				float f = -MathHelper.sin(playerIn.rotationYaw * 0.017453292F) * MathHelper.cos(playerIn.rotationPitch * 0.017453292F);
				float f1 = -MathHelper.sin(playerIn.rotationPitch * 0.017453292F);
				float f2 = MathHelper.cos(playerIn.rotationYaw * 0.017453292F) * MathHelper.cos(playerIn.rotationPitch * 0.017453292F);
	        		entityarrow.setIsCritical(true);
	        		entityarrow.setDamage(30.0);
	        		entityarrow.setKnockbackStrength(1);
	        		entityarrow.shoot((double)f, (double)f1+0.05, (double)f2, 3.0F, 1.0F);
	        		worldIn.spawnEntity(entityarrow);
	        		
	            		this.rechargeTimer =1;

			}
        		if(!playerIn.capabilities.isCreativeMode) {
        			playerIn.getActiveItemStack().shrink(1);
            		}
                
        		worldIn.playSound(playerIn, pos, SoundEvents.ENTITY_ARROW_SHOOT, SoundCategory.NEUTRAL, 0.5F, 0.4F / (0.2F + 0.8F));
        	}
			worldIn.scheduleUpdate(pos, this, 10);
	}
    	
    	
    	return true;
    }

 

Edited by Lumby
Link to comment
Share on other sites

13 minutes ago, Lumby said:

if(worldIn.isRemote) {

This would be your issue. You are only spawning your arrow on the client. You need to do the opposite.

 

Also you can't do this

13 minutes ago, Lumby said:

if(rechargeTimer == 0) {

Blocks are singletons thus every block in the world that shares this class shares all the variables of that class. You must use a TileEntity if you want to store the data per-block.

  • Thanks 1
Link to comment
Share on other sites

Thank you so much for your help! Sorry I'm still new to modding so don't really have a clear idea which things should be on server or client. 

1 hour ago, V0idWa1k3r said:

Blocks are singletons thus every block in the world that shares this class shares all the variables of that class. You must use a TileEntity if you want to store the data per-block.

Regarding this, I've made some adjustments to my block class and created a new TileEntity to store the cooldown. Essentially, that cooldown is to prevent spamming the shots and give the block a steady rate of fire. At first it worked fine, but occasionally when I tried to load the world it gives an exception and crashes:

Quote

A TileEntity type com.crumbletheundead.blocks.machines.Trebuchet.TileEntityTrebuchet has throw an exception trying to write state. It will not persist. Report this to the mod author

java.lang.RuntimeException: class com.crumbletheundead.blocks.machines.Trebuchet.TileEntityTrebuchet is missing a mapping! This is a bug!

Any ideas what this might be?

 

This is my updated block class:

public class TrebuchetBlock extends BlockBase implements ITileEntityProvider{

	public static final PropertyDirection FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL);
	
	public TrebuchetBlock(String name, Material material) {
		super(name, material);
		setSoundType(SoundType.STONE);
		setHardness(18.0F);
		setResistance(18.0F);
		setHarvestLevel("pickaxe",3);
		setCreativeTab(CreativeTabs.REDSTONE);
		
        
	}
	
    public void updateTick(World worldIn, BlockPos pos, IBlockState state, Random rand){
        if (!worldIn.isRemote){
        	if(worldIn.getTileEntity(pos) instanceof TileEntityTrebuchet) {
        		((TileEntityTrebuchet)worldIn.getTileEntity(pos)).setCooldown(0);
        	}
        }
    }
	
    public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float side, float hitX, float hitY){
    	
    	if(playerIn.getHeldItemMainhand().getItem().equals(Item.getItemFromBlock(Blocks.COBBLESTONE))) {
    		if(facing == ((EnumFacing)state.getValue(FACING))) {
    			return true;
    		}
			if((worldIn.getTileEntity(pos)) instanceof TileEntityTrebuchet) {
				if(((TileEntityTrebuchet)worldIn.getTileEntity(pos)).getCooldown()==0) {
					if(!worldIn.isRemote) {
						EntityTippedArrow entityarrow;
		        		if(((EnumFacing)state.getValue(FACING)).getIndex() ==2){
		        			entityarrow = new EntityTippedArrow(worldIn, (double)pos.getX()+0.5, ((double)pos.getY()+0.9), (double)pos.getZ()-0.2);
		        		}else if(((EnumFacing)state.getValue(FACING)).getIndex() ==3) {
		        			entityarrow = new EntityTippedArrow(worldIn, (double)pos.getX()+0.5, ((double)pos.getY()+0.9), (double)pos.getZ()+1.2);
		        		}else if(((EnumFacing)state.getValue(FACING)).getIndex() ==4) {
		        			entityarrow = new EntityTippedArrow(worldIn, (double)pos.getX()-0.2, ((double)pos.getY()+0.9), (double)pos.getZ()+0.5);
		        		}else{
		        			entityarrow = new EntityTippedArrow(worldIn, (double)pos.getX()+1.2, ((double)pos.getY()+0.9), (double)pos.getZ()+0.5);
		        		}
		        		
		        		entityarrow.setPotionEffect(new ItemStack(Items.ARROW));
		        		float f = -MathHelper.sin(playerIn.rotationYaw * 0.017453292F) * MathHelper.cos(playerIn.rotationPitch * 0.017453292F);
		        		float f1 = -MathHelper.sin(playerIn.rotationPitch * 0.017453292F);
		        		float f2 = MathHelper.cos(playerIn.rotationYaw * 0.017453292F) * MathHelper.cos(playerIn.rotationPitch * 0.017453292F);
		        		entityarrow.setIsCritical(true);
		        		entityarrow.setDamage(30.0);
		        		entityarrow.setKnockbackStrength(1);
		        		entityarrow.shoot((double)f, (double)f1+0.05, (double)f2, 3.0F, 1.0F);
		        		worldIn.spawnEntity(entityarrow);
		        		
		        		((TileEntityTrebuchet)worldIn.getTileEntity(pos)).setCooldown(1);
				}
	        		if(!playerIn.capabilities.isCreativeMode) {
	        			playerIn.getItemStackFromSlot(EntityEquipmentSlot.MAINHAND).shrink(1);
	        		}
	        		worldIn.playSound(playerIn, pos, SoundEvents.ENTITY_ARROW_SHOOT, SoundCategory.NEUTRAL, 0.5F, 0.4F / (0.2F + 0.8F));
			}
				

        		
			}
			worldIn.scheduleUpdate(pos, this, 60);
			
		}
    	
    	
    	return true;
    }
    
    
	
    protected BlockStateContainer createBlockState()
    {
        return new BlockStateContainer(this, new IProperty[] {FACING});
    }

    public IBlockState withRotation(IBlockState state, Rotation rot)
    {
        return state.withProperty(FACING, rot.rotate((EnumFacing)state.getValue(FACING)));
    }
    
    public IBlockState withMirror(IBlockState state, Mirror mirrorIn)
    {
        return state.withRotation(mirrorIn.toRotation((EnumFacing)state.getValue(FACING)));
    }
    
    public IBlockState getStateForPlacement(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
    {
        return this.getDefaultState().withProperty(FACING, placer.getHorizontalFacing().getOpposite());
    }
    
    public int getMetaFromState(IBlockState state)
    {
        int i = 0;
        i = i | ((EnumFacing)state.getValue(FACING)).getHorizontalIndex();
        return i;
    }
    
    public IBlockState getStateFromMeta(int meta)
    {
        return this.getDefaultState().withProperty(FACING, EnumFacing.getHorizontal(meta));
    }

    public TileEntity createNewTileEntity(World worldIn, int meta)
    {
    	TileEntityTrebuchet tileEntityTrebuchet = new TileEntityTrebuchet();
        
        return tileEntityTrebuchet;
    }
    
    @Override
    public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
    {

		if(stack.hasDisplayName())
		{
			TileEntity tileentity = worldIn.getTileEntity(pos);
			
			if(tileentity instanceof TileEntityTrebuchet){
				((TileEntityTrebuchet)tileentity).setCustomName(stack.getDisplayName());
				((TileEntityTrebuchet)tileentity).setCooldown(0);
			}	
		}
    }


}

 

And TileEntity Class:

public class TileEntityTrebuchet extends TileEntity{
	private String customName;
	public int cooldown;
	
	public boolean hasCustomName() 
	{
		return this.customName != null && !this.customName.isEmpty();
	}
	
	public void setCustomName(String customName) 
	{
		this.customName = customName;
	}
	
	@Override
	public void readFromNBT(NBTTagCompound compound)
	{
		super.readFromNBT(compound);
		if (compound.hasKey("cooldown")) {
			cooldown = compound.getInteger("cooldown");
		}
		
		if(compound.hasKey("CustomName", 8)) {
			this.customName = compound.getString("CustomName");
		}
	}
	
	@Override
	public NBTTagCompound writeToNBT(NBTTagCompound compound) 
	{
		super.writeToNBT(compound);
		compound.setInteger("cooldown", cooldown);
		
		
		if(compound.hasKey("CustomName", 8)) {
			compound.setString("CustomName", this.customName);
		}
		
		return compound;
	}
	
	public int getCooldown() {
		return this.cooldown;
	}
	public void setCooldown(int cd) {
		this.cooldown= cd;
	}
	
	public boolean isUsableByPlayer(EntityPlayer player) 
	{
		return this.world.getTileEntity(this.pos) != this ? false : player.getDistanceSq((double)this.pos.getX() + 0.5D, (double)this.pos.getY() + 0.5D, (double)this.pos.getZ() + 0.5D) <= 64.0D;
	}
}

 

Edited by Lumby
Link to comment
Share on other sites

Thanks for the suggestion! I've registered the tileEntity and added the necessary methods and annotations as you mentioned. The world no longer crashes, but no tileEntities are created every time I place a block. Any idea what might cause this?

 

Block class:


public class TrebuchetBlock extends BlockBase {

	public static final PropertyDirection FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL);
	
	public TrebuchetBlock(String name, Material material) {
		super(name, material);
		setSoundType(SoundType.STONE);
		setHardness(18.0F);
		setResistance(18.0F);
		setHarvestLevel("pickaxe",3);
		setCreativeTab(CreativeTabs.REDSTONE);
		
        
	}
	
    public void updateTick(World worldIn, BlockPos pos, IBlockState state, Random rand){
        if (!worldIn.isRemote){
        	if(worldIn.getTileEntity(pos) instanceof TileEntityTrebuchet) {
        		((TileEntityTrebuchet)worldIn.getTileEntity(pos)).setCooldown(0);
        	}
        }
    }
	
    public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float side, float hitX, float hitY){
    	
    	if(playerIn.getHeldItemMainhand().getItem().equals(Item.getItemFromBlock(Blocks.COBBLESTONE))) {
			if((worldIn.getTileEntity(pos)) instanceof TileEntityTrebuchet) {
				worldIn.playSound(playerIn, pos, SoundEvents.BLOCK_CHEST_OPEN, SoundCategory.BLOCKS, 0.5F, 0.4F / (0.2F + 0.8F));
				if(((TileEntityTrebuchet)worldIn.getTileEntity(pos)).getCooldown()<=0) {
					if(!worldIn.isRemote) {
						EntityTippedArrow entityarrow;
		        		if(((EnumFacing)state.getValue(FACING)).getIndex() ==2){
		        			entityarrow = new EntityTippedArrow(worldIn, (double)pos.getX()+0.5, ((double)pos.getY()+0.9), (double)pos.getZ()-0.2);
		        		}else if(((EnumFacing)state.getValue(FACING)).getIndex() ==3) {
		        			entityarrow = new EntityTippedArrow(worldIn, (double)pos.getX()+0.5, ((double)pos.getY()+0.9), (double)pos.getZ()+1.2);
		        		}else if(((EnumFacing)state.getValue(FACING)).getIndex() ==4) {
		        			entityarrow = new EntityTippedArrow(worldIn, (double)pos.getX()-0.2, ((double)pos.getY()+0.9), (double)pos.getZ()+0.5);
		        		}else{
		        			entityarrow = new EntityTippedArrow(worldIn, (double)pos.getX()+1.2, ((double)pos.getY()+0.9), (double)pos.getZ()+0.5);
		        		}
		        		
		        		entityarrow.setPotionEffect(new ItemStack(Items.ARROW));
		        		float f = -MathHelper.sin(playerIn.rotationYaw * 0.017453292F) * MathHelper.cos(playerIn.rotationPitch * 0.017453292F);
		        		float f1 = -MathHelper.sin(playerIn.rotationPitch * 0.017453292F);
		        		float f2 = MathHelper.cos(playerIn.rotationYaw * 0.017453292F) * MathHelper.cos(playerIn.rotationPitch * 0.017453292F);
		        		entityarrow.setIsCritical(true);
		        		entityarrow.setDamage(30.0);
		        		entityarrow.setKnockbackStrength(1);
		        		entityarrow.shoot((double)f, (double)f1+0.05, (double)f2, 3.0F, 1.0F);
		        		worldIn.spawnEntity(entityarrow);
		        		
		        		((TileEntityTrebuchet)worldIn.getTileEntity(pos)).setCooldown(1);
					}
	        		if(!playerIn.capabilities.isCreativeMode) {
	        			playerIn.getItemStackFromSlot(EntityEquipmentSlot.MAINHAND).shrink(1);
	        		}
	        		worldIn.playSound(playerIn, pos, SoundEvents.ENTITY_ARROW_SHOOT, SoundCategory.NEUTRAL, 0.5F, 0.4F / (0.2F + 0.8F));
				}	
			}
			worldIn.scheduleUpdate(pos, this, 60);
			
		}
    	
    	
    	return true;
    }
    
    
	
    protected BlockStateContainer createBlockState()
    {
        return new BlockStateContainer(this, new IProperty[] {FACING});
    }

    public IBlockState withRotation(IBlockState state, Rotation rot)
    {
        return state.withProperty(FACING, rot.rotate((EnumFacing)state.getValue(FACING)));
    }
    
    public IBlockState withMirror(IBlockState state, Mirror mirrorIn)
    {
        return state.withRotation(mirrorIn.toRotation((EnumFacing)state.getValue(FACING)));
    }
    
    public IBlockState getStateForPlacement(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
    {
        return this.getDefaultState().withProperty(FACING, placer.getHorizontalFacing().getOpposite());
    }
    
    public int getMetaFromState(IBlockState state)
    {
        int i = 0;
        i = i | ((EnumFacing)state.getValue(FACING)).getHorizontalIndex();
        return i;
    }
    
    public IBlockState getStateFromMeta(int meta)
    {
        return this.getDefaultState().withProperty(FACING, EnumFacing.getHorizontal(meta));
    }

    
    @Override
    public TileEntity createTileEntity(World world, IBlockState state) {
    	TileEntityTrebuchet tileEntityTrebuchet = new TileEntityTrebuchet();
        
        return tileEntityTrebuchet;
 
    }
    
    @Override
    public boolean hasTileEntity() {
    	return true;
    }
    
    @Override
    public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
    {

		if(stack.hasDisplayName())
		{
			TileEntity tileentity = worldIn.getTileEntity(pos);
			
			if(tileentity instanceof TileEntityTrebuchet){
				((TileEntityTrebuchet)tileentity).setCustomName(stack.getDisplayName());
				((TileEntityTrebuchet)tileentity).setCooldown(0);
			}	
		}
    }


}

 

TileEntity class:


public class TileEntityTrebuchet extends TileEntity{
	private String customName;
	private int cooldown;
	
	public TileEntityTrebuchet() {
		this.cooldown = 0;
	}
	
	public boolean hasCustomName() 
	{
		return this.customName != null && !this.customName.isEmpty();
	}
	
	public void setCustomName(String customName) 
	{
		this.customName = customName;
	}
	
	@Override
	public void readFromNBT(NBTTagCompound compound)
	{
		super.readFromNBT(compound);
		if (compound.hasKey("cooldown")) {
			cooldown = compound.getInteger("cooldown");
		}
		
		if(compound.hasKey("CustomName", 8)) {
			this.customName = compound.getString("CustomName");
		}
	}
	
	@Override
	public NBTTagCompound writeToNBT(NBTTagCompound compound) 
	{
		super.writeToNBT(compound);
		if(compound.hasKey("cooldown")) {
			compound.setInteger("cooldown", cooldown);
		}
		
		
		if(compound.hasKey("CustomName", 8)) {
			compound.setString("CustomName", this.customName);
		}
		
		return compound;
	}
	
	public int getCooldown() {
		return this.cooldown;
	}
	public void setCooldown(int cd) {
		this.cooldown= cd;
	}
	public void shrinkCooldown() {
		this.cooldown--;
	}
	
}

 

This is my preInit() method:

	@EventHandler()
	public static void PreInit(FMLPreInitializationEvent event) {
		RegistryHandler.preInitRegistries();

	}

 

preInitRegistries() in my RegistryHandler class:

	public static void preInitRegistries() {
		TileEntityHandler.registerTileEntities();
		Main.network = NetworkRegistry.INSTANCE.newSimpleChannel(Reference.MOD_ID);
		RegistryHandler.registerPackets(Main.network);
		
	}

 

TileEntityHandler class:



public class TileEntityHandler {

	public static void registerTileEntities() {
		GameRegistry.registerTileEntity(TileEntityTrebuchet.class, new ResourceLocation(Reference.MOD_ID + ":trebuchet"));
	}
	
}

 

Edited by Lumby
Link to comment
Share on other sites

 

@Override
	public NBTTagCompound writeToNBT(NBTTagCompound compound) 
	{
		super.writeToNBT(compound);
		compound.setInteger("cooldown", cooldown);
		
		
		if(compound.hasKey("CustomName", 8)) {
			compound.setString("CustomName", this.customName);
		}
		
		return compound;
	}

This

16 hours ago, Lumby said:

if(compound.hasKey("CustomName", 8))

will never be true.

 

This

public void updateTick(World worldIn, BlockPos pos, IBlockState state, Random rand){
        if (!worldIn.isRemote){
        	if(worldIn.getTileEntity(pos) instanceof TileEntityTrebuchet) {
        		((TileEntityTrebuchet)worldIn.getTileEntity(pos)).setCooldown(0);
        	}
        }
    }

doesn't do what you think it does. It fires each tick, sure... for one random block in all of loaded chunks. Implement ITickable in your TileEntity and do the stuff with the cooldown there.

 

What makes you think no tile entity is created? Have you placed a breakpoing in any of your methods that get the tile entity and inspected the TE local?

  • Thanks 1
Link to comment
Share on other sites

6 minutes ago, V0idWa1k3r said:

Have you placed a breakpoing in any of your methods that get the tile entity and inspected the TE local?

Sorry I don't quite get what this means, I'm assuming you're asking if I put any tests? 

17 minutes ago, Lumby said:

if((worldIn.getTileEntity(pos)) instanceof TileEntityTrebuchet) {

I tested that the cobblestone if statement fired by having a SoundEvent fire right after it, and it did fire. The above if statement comes right after that cobblestone if statement. I then put the same SoundEvent to fire right after the above if statement, but it never did. I then went into MCEdit to check for TileEntities, and none showed up (other modded tileEntities of mine, however, did show up in MCEdit). 

Edited by Lumby
Link to comment
Share on other sites

1 hour ago, Lumby said:

Got it, I'll keep at it for another while bswefore bothering you guys again with the repository. Nonetheless, thank you all very much for the effort. 

 

2 hours ago, Lumby said:

public boolean hasTileEntity() {

This is why your TE is not appearing, this method needs to have a IBlockState parameter.

  • Thanks 1

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

11 minutes ago, Animefan8888 said:

This is why your TE is not appearing, this method needs to have a IBlockState parameter.

And this is why you should always @Override

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

53 minutes ago, V0idWa1k3r said:

In the code the OP posted he has one though

He is just using a deprecated version. Which is his issue as far as I can tell.

*Digs into what the non-state method signature is. Ah, it does look like that, and not part of ITileEntityProvider.*

My mistake

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

1 hour ago, Animefan8888 said:

This is why your TE is not appearing, this method needs to have a IBlockState parameter.

1 hour ago, V0idWa1k3r said:

He is just using a deprecated version. Which is his issue as far as I can tell.

That worked like a charm, thanks for the help!

Edited by Lumby
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Sometimes, tweaking load order or specific configs can also help ease those conflicts.
    • I have recently tired downloading forge so i can run mods for hypixel skyblock but whenever i download forge and do it the same way as videos and tutorials forge keeps downloading as log file and doesnt download the .jar file any help will be aprecciated.
    • So I have created a Create Mod Server with my friends and i to play everyone can join play except one of my friends because when he tries to launch the game from the CurseForge Launcher it will load but never open or give him a crash report, we have tried everything from deleting CF and reinstalling it to Updating his drivers, IDK what to do if anyone can help I would be very Grateful
    • I get this error when trying to start the server for forged mods. In the code below it mentions distant horizons but no matter what mod I put in (deleting distant horizons) it still gives an error and doesn't launch Crash Report UUID: 3e91d5c7-18a7-43c2-a935-a8d28de560d1 FML: 47.3 Forge: net.minecraftforge:47.3.10[23:33:47] [main/ERROR] [minecraft/Main]: Failed to start the minecraft server net.minecraftforge.fml.LoadingFailedException: Loading errors encountered: [    Distant Horizons (distanthorizons) encountered an error during the sided_setup event phase§7java.lang.ExceptionInInitializerError: null]     at net.minecraftforge.fml.ModLoader.waitForTransition(ModLoader.java:246) ~[fmlcore-1.20.1-47.3.10.jar%23104!/:?] {}     at net.minecraftforge.fml.ModLoader.lambda$dispatchAndHandleError$20(ModLoader.java:210) ~[fmlcore-1.20.1-47.3.10.jar%23104!/:?] {}     at java.util.Optional.ifPresent(Optional.java:178) ~[?:?] {}     at net.minecraftforge.fml.ModLoader.dispatchAndHandleError(ModLoader.java:210) ~[fmlcore-1.20.1-47.3.10.jar%23104!/:?] {}     at net.minecraftforge.fml.ModLoader.lambda$loadMods$15(ModLoader.java:190) ~[fmlcore-1.20.1-47.3.10.jar%23104!/:?] {}     at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?] {}     at net.minecraftforge.fml.ModLoader.loadMods(ModLoader.java:190) ~[fmlcore-1.20.1-47.3.10.jar%23104!/:?] {}     at net.minecraft.server.loading.ServerModLoader.load(ServerModLoader.java:31) ~[forge-1.20.1-47.3.10-universal.jar%23108!/:?] {re:classloading}     at net.minecraft.server.Main.main(Main.java:125) ~[server-1.20.1-20230612.114412-srg.jar%23103!/:?] {re:classloading}     at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?] {}     at java.lang.reflect.Method.invoke(Method.java:580) ~[?:?] {}     at net.minecraftforge.fml.loading.targets.CommonLaunchHandler.runTarget(CommonLaunchHandler.java:111) ~[fmlloader-1.20.1-47.3.10.jar%2369!/:?] {}     at net.minecraftforge.fml.loading.targets.CommonLaunchHandler.lambda$run$1(CommonLaunchHandler.java:103) ~[fmlloader-1.20.1-47.3.10.jar%2369!/:?] {}     at net.minecraftforge.fml.loading.targets.CommonServerLaunchHandler.lambda$makeService$0(CommonServerLaunchHandler.java:27) ~[fmlloader-1.20.1-47.3.10.jar%2369!/:?] {}     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) ~[modlauncher-10.0.9.jar%2355!/:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) ~[modlauncher-10.0.9.jar%2355!/:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) ~[modlauncher-10.0.9.jar%2355!/:?] {}     at cpw.mods.modlauncher.Launcher.run(Launcher.java:108) ~[modlauncher-10.0.9.jar%2355!/:?] {}     at cpw.mods.modlauncher.Launcher.main(Launcher.java:78) ~[modlauncher-10.0.9.jar%2355!/:?] {}     at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) ~[bootstraplauncher-1.1.2.jar:?] {}  
    • This error keeps coming up after player tries to join server, doesn't happen to anyone else.  Error: Internal Exception: io.netty.handler.codec.DecoderException: java.lang.ArrayIndexOutOfBoundsException: Index 17196645 out of bounds for length 13 Heres the latest.log https://pastebin.com/uaw3KC0K  Heres the debug.log https://drive.google.com/file/d/1QzqtCMUf7ps1Iz85AOsMM7W8QhbHjBeU/view?usp=sharing
  • Topics

×
×
  • Create New...

Important Information

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