Everything posted by bastetfurry
-
[1.8] Unknown net.minecraftforge.common.chunkio.QueuedChunk
I am only adding a 1x2x1 structure that should not get out of a chunk. And unless Minecraft decides it would be a great idea to place a Plains biome at around 255 i am save in height also. So there might be some other problem i am not getting there, maybe on my side, maybe on Forges side. But for now i think it has something to do with Forge for 1.8 being beta, so i hope that gets fixed eventually. The dream solution would be a convenience function that you can fill with (simple) structures, the biomes to place them in and the chance of them getting placed. BTW: If i plan on doing bigger structures i would have a look at that Roguelike Dungeons plugin first to look how its solved there. No copy and paste, thats just wrong, but to get the idea you can steal with the eyes. Something along the lines of not reinventing the wheel and such.
-
[1.8] Unknown net.minecraftforge.common.chunkio.QueuedChunk
Maybe i am just doing it wrong, but the following code produces "Unknown net.minecraftforge.common.chunkio.QueuedChunk". Additionally to that i had to, somewhat ugly, prevent an "Already decorating" exception caused by the call of "tp = world.getTopSolidOrLiquidBlock(tp);". @SubscribeEvent(priority=EventPriority.LOWEST) public void onWorldDecoration(DecorateBiomeEvent.Decorate event) { Logger log = FMLLog.getLogger(); try { int startx = event.pos.getX(); int startz = event.pos.getZ(); World world = event.world; for(int x=startx;x<startx+16;x++) for(int z=startz;z<startz+16;z++) { BlockPos tp = new BlockPos(x,0,z); BiomeGenBase tb = world.getBiomeGenForCoords(tp); //log.info("Biome: " + tb.biomeName); if(tb == tb.plains) { //log.info("Plains biome..."); ////// This can, for whatever reason, cause an exception tp = world.getTopSolidOrLiquidBlock(tp); ////// This can, for whatever reason, cause an exception tp = tp.down(); //log.info(tp.getX() +","+ tp.getY()+","+ tp.getZ() + ":" + world.getBlockState(tp).getBlock().getUnlocalizedName()); if(world.getBlockState(tp).getBlock() == Blocks.grass) { //log.info("And a grass block!"); Random rand = event.world.rand; if(rand.nextInt(1000) < 1) { log.info("Planted at " + tp.getX() +","+ tp.getY()+","+ tp.getZ()); world.setBlockState(tp, Blocks.farmland.getDefaultState()); tp = tp.up(); world.setBlockState(tp, Blocks.wheat.getDefaultState()); } } } } } catch (Exception e) { log.warn("Ignoring an Already decorating exception..."); } } The actual error that brought me here: [02:52:42] [server thread/INFO] [FML]: Unknown net.minecraftforge.common.chunkio.QueuedChunk { x: -58 z: 20 loader: null world: New World dimension: 0 provider: net.minecraft.world.WorldProviderSurface } [02:52:42] [server thread/INFO] [FML]: This should not happen. Please report this error to Forge. Using: MCP v9.10 FML v8.0.14.1281 Forge 11.14.0.1281 Started unobfuscated as debug out of Eclipse. Java version: java version "1.7.0_65" OpenJDK Runtime Environment (IcedTea 2.5.3) (7u71-2.5.3-0ubuntu0.12.04.1) OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode) EDIT: I tested the code under "extreme" conditions with a flat world with just the plains biome. BTW: Kinda works and does what it should, but i would love a better way of adding natural wheat plants to plain biomes, this method feels clunky and much like doing it in the old hMod-Style of ways.
-
[SOLVED][1.8]LivingSpawnEvent.SpecialSpawn not firing or i am missing something
Yup, that helped, thanks. Anything else that could pose a trap when coming from other Minecraft modding APIs?
-
[SOLVED][1.8]LivingSpawnEvent.SpecialSpawn not firing or i am missing something
Good morning Forum Using the latest (8.0.12.1255 as of writing this) Forge for 1.8 i try to use LivingSpawnEvent.SpecialSpawn and its parent LivingSpawnEvent. The parent gets called perfectly, but i expected the child to fire first, which it doesn't. In fact it isn't fired at all. The test setup is that LivingSpawnEvent prevents all mob spawning in an area around spawn, which works for natural spawning. The problems: - Eggs spawn mobs, which interestingly is not registered by LivingSpawnEvent or PlayerUseItemEvent.Start. - Mob spawners spawn their mobs, which should have been caught by LivingSpawnEvent.SpecialSpawn according to the documentation. (shortend) Code example of what i am doing here: public class onMobSpawn { @SubscribeEvent(priority=EventPriority.HIGH) @SideOnly(Side.SERVER) public void spawnEvent(LivingSpawnEvent event) { Entity mob = event.entity; if(mob instanceof EntityAmbientCreature) { if(mob instanceof EntityBat) { if(laCheck.noBatsFlag(mob.posX, mob.posY, mob.posZ,helper.getFullWorldName(mob.getEntityWorld()))) { event.isCanceled(); return; } } } if(mob instanceof EntityMob) { if(laCheck.monsterFlag(mob.posX, mob.posY, mob.posZ, helper.getFullWorldName(mob.getEntityWorld()))) { event.isCanceled(); return; } } } } public class onMobSpawnSpecial { @SubscribeEvent(priority=EventPriority.HIGHEST) @SideOnly(Side.SERVER) public void spawnEventSpecial(LivingSpawnEvent.SpecialSpawn event) { Entity mob = event.entity; Logger log = FMLLog.getLogger(); log.info("DEBUG: mob.getName() == '" + mob.getName() + "'"); } } //In my init class @EventHandler public void init(FMLInitializationEvent event) { MinecraftForge.EVENT_BUS.register(new onMobSpawn()); MinecraftForge.EVENT_BUS.register(new onMobSpawnSpecial()); } So what could be my mistake here. Maybe i am misinterpreting the documentation somewhere and a nudge in the right direction would be helpful. My Minecraft coding background is hMod/Canary Classic, if that helps.
IPS spam blocked by CleanTalk.