Jump to content

VoxelBuster

Members
  • Posts

    12
  • Joined

  • Last visited

Everything posted by VoxelBuster

  1. It appears that this is buggy behavior with when the world I was testing on crashed the game. Creating a new world seems to have resolved the problem.
  2. I created my own custom portal block that when the player collides with it, they are teleported to a (currently empty) dimension. The problem is that upon being teleported for the first time, a nether portal is created where the player spawns. I don't want to do this because I will be generating structures in that dimension later. How can I move dimensions, preferably to a specific position within said dimension, without creating a new portal? Current code: @Override public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entityIn) { if (entityIn instanceof EntityPlayer) { entityIn.changeDimension(WorldUtil.dim_outpost.getId()); } }
  3. Actually it was this code @Override public boolean isHighHumidity() { return true; } @Override public boolean canRain() { return false; } @Override public boolean isMutation() { return true; } @Override public List<SpawnListEntry> getSpawnableList(EnumCreatureType type) { switch (type) { case AMBIENT: return this.spawnableCreatureList; case WATER_CREATURE: return this.spawnableWaterCreatureList; case MONSTER: return this.spawnableMonsterList; case CREATURE: return this.spawnableCreatureList; } return null; } that was causing a problem. For whatever reason overriding these methods invalidate the biome (I guess?). As soon as I removed them it generated fine. Hm, this biome is pretty boring.
  4. I created a single custom biome for my mod but it doesnt seem to be generating at all. I have found no tutorials for this so I have been looking at other people's code on GitHub. Even setting the weight in the BiomeManager to 1000 does nothing. There are no errors in registration, it just doesn't generate. What am I doing wrong? WorldUtil.java (registration) package io.github.voxelbuster.sbmod.common.world; import io.github.voxelbuster.sbmod.common.StarboundMod; import net.minecraft.world.biome.Biome; import net.minecraft.world.biome.BiomeProvider; import net.minecraftforge.common.BiomeDictionary; import net.minecraftforge.common.BiomeManager; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.registries.IForgeRegistry; @Mod.EventBusSubscriber(modid = StarboundMod.MODID) public class WorldUtil { public static final BiomeAncientGarden ancientGarden = new BiomeAncientGarden(); @SubscribeEvent public static void registerBiomes(RegistryEvent.Register<Biome> event) { IForgeRegistry<Biome> registry = event.getRegistry(); registry.register(ancientGarden); BiomeDictionary.addTypes(ancientGarden, BiomeDictionary.Type.FOREST); BiomeManager.addBiome(BiomeManager.BiomeType.WARM, new BiomeManager.BiomeEntry(ancientGarden, 1000)); BiomeManager.addSpawnBiome(ancientGarden); BiomeProvider.allowedBiomes.add(ancientGarden); } } BiomeAncientGarden.java (biome) package io.github.voxelbuster.sbmod.common.world; import io.github.voxelbuster.sbmod.common.StarboundMod; import net.minecraft.entity.EnumCreatureType; import net.minecraft.init.Blocks; import net.minecraft.util.ResourceLocation; import net.minecraft.world.biome.Biome; import java.util.ArrayList; import java.util.List; public class BiomeAncientGarden extends Biome { ArrayList<SpawnListEntry> spawnableMonsterList = new ArrayList<>(); private static BiomeProperties properties = new Biome.BiomeProperties("ancientgarden"); static { properties.setBaseBiome("mutated_forest"); properties.setTemperature(0.7f); properties.setRainfall(0f); } public BiomeAncientGarden() { super(properties); this.setRegistryName(new ResourceLocation(StarboundMod.MODID, "ancientgarden")); decorator.treesPerChunk = 1; decorator.flowersPerChunk = 64; decorator.clayPerChunk = 0; decorator.sandPatchesPerChunk = 0; decorator.grassPerChunk = 64; decorator.reedsPerChunk = 2; this.topBlock = Blocks.GOLD_BLOCK.getDefaultState(); } @Override public boolean isHighHumidity() { return true; } @Override public boolean canRain() { return false; } @Override public boolean isMutation() { return true; } @Override public List<SpawnListEntry> getSpawnableList(EnumCreatureType type) { switch (type) { case AMBIENT: return this.spawnableCreatureList; case WATER_CREATURE: return this.spawnableWaterCreatureList; case MONSTER: return this.spawnableMonsterList; case CREATURE: return this.spawnableCreatureList; } return null; } }
  5. I created a GuiContainer and GuiProxy and registered the handler but still no dice.
  6. I created the Container class already and attached it to the TileEntity. What could I be missing on the Container? Updated GitHub.
  7. So its just displaying the legacy furnace GUI as a placeholder? I guess I misunderstand what that line of code does. Even though I specify the TileEntity in the code it still binds the wrong GUI?
  8. I am currently trying to create a higher tier furnace in my mod. I have created the block and given it a GUI, but it doesn't respond to anything. When I close the GUI or click on any items in the GUI it consumes them without smelting them regardless of if they are a valid recipe or not. I am pretty sure the recipes are not validating correctly because it shows an empty ItemStack as the result for my recipes in debug. My code is probably very unconventional as I've directly extended TileEntityFurnace and ContainerFurnace in my classes. I am new to modding and have not found any up to date tutorials that cover this topic. Live GitHub links to relevant code: https://github.com/VoxelBuster/StarboundMod/blob/master/forge-1.12-14.21.1.2387-mdk/src/main/java/io/github/voxelbuster/sbmod/common/item/crafting/IndustrialFurnaceRecipes.java https://github.com/VoxelBuster/StarboundMod/blob/master/forge-1.12-14.21.1.2387-mdk/src/main/java/io/github/voxelbuster/sbmod/common/inventory/ContainerIndustrialFurnace.java https://github.com/VoxelBuster/StarboundMod/blob/master/forge-1.12-14.21.1.2387-mdk/src/main/java/io/github/voxelbuster/sbmod/common/tileentity/IndustrialFurnaceTileEntity.java
×
×
  • Create New...

Important Information

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