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

Arealcoder

Members
  • Posts

    10
  • Joined

  • Last visited

Recent Profile Visitors

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

Arealcoder's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I wanted to make a mod that can update maps automatically. I looked up the nbt data of maps and discovered how to edit them. But I still don't know how to update them. Do I have to do that I check the highest block for each map pixel to update it or is there another way. You don't have to show me how to do it automatically, I just want to know how to do it once. I can make the auto part myself.
  2. I only need the spawning item part. I just use it for context.
  3. im not talking about spawning mods items. I want to make a mod that spawns a item. I'm making a block that mines blocks but right now you cant get the blocks it has ben mined I could use invtorys but I want to be simple so I want to spawn items on top of the block instead.
  4. I think I fixed it, but I still get a error. public static final RegistryObject<TileEntityType<BlockMinerTile>> BLOCK_MINER_TILE = TILE_ENTITY_TYPES.register("quarry", TileEntityType.Builder.create(BlockMinerTile::new, RegistryHandler.BlOCK_MINER.get()).build(null)); ^ required: String,Supplier<? extends I> found: String,TileEntityType<BlockMinerTile> reason: cannot infer type-variable(s) I (argument mismatch; TileEntityType<BlockMinerTile> cannot be converted to Supplier<? extends I>) where I,T are type-variables: I extends TileEntityType<?> declared in method <I>register(String,Supplier<? extends I>) T extends IForgeRegistryEntry<T> declared in class DeferredRegister I know I have to change the null because when I remove it, it says this. public static final RegistryObject<TileEntityType<BlockMinerTile>> BLOCK_MINER_TILE = TILE_ENTITY_TYPES.register("quarry", TileEntityType.Builder.create(BlockMinerTile::new, RegistryHandler.BlOCK_MINER.get()).build()); ^ required: Type<?> found: no arguments reason: actual and formal argument lists differ in length where T is a type-variable: T extends TileEntity declared in class Builder I'm guessing I have to put a type in there
  5. What I mean is what do I put? Do I put the name of the block, The name of the code of the block? That is what i am asking
  6. Hello! I'm right now trying to see how you use tile entities. But then, I got this error. error: method create in class Builder<T#2> cannot be applied to given types; public static final RegistryObject<TileEntityType<BlockMinerTile>> BLOCK_MINER_TILE = TILE_ENTITY_TYPES.register("quarry", TileEntityType.Builder.create(BlockMinerTile::new, RegistryHandler.BlOCK_MINER).build()); ^ required: Supplier<? extends T#1>,Block[] found: BlockMinerTile::new,RegistryObject<Block> reason: cannot infer type-variable(s) T#1 (varargs mismatch; RegistryObject<Block> cannot be converted to Block) where T#1,T#2 are type-variables: T#1 extends TileEntity declared in method <T#1>create(Supplier<? extends T#1>,Block...) T#2 extends TileEntity declared in class Builder Here is the code where the error is. package com.example.examplemod.tile; import com.example.examplemod.ExampleMod; import com.example.examplemod.util.RegistryHandler; import net.minecraft.tileentity.TileEntityType; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.RegistryObject; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; public class ModTileEntityTypes { public static final DeferredRegister<TileEntityType<?>> TILE_ENTITY_TYPES = new DeferredRegister<>(ForgeRegistries.TILE_ENTITIES, ExampleMod.MOD_ID); public static final RegistryObject<TileEntityType<BlockMinerTile>> BLOCK_MINER_TILE = TILE_ENTITY_TYPES.register("quarry", TileEntityType.Builder.create(BlockMinerTile::new, RegistryHandler.BlOCK_MINER).build(null)); } Also, here's the code of the BlockMinerTile. import net.minecraft.block.BlockState; import net.minecraft.entity.Entity; import net.minecraft.fluid.IFluidState; import net.minecraft.item.ItemStack; import net.minecraft.nbt.CompoundNBT; import net.minecraft.tileentity.ITickableTileEntity; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityType; import net.minecraft.util.math.BlockPos; public class BlockMinerTile extends TileEntity implements ITickableTileEntity { public BlockMinerTile(final TileEntityType<?> tileEntityTypeIn) { super(tileEntityTypeIn); } public BlockMinerTile() { super(ModTileEntityTypes.BLOCK_MINER_TILE.get()); } @Override public void tick() { } } That's All. Ask me if you need more information.
  7. Im ben making my own mod and a want to know how to make tile entitys. I know what tile entitys are, but dont know how to make them. I tryed to follow a vidio on how to make tile entiys, but I then got errors for some resaon that I do not know. Sorry for bad spelling.
  8. I just want to know how to use the onBlockActivated Thats it.
×
×
  • Create New...

Important Information

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