RANKSHANK
Members-
Posts
305 -
Joined
-
Last visited
Everything posted by RANKSHANK
-
A difficult but superior solution would be hooking into the effects, rendering, and gui with ASM
-
build version of client & server? Any errors in the logs? Are the connecting client versions the same? mods installed? Any actual relevant information?
-
So it's either FML or my environment(jre 1.8.0_20), but I've gotten this error in both source(client) and client releases. It doesn't always happen, there are times when I can load the world. Client was installed with the launcher Developers(source) version was run with the 1009 build, can update if need be Client has had issues since initial install (build 1005) through to current build(1012). Have tried clean installs on both sides- No user mods included in the client build. Development environment has a core mod which does not have any effect on the issue. Error Log from client link edit: sorry copied the wrong link! should be fixed now
-
Built-in support for unique config files for each world
RANKSHANK replied to mm4cc's topic in Suggestions
Sounds like an issue for the mod author to take up. You know how annoying it would be to have to change the world options each time we make a new world if we don't want the feature? -
Menu compressed into the corner, EAQ fix not working.
RANKSHANK replied to Prime_Jetspace's topic in Support & Bug Reports
Have you tried working with a fresh install of forge? -
Well using some mystical skillset that seems to elude a good majority of the community, I isolated the problem line from your log and extrapolated. Your device failed to download the apache library... aka part of vanilla minecraft- not a part of forge- just try running it again or download the lib and manually install it.
-
[Gradle Wrapper] Argument to launch a test world.
RANKSHANK replied to Larandar's topic in Modder Support
Sounds suspiciously like running debug in eclipse and switching windows -
No this will in any given scenario make forge have greater impact on system resources. What you recommend would either require a look-up table to be stored on heat values like the light values, which requires additional RAM to store it and a faster clock rate to keep the ticks up to par for updating the tables. Thereby decreasing the accessibility of Forge. Or it'd be a parsing equation searching for heat sources which you may as well write your own since you'll have to call for it to be run anyways. Alternatively you could simply add a function into the block class such as public int getHeat(Object... params){ return 0; } Would be quite simple. But has absolutely no tie-ins to dispersion. Also would mean that you'd need to find a way to encourage modders to adopt and utilize a method that is not required. And even if you do manage to catch a few peoples' attention with the little added snippet, you then have to question how to make everyone conform to a scale? Enter the Celsius v Fahrenheit arguments? Confuse the masses with Kelvin? Arbitrary numbers? After all that dumbing down of a good idea for a system, you're left with another value like brightness that'll repeatedly get abused the handful of times it is used.... It does not really seem to me like a feasible addition for Forge unless integration by vanilla minecraft forces... ahem... adaptation. Not because it won't get used often, which it won't, but because integration would be a nightmare.
-
I'd be more worried about the extra CPU load... updating another source set would bring many computers to their knees... Maybe a heat mod/api is feasible but forcing it on the community by incorporating it with forge will just be damaging
-
Save up all your pennies and upgrade your PC. Try a SSD, maybe a better CPU, or maybe even higher latency RAM(the least likely)... Your system being slow isn't going to be a forge problem
-
Microsoft buys Mojang/Minecraft ... FAQ for Forge Team/LexManos
RANKSHANK replied to Aridhol's topic in General Discussion
Haha finally got around to building a computer more than capable of minecraft and then mozy on over to here to find this uproar. Life is a fickle thing But this leaves me wanting to ask a question- Is there any way we(modders) can help push forge development along? Seeing the team weakening(no offense, just an observation based on quantification not qualification) surely must mean that the community can give back to the people that have given so much. Does this mean open slots for forge development>? -
Teleporting a Player Within the same Dimension
RANKSHANK replied to Draco18s's topic in Modder Support
have you tried EntityPlayer.setPositionAndUpdate(); instead of setPosition(); -
Nothing seems to happen? try printing out in your getClientGuiElement() void and post the results. If it doesn't print you've either registered your handler incorrectly or the opening code isn't being run. Also switch cases do not need the brackets. That is an eyesore.
-
Why are you going to hurt the computer? It's a tool. It's like punching a hammer because you can't figure out how to make it pound a nail into a board. Jokes aside, you're looking at the wrong side of things. This is done with packets.... specifically the Packet14DigBlock.class packet which is then handled by the netserverhandler regardless of which side you are on. So it is always dealt with on the server side, be it dedicated or integrated, applied to the server world, and then sent as a packet for the actual update (block removal generally). If you want more deatil look into the NetServerHandler.class
-
I was going to submit a pull request, but my branch continually failed to download at around 70%. Basically a fake world that can be used for pre built world scenerios, ai, and the likes of that FakeWorld.class package net.minecraftforge.common; import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.logging.Logger; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EnumCreatureType; import net.minecraft.logging.ILogAgent; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.profiler.Profiler; import net.minecraft.util.ChunkCoordinates; import net.minecraft.util.IProgressUpdate; import net.minecraft.village.VillageCollection; import net.minecraft.world.ChunkPosition; import net.minecraft.world.EnumGameType; import net.minecraft.world.MinecraftException; import net.minecraft.world.World; import net.minecraft.world.WorldProvider; import net.minecraft.world.WorldSettings; import net.minecraft.world.WorldType; import net.minecraft.world.chunk.Chunk; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.chunk.storage.IChunkLoader; import net.minecraft.world.storage.IPlayerFileData; import net.minecraft.world.storage.ISaveHandler; import net.minecraft.world.storage.WorldInfo; /**Built to synthesize a running world for usage in test AI, external rendering, * and other scenarios which may occur before a loaded world is available, or where * utilization of a running world is undesirable*/ public class FakeWorld extends World{ private int[][][] idArray; private int[][][] metaArray; private int factor = 3; private boolean replace = false; private final List<Entity> spawnOrder = new ArrayList(5); private static final Profiler dummyProfiler = new Profiler(); private static final ILogAgent dummyLogger = new dudLog(); public FakeWorld(EnumGameType type) { super(new dudSave(), "pseudo", new dudProvider(), new WorldSettings(0, type, false, false, WorldType.DEFAULT), dummyProfiler, dummyLogger); this.setBlockArray(this.getDefaultIdArray()); this.chunkProvider = new dudCP(this); this.villageCollectionObj = new VillageCollection(this); this.provider.registerWorld(this); this.chunkProvider = this.createChunkProvider(); this.calculateInitialSkylight(); this.provider.calculateInitialWeather(); } private static final class dudProvider extends WorldProvider{ @Override public String getDimensionName() { return "pseudo"; } } private static final class dudSave implements ISaveHandler{ @Override public WorldInfo loadWorldInfo() {return null;} @Override public void checkSessionLock() throws MinecraftException {} @Override public IChunkLoader getChunkLoader(WorldProvider worldprovider) {return null;} @Override public void saveWorldInfoWithPlayer(WorldInfo worldinfo, NBTTagCompound nbttagcompound) {} @Override public void saveWorldInfo(WorldInfo worldinfo) {} @Override public IPlayerFileData getSaveHandler(){return null;} @Override public void flush() {} @Override public File getMapFileFromName(String s) {return null;} @Override public String getWorldDirectoryName() { return ""; } } private static final class dudLog implements ILogAgent{ @Override public void logInfo(String s) { } @Override @SideOnly(Side.SERVER) public Logger getServerLogger() { return FMLCommonHandler.instance().getFMLLogger(); } @Override public void logWarning(String s) { } @Override public void logWarningFormatted(String s, Object... var2) { } @Override public void logWarningException(String s, Throwable throwable) { } @Override public void logSevere(String s) { } @Override public void logSevereException(String s, Throwable throwable) { } @Override @SideOnly(Side.CLIENT) public void logFine(String s) { } } private static final class dudCP implements IChunkProvider{ private final FakeWorld theWorld; public dudCP(FakeWorld w){theWorld = w;} @Override public boolean chunkExists(int i, int j) { return true; } @Override public Chunk provideChunk(int i, int j) { return new Chunk(theWorld,0,0); } @Override public Chunk loadChunk(int i, int j) { return new Chunk(theWorld, 0, 0); } @Override public void populate(IChunkProvider ichunkprovider, int i, int j) {} @Override public boolean saveChunks(boolean flag, IProgressUpdate iprogressupdate) { return false; } @Override public boolean unloadQueuedChunks() { return true; } @Override public boolean canSave() { return false; } @Override public String makeString() { return "fake world"; } @Override public List getPossibleCreatures(EnumCreatureType enumcreaturetype, int i, int j, int k) { return null; } @Override public ChunkPosition findClosestStructure(World world, String s, int i, int j, int k) { return new ChunkPosition(0,0,0); } @Override public int getLoadedChunkCount() { return 1; } @Override public void recreateStructures(int i, int j) {} @Override public void func_104112_b() {} } //Fake World specific usage features /**returns the default array of a layer of air above a layer of grass * above a layer of dirt*/ public int[] getDefaultIdArray(){ int[] r = new int[27]; for(int i = 0; i < r.length; i++) if(i < 18) r[i] = 0; else if( i < 9) r[i] = Block.grass.blockID; else r[i] = Block.dirt.blockID; return r; } /**Builds layers (x & z) of the given int values. Can be used for block and meta array building*/ public int[] buildHorizontalLayers(int...i){ int[] builder = new int[(int) Math.pow(i.length, 3)]; int a = -1; for(int y: i) for(int z = 0; z < i.length; z++) for(int x = 0; x < i.length; x++) builder[a++] = i[y]; return builder; } /**sets whether or not external calls can replace the values in the meta and id arrays*/ public void setCanBlockValuesBeReplaced(boolean b){ replace = b; } /**Sets up a blockID array to return during World.getBlockId && World.getBlockMetadata via * Integer arrays. Integer array must be a cubic (^3) factor. the getBlock methods then return * a block/meta depending on relative position read in the array set up in Y,X,Z format. The * The arrays are checked to make sure the lengths are equivalent, the meta ids are not greater * than 15, the blocks are logical value, and the array is a round cubic factor * @param ids The block ID array * @param metas The block metadata array * */ public void setBlockArrays(int[] ids, int[] metas){ try{ if(ids.length != metas.length) throw new Throwable("Id and meta arrays must be equivalent in length"); for(int i = 0; i < ids.length; i++){ if(ids[i] < 0 || i >= Block.blocksList.length) throw new Throwable("All Id values must be within range of 0 to " + Block.blocksList.length); else if(metas[i] > 16 || i < 0) throw new Throwable("All meta values must be within the range of 0 to 15"); } double fact = Math.cbrt(ids.length); int a = this.factor; this.factor = (int)fact; if(fact != this.factor) if(fact != this.factor || this.factor == 0){ this.factor = a; throw new Throwable("Block Return arrays must be a round, cubic this.factor"); } int i = 0; this.idArray = new int[this.factor][this.factor][this.factor]; this.metaArray = new int[this.factor][this.factor][this.factor]; for(int x = 0; x < this.factor; x++) for(int z = 0; z < this.factor; z++) for(int y = 0; y < this.factor; y++){ this.idArray[x] [y] [z] = ids[i]; this.metaArray[x][y][z] = metas[i]; i++; } }catch(Throwable t){ t.printStackTrace(); } } /**Sets up a blockID array to return during World.getBlockId && World.getBlockMetadata * @param ids blockId array. the meta array will be built as an array of the same length * but with all metadata values at 0*/ public void setBlockArray(int[] ids){ int[] metas = new int[ids.length]; for(int i = 0; i < ids.length; i++) metas[0] = 0; this.setBlockArrays(ids, metas); } /**Empties the spawn order list*/ public void flushSpawnRetention(){ spawnOrder.clear(); } /**Retrieves the entity spawn order list, empties it*/ public List<Entity> getSpawnOrder(){ List l = spawnOrder; this.flushSpawnRetention(); return l; } /**Gets the latest spawned entity, Removes from spawn order, Be sure to catch null returns*/ public Entity getLastSpawned(){ Entity e = null; if(!spawnOrder.isEmpty()){ e = spawnOrder.get(0); spawnOrder.remove(0); } return e; } /*Begin pseudo world overrides*/ @Override public void tickBlocksAndAmbiance(){ for(int x = 0; x < this.factor; x++) for(int z = 0; z < this.factor; z++) for(int y = 0; y < this.factor; y++) Block.blocksList[this.idArray[y][x][z]].updateTick(this, x, y, z, this.rand); } @Override public boolean setBlock(int x, int y, int z, int id){ if(replace) this.idArray[y >= this.factor ? this.factor : y < 0 ? 0 : y][x % this.factor][z % this.factor] = id; return replace; } @Override public boolean setBlock(int x, int y, int z, int id, int meta, int flag){ if(replace){ this.idArray[y > this.factor ? this.factor : y < 0 ? 0 : y][x % this.factor][z % this.factor] = id; this.metaArray[y > this.factor ? this.factor : y < 0 ? 0 : y][x % this.factor][z % this.factor] = meta; } return replace; } @Override public boolean setBlockMetadataWithNotify(int x, int y, int z, int meta, int flag){ if(replace) this.metaArray[y > this.factor ? this.factor : y < 0 ? 0 : y][x % this.factor][z % this.factor] = meta; return replace; } @Override public void tick(){ this.tickBlocksAndAmbiance(); this.tickUpdates(true); this.updateWeather(); this.updateEntities(); } @Override public boolean setBlockToAir(int x, int y, int z){ if(replace) this.idArray[y > this.factor ? this.factor : y < 0 ? 0 : y][x % this.factor][z % this.factor] = 0; return replace; } @Override public boolean blockExists(int x, int y, int z){ return getBlockId(x,y,z) != 0; } @Override public int getBlockId(int x, int y, int z){ return this.idArray[y > this.factor ? this.factor : y < 0 ? 0 : y][x % this.factor][z % this.factor]; } @Override public int getBlockMetadata(int x, int y, int z){ return this.idArray[y > this.factor ? this.factor : y < 0 ? 0 : y][x % this.factor][z % this.factor]; } @Override protected IChunkProvider createChunkProvider() { return new dudCP(this); } @Override public Entity getEntityByID(int i) { for(Entity e : (List<Entity>)this.loadedEntityList) if(e.entityId == i) return e; return null; } @Override public boolean spawnEntityInWorld(Entity e){ this.spawnOrder.add(e); return super.spawnEntityInWorld(e); } @Override public ChunkCoordinates getSpawnPoint(){ return new ChunkCoordinates(0,0,0); } } FakeWorldFactory.class package net.minecraftforge.common; import net.minecraft.world.EnumGameType; /**Holds a constant fake world*/ public final class FakeWorldFactory { private static final FakeWorld instance = new FakeWorld(EnumGameType.SURVIVAL); private static final FakePlayer psuedo = new FakePlayer(instance, "Psuedo"); /**NOTE: Treat this world as a volatile platform. You should always update the Block array * as a precaution for array edits done by other mods * @return the constant {@link FakeWorld} value*/ public static FakeWorld getDefault(){ return instance; } /**This gives access to a world safe player instance. Safe for various edits and such * @return returns a constant {@link FakePlayer} which has a worldObj set to the constant FakeWorld*/ public static FakePlayer getPseudoPlayer(){ return psuedo; } }
- 1 reply
-
- 1
-
you have to extends the class and override the addInformation method. There is no clean way around this
-
you need to change public ItemStack onItemRightClick(ItemStack i, World w, EntityPlayer e, int x, int y, int z){ e.openGui(yourMod.instance, guiId, w, x, y, z) return i;//If you return null the itemstack is set to null } also hasEffect is spelled wrong... that'll give you some issues down the road. use @Override annotations to prevent this and make updating easier
-
you need to create a null check for the item stacks
-
Look at the forge wiki for gui handling, you need to return an instance of your gui in your IGuiHandler.getClientGuiElement()
-
You'll need to learn ASM, so yeah, hard
-
I dunno how the forge config works, but something like float red = (float)config.getDouble("red");
-
use a double and cast it to a float
-
Not possible; and you're better with a loop which is a bit process intensive if this is done often, or creating an array of possible values at the post init public static int[] possible; public void storage(){ public List<Integer> pV = new ArrayList(); for(Block b : Block.blockList) if(b!=null) pV.add(b.blockId); int a = -1; possible = new int[pV.size()]; for(int i : pV) possible[a++] = i; } and then select from that
-
I'm guessing (not enough code for any other guesses) that you didnt instantiate that random, or it could be that your random is pulling null blocks from the block list ...