Jump to content

CrashCZ

Members
  • Posts

    21
  • Joined

  • Last visited

Recent Profile Visitors

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

CrashCZ's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Thank you. Now I know
  2. Hello. I'v been curious what is the new ModLauncher thing. I see it everywhere but I can't find what it is. Examples:
  3. Hello. I have created a custom fluid that flow like water (7 blocks from source) but I need it to flow like lava (3 blocks from source). Is there any method to achieve this ? Because I wasn't able to find anything
  4. So waht's the correct syntax ?
  5. You mean this ? @Override public boolean shouldRefresh((World world, BlockPos pos, IBlockState oldState, IBlockState newSate) { if(oldState == newState) return true; else return false; }
  6. So what should I put in that method ?
  7. No it doesn't work until I restart the game
  8. Hello. I created a cutom furnace but there is a problem that when I pull items from output slot it stops smelting forever. Here is link to project on GitHub: https://github.com/nickname-crash/minerals I figured out that the method which get the output item after taking it out of the furnace starts to return air. This doesn't make any sense to me because it gets output items from final Table which is part of static final instance and there is no method that clears that Table. I would appriciate any help. There are also some other errors in the code but I will fix them later.
  9. When I place items and fuel in it, it takes them, changes the flame texture in gui but that's all. When I do it again it works how it should but only once and no more.
  10. OK I chnged it and now it does some weired stuff...
  11. Hello my custom furnace with two inputs does not smelt Here is link to GitHub: https://github.com/nickname-crash/minerals Please Help
  12. Yes, now it's working Thanks for help package com.crashcz.minerals.world; import java.util.Random; import com.crashcz.minerals.init.ModBlocks; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.IChunkGenerator; import net.minecraft.world.gen.feature.WorldGenMinable; import net.minecraftforge.fml.common.IWorldGenerator; public class ModWorldGen implements IWorldGenerator { @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) { if(world.provider.getDimension() == 0) { generateOverworld(random, chunkX, chunkZ, world, chunkGenerator, chunkProvider); } } private void generateOverworld(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) { generateOre(ModBlocks.RUBY_ORE.getDefaultState(), world, random, chunkX * 16, chunkZ *16, 5, 12, random.nextInt(6) + 1, 4); generateOre(Blocks.IRON_ORE.getDefaultState(), world, random, chunkX * 16, chunkZ * 16, 5, 12, random.nextInt(6) + 1, 4); } private void generateOre(IBlockState ore, World world, Random random, int x, int z, int minY, int maxY, int size, int chances) { int deltaY = maxY - minY; for(int i = 0; i < chances; i++) { BlockPos pos = new BlockPos(x + random.nextInt(16), minY + random.nextInt(deltaY), z + random.nextInt(16)); WorldGenMinable generator = new WorldGenMinable(ore, size); generator.generate(world, random, pos); } } } package com.crashcz.minerals.util.handlers; import com.crashcz.minerals.init.ModBlocks; import com.crashcz.minerals.init.ModItems; import com.crashcz.minerals.util.IHasModel; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraftforge.client.event.ModelRegistryEvent; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.event.terraingen.OreGenEvent; import net.minecraftforge.fml.common.Mod.EventBusSubscriber; import net.minecraftforge.fml.common.eventhandler.Event.Result; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; @EventBusSubscriber public class RegistryHandler { @SubscribeEvent public static void onItemRegister(RegistryEvent.Register<Item> event) { event.getRegistry().registerAll(ModItems.ITEMS.toArray(new Item[0])); } @SubscribeEvent public static void onBlockRegister(RegistryEvent.Register<Block> event) { event.getRegistry().registerAll(ModBlocks.BLOCKS.toArray(new Block[0])); } @SubscribeEvent public static void onModelRegister(ModelRegistryEvent event) { for(Item item : ModItems.ITEMS) { if(item instanceof IHasModel) { ((IHasModel)item).registerModels(); } } for(Block block : ModBlocks.BLOCKS) { if(block instanceof IHasModel) { ((IHasModel)block).registerModels(); } } } @SubscribeEvent public static void GenerateMinable(OreGenEvent event) { event.setResult(Result.DENY); } } @EventHandler public static void Init(FMLInitializationEvent event) { ModRecipes.init(); Blocks.IRON_ORE.setHarvestLevel("pickaxe", 3); MinecraftForge.ORE_GEN_BUS.register(RegistryHandler.class); GameRegistry.registerWorldGenerator(new ModWorldGen(), 3); }
  13. So like this ? @EventHandler public static void Init(FMLInitializationEvent event) { MinecraftForge.ORE_GEN_BUS.register(new RegistryHandler()); }
  14. Could you please show me how to do it ?
  15. What does it mean ?
×
×
  • Create New...

Important Information

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