Jump to content

thebest108

Members
  • Posts

    503
  • Joined

  • Last visited

Everything posted by thebest108

  1. So for my airship mod I want to add comprehensive controls so one can fly them realistically. I have all the feedback-loops and math worked out, I just need a way for the player to input flight information. That said, how can I add sliders and number boxes to a GUI? Also if possible is there a way I can program a custom virtual joystick using the mouse? (Shameless Mod Plug: ) EDIT: This GUI is for a TileEntity on the Airship, not the Airship entity itself
  2. Im confused about what this means though. Does this mean that I tried sending an IMessage larger than 1MB? I don't use packets so this error doesnt make sense to me
  3. Based on the log I can assume that this happened when one of my Ship entities loaded in the game. Of course though it doesn't tell me where the problem actually occurred >.< . Any ideas for how I can fix this? [16:44:43] [server thread/INFO] [FML]: Loading dimension 69 (BobVK) (net.minecraft.server.dedicated.DedicatedServer@79167c27) [16:44:45] [Netty Epoll Server IO #6/ERROR] [FML]: NetworkDispatcher exception java.lang.IllegalArgumentException: Payload may not be larger than 1048576 bytes > at net.minecraft.network.play.server.S3FPacketCustomPayload.<init>(S3FPacketCustomPayload.java:27) ~[gg.class:?] > at net.minecraftforge.fml.common.network.internal.FMLProxyPacket.toS3FPackets(FMLProxyPacket.java:136) ~[FMLProxyPacket.class:?] > at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.write(NetworkDispatcher.java:510) ~[NetworkDispatcher.class:?] > at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:658) ~[AbstractChannelHandlerContext.class:4.0.23.Final] > at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:716) ~[AbstractChannelHandlerContext.class:4.0.23.Final] > at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:706) ~[AbstractChannelHandlerContext.class:4.0.23.Final] > at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:741) ~[AbstractChannelHandlerContext.class:4.0.23.Final] > at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:895) ~[DefaultChannelPipeline.class:4.0.23.Final] > at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:240) ~[AbstractChannel.class:4.0.23.Final] > at net.minecraft.network.NetworkManager$4.run(NetworkManager.java:249) [ek$4.class:?] > at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:380) [singleThreadEventExecutor.class:4.0.23.Final] > at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:268) [EpollEventLoop.class:4.0.23.Final] > at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) [singleThreadEventExecutor$2.class:4.0.23.Final] > at java.lang.Thread.run(Thread.java:745) [?:1.8.0_77] [16:44:45] [Netty Epoll Server IO #7/ERROR] [FML]: NetworkDispatcher exception java.lang.IllegalArgumentException: Payload may not be larger than 1048576 bytes > at net.minecraft.network.play.server.S3FPacketCustomPayload.<init>(S3FPacketCustomPayload.java:27) ~[gg.class:?] > at net.minecraftforge.fml.common.network.internal.FMLProxyPacket.toS3FPackets(FMLProxyPacket.java:136) ~[FMLProxyPacket.class:?] > at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.write(NetworkDispatcher.java:510) ~[NetworkDispatcher.class:?] > at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:658) ~[AbstractChannelHandlerContext.class:4.0.23.Final] > at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:716) ~[AbstractChannelHandlerContext.class:4.0.23.Final] > at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:706) ~[AbstractChannelHandlerContext.class:4.0.23.Final] > at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:741) ~[AbstractChannelHandlerContext.class:4.0.23.Final] > at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:895) ~[DefaultChannelPipeline.class:4.0.23.Final] > at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:240) ~[AbstractChannel.class:4.0.23.Final] > at net.minecraft.network.NetworkManager$4.run(NetworkManager.java:249) [ek$4.class:?] > at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:380) [singleThreadEventExecutor.class:4.0.23.Final] > at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:268) [EpollEventLoop.class:4.0.23.Final] > at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) [singleThreadEventExecutor$2.class:4.0.23.Final] > at java.lang.Thread.run(Thread.java:745) [?:1.8.0_77] [16:44:46] [server thread/INFO]: Monkey1357 lost connection: TranslatableComponent{key='disconnect.genericReason', args=[internal Exception: java.lang.IllegalArgumentException: Payload may not be larger than 1048576 bytes], siblings=[], style=Style{hasParent=false, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}}
  4. How can I add custom text to the debug info screen?
  5. First off, all that needs to be in a if(!worldObj.isRemote) Second off, we're going to need a lot more code than that to help you. There's so many potential causes for something like that man, just post your source
  6. Thats not your model. In your block class override the isTransparent() methods and such; just look at blocks like brewing stands to see how they do it.
  7. Sounds amazing! Quick question though, how much time of work would you be expecting a programmer to put in?
  8. Damn,I'm really interested in knowing how each line of code affects the performance, and(until recently) I've been trying to figure this out by separating pieces of code into different methods. Is there a way for me to get an accurate line-by-line performance analysis of a method? I want this biker to be peddling as fast as possible before I move onto multi-threading.
  9. So for my Airship's/Physics engine mod I've been having issues with the performance. It's almost exclusively caused by collisions among different dimensions. (If you dont know what I mean, then this is what I mean) [embed=425,349]<iframe width="560" height="315" src="https://www.youtube.com/embed/WTWAMOpxVVY" frameborder="0" allowfullscreen></iframe>[/embed] In my attempts to get this working efficiently, I've spent the past few days profiling and fixing bottlenecks; but that all stopped today. I'm not sure whether the JVM hotspot finder is broken, or if I've hit a brick wall here because I have no idea how I'm supposed to handle this bottleneck! There's literally nothing I can do to make this bastard run any faster! (Code and profiling below) ShipOnWorldCollider.class /* Copyright (C) Alexander Mastrangelo, - All Rights Reserved * Unauthorized copying of this file, via any medium is strictly prohibited * Proprietary and confidential * Written by Alexander Mastrangelo */ package ValkyrianWarfare.Collision.Colliders; import java.util.ArrayList; import ValkyrianWarfare.ValkyrianWarfareMod; import ValkyrianWarfare.API.Vector; import ValkyrianWarfare.API.YVector; import ValkyrianWarfare.Collision.MovablePolygon; import ValkyrianWarfare.Collision.Polygon; import ValkyrianWarfare.Collision.ReusablePhysCollisionObject; import ValkyrianWarfare.Core.CallRunner; import ValkyrianWarfare.Entities.Ship; import ValkyrianWarfare.Math.BigBastardMath; import ValkyrianWarfare.Math.RotationMatrices; import ValkyrianWarfare.Physics.PhysicsController; import ValkyrianWarfare.Region.ShipRegionServer; import ValkyrianWarfare.Region.WorldUtils.RegionChunkProvider; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.BlockPos.MutableBlockPos; import net.minecraft.util.MathHelper; import net.minecraft.world.World; import net.minecraft.world.chunk.Chunk; /** * Used to detect collisions between the Ship and the World, and then apply a response * @author thebest108 * */ public final class ShipOnWorldCollider{ public final Ship ship; //Potential dark matter here? public final World worldCollidingWith; public boolean isColliding = false; public PhysicsController shipPhys; private static final Vector defaultAxis = new YVector(0,1D,0); private static final MutableBlockPos pos = new MutableBlockPos(); private static final AxisAlignedBB zeroAABB = new AxisAlignedBB(0,0,0,1D,1D,1D); private static final MovablePolygon zeroPoly = new MovablePolygon(zeroAABB); private static Chunk chunkForPos; private static final Chunk[][] cachedChunks = new Chunk[16][16]; private static IBlockState iblockstate; private static final ReusablePolygonCollider polyColReusable = new ReusablePolygonCollider(); private static final Polygon poly = new Polygon(zeroAABB); private static final Polygon inWorldPoly = new Polygon(zeroAABB); private static final Vector inBodyVector = new Vector(); private static final Vector responseVector = new Vector(); private static final Vector momentumAtPoint = new Vector(); private static final Vector simpleImpulse = new Vector(); private static final Vector firstCross = new Vector(); private static final Vector secondCross = new Vector(); private static final Vector rotationVec = new Vector(); private static double e = .3D,j; private double x,y,z; private static int mnX,mnY,mnZ,mxX,mxY,mxZ,k1,l1,i2,k1shit,l1shift; private static final ReusablePhysCollisionObject physCol = new ReusablePhysCollisionObject(); //New optimizations past here: private static final AxisAlignedBB originBB = new AxisAlignedBB(-.5D,-.5D,-.5D,.5D,.5D,.5D); private static final Polygon originPoly = new Polygon(originBB); private static final Vector polyOffsetVector = new Vector(); private static final Polygon p = new Polygon(zeroAABB); private static final Vector mixed = new Vector(); private final QuickCollider quickCols; private static AxisTest toUse; public final boolean useFastCalculations; private final Vector[] axes; private AxisAlignedBB aabb; public Chunk chunkIn; public boolean isSolid; final RegionChunkProvider provider; public ShipOnWorldCollider(){ quickCols = null; axes = null; ship = null; provider = null; worldCollidingWith = null; isColliding=true; useFastCalculations = true; } public ShipOnWorldCollider(Ship parent,World worldFor){ ship = parent; worldCollidingWith = worldFor; useFastCalculations = true; if(parent.doPhysics){ shipPhys = ((ShipRegionServer)ship.region).physController; axes = ship.getSeperatingAxesWithWorld(); provider = (RegionChunkProvider) ship.region.chunkProvider; if(useFastCalculations){ originPoly.setAABBAndMatrix(originBB, ship.rotationTransform); quickCols = new QuickCollider(p, originPoly, axes); }else{ quickCols = null; } }else{ axes = null; quickCols = null; provider = null; return; } if(shouldUpdateCollisionMap()){ updateCollisionMap(); }else{ ship.ticksSinceCollisionUpdate+=(20D*shipPhys.physicsSpeed); } if(ship.lastCollisionDataPoll.isEmpty()){ isColliding = false; return; } runExternalLoop(); } public final void runExternalLoop(){ for(AxisAlignedBB inWorld:ship.lastCollisionDataPoll){ if(!useFastCalculations){ inWorldPoly.setAABBCorners(inWorld); } aabb = inWorld; rotationVec.X=inWorld.minX+.5D; rotationVec.Y=inWorld.minY+.5D; rotationVec.Z=inWorld.minZ+.5D; RotationMatrices.applyTransform(ship.wToLTransform, rotationVec); mnX = MathHelper.floor_double(rotationVec.X-.8D); mxX = MathHelper.floor_double(rotationVec.X+1.8D); mnY = MathHelper.floor_double(rotationVec.Y-.8D); mxY = MathHelper.floor_double(rotationVec.Y+1.8D); mnZ = MathHelper.floor_double(rotationVec.Z-.8D); mxZ = MathHelper.floor_double(rotationVec.Z+1.8D); placeHolderBefore(); } } public final void placeHolderBefore(){ k1=mnX; placeHolder(); k1++; placeHolder(); k1++; placeHolder(); } public final void placeHolder(){ l1 = mnZ; smallerOne(); l1++; smallerOne(); l1++; smallerOne(); } public final void smallerOne(){ k1shit = k1>>4; l1shift = l1>>4; if(k1shit>-17&&k1shit<16&&l1shift>-17&&l1shift<16){ k1shit+=16; l1shift+=16; chunkIn = provider.chunksAtCoord[k1shit][l1shift]; if(chunkIn!=null){ i2 = mnY; runInternalLoop(); i2++; runInternalLoop(); i2++; runInternalLoop(); } } } public final void runInternalLoop(){ isSolid = CallRunner.isBlockSolid(chunkIn,k1, i2, l1); if(isSolid){ if(useFastCalculations){ runOptimizedCollision(); }else{ runAccurateCollision(); } } } public final void runOptimizedCollision(){ x = k1+.5D; y = i2+.5D; z = l1+.5D; polyOffsetVector.X = x * ship.lToWTransform[0] + y * ship.lToWTransform[1] + z * ship.lToWTransform[2] + ship.lToWTransform[3]-aabb.minX; polyOffsetVector.Y = x * ship.lToWTransform[4] + y * ship.lToWTransform[5] + z * ship.lToWTransform[6] + ship.lToWTransform[7]-aabb.minY; polyOffsetVector.Z = x * ship.lToWTransform[8] + y * ship.lToWTransform[9] + z * ship.lToWTransform[10] + ship.lToWTransform[11]-aabb.minZ; quickCols.processOffsetsSingle(polyOffsetVector); polyOffsetVector.X += aabb.minX; polyOffsetVector.Y += aabb.minY; polyOffsetVector.Z += aabb.minZ; if(!quickCols.isSeperated){ toUse = quickCols.axisTests[1]; //Reusing X here x = toUse.penetrationDis; if(x>.3D||x<-.3D){ toUse = quickCols.returnBestAxis(); } toUse.setResponse(responseVector); polyOffsetVector.add(originPoly.vertices[toUse.lastContact]); BigBastardMath.setInBodyWOFromInWorld(polyOffsetVector, shipPhys.centerOfMass, ship.rotationTransform, ship.wToLTransform,inBodyVector); shipPhys.setVectorMomentumAtPoint(inBodyVector, momentumAtPoint); handleCollision(inBodyVector,momentumAtPoint,responseVector,toUse.axis); } } public final void runAccurateCollision(){ pos.set(k1, i2, l1); iblockstate = CallRunner.getStateQuik(chunkIn,k1, i2, l1); aabb = iblockstate.getBlock().getCollisionBoundingBox(ship.region, pos, iblockstate); if(aabb!=null){ poly.setAABBAndMatrix(aabb, ship.lToWTransform); polyColReusable.processData(inWorldPoly,poly,axes); if(!polyColReusable.seperated){ physCol.generateCollision(poly, inWorldPoly, defaultAxis); if(!physCol.seperated){ physCol.setResponse(responseVector); BigBastardMath.setInBodyWOFromInWorld(physCol.firstContactPoint, shipPhys.centerOfMass, ship.rotationTransform, ship.wToLTransform,inBodyVector); shipPhys.setVectorMomentumAtPoint(inBodyVector, momentumAtPoint); handleCollision(inBodyVector,momentumAtPoint,responseVector,physCol.axis); } } } } public final boolean handleCollision(Vector inBodyWO,Vector velocityAtPoint,Vector offset,Vector axis){ j = -(e+1D)*velocityAtPoint.dot(axis); firstCross.setCross(inBodyWO, axis); RotationMatrices.applyTransform3by3(shipPhys.invMoITensor, firstCross); secondCross.setCross(firstCross, inBodyWO); j = j/((1D/shipPhys.mass)+secondCross.dot(axis)); simpleImpulse.X = axis.X*j; simpleImpulse.Y = axis.Y*j; simpleImpulse.Z = axis.Z*j; if(simpleImpulse.dot(offset)<0){ shipPhys.linearMomentum.add(simpleImpulse); firstCross.setCross(inBodyWO,simpleImpulse); RotationMatrices.applyTransform3by3(shipPhys.invMoITensor,firstCross); shipPhys.angularVelocity.add(firstCross); return true; } return false; } public void handleFriction(Vector inBodyWO,Vector velocityAtPoint,Vector axis,AxisAlignedBB inWorldBB){ double llamda = .16D; double dot = velocityAtPoint.dot(axis); Vector frictionVec = new Vector(velocityAtPoint); frictionVec.X-=(dot*axis.X); frictionVec.Y-=(dot*axis.Y); frictionVec.Z-=(dot*axis.Z); // frictionVec.multiply(llamda); // double minMagnitude = .025D; double moddedLlamda = Math.pow(llamda,shipPhys.physicsSpeed*ValkyrianWarfareMod.serverShipManager.getIterationsForWorld(ship.worldObj)/ValkyrianWarfareMod.serverShipManager.getSpeedForWorld(ship.worldObj)); // if(frictionVec.lengthSq()<Math.pow(minMagnitude,shipPhys.physicsSpeed*ValkyrianWarfareMod.serverShipManager.getIterationsForWorld(ship.worldObj)/ValkyrianWarfareMod.serverShipManager.getSpeedForWorld(ship.worldObj))){ // moddedLlamda = 1D; // } frictionVec.multiply(-moddedLlamda); shipPhys.linearMomentum.add(frictionVec); shipPhys.angularVelocity.add(RotationMatrices.get3by3TransformedVec(shipPhys.invMoITensor, inBodyWO.cross(frictionVec))); } public final void updateCollisionMap(){ ship.lastCollisionPollAABB = ship.getEntityBoundingBox().expand(1D, 1D, 1D); ship.lastCollisionDataPoll = getCollidingWorldBBs(worldCollidingWith,ship.lastCollisionPollAABB); // BigBastardMath.mergeAABBList(ship.lastCollisionDataPoll); // ship.lastCollisionDataPoll.trimToSize(); ship.ticksSinceCollisionUpdate = 0D; } public final boolean shouldUpdateCollisionMap(){ if(ship.ticksSinceCollisionUpdate>1.25D||ship.lastCollisionDataPoll == null){ return true; } return false; } public final static ArrayList<AxisAlignedBB> getCollidingWorldBBs(World world,AxisAlignedBB bb){ ArrayList arraylist = new ArrayList<AxisAlignedBB>((int) Math.ceil((bb.maxX-bb.minX)*(bb.maxY-bb.minY)*(bb.maxZ-bb.minZ)*1.2D)); int mnX = MathHelper.floor_double(bb.minX); int mxX = MathHelper.floor_double(bb.maxX + 1.0D); int mnY = MathHelper.floor_double(bb.minY); int mxY = MathHelper.floor_double(bb.maxY + 1.0D); int mnZ = MathHelper.floor_double(bb.minZ); int mxZ = MathHelper.floor_double(bb.maxZ + 1.0D); int minChunkX = mnX >> 4; int minChunkZ = mnZ >> 4; int maxChunkX = mxX >> 4; int maxChunkZ = mxZ >> 4; for(int x = minChunkX;x <= maxChunkX;x++){ for(int z = minChunkZ;z <= maxChunkZ;z++){ cachedChunks[x-minChunkX][z-minChunkZ] = world.getChunkFromChunkCoords(x, z); } } for(int k1 = mnX; k1 < mxX; ++k1){ for(int l1 = mnZ; l1 < mxZ; ++l1){ chunkForPos = cachedChunks[(k1>>4)-minChunkX][(l1>>4)-minChunkZ]; if(!chunkForPos.isEmpty()){ for (int i2 = mnY - 1; i2 < mxY; ++i2){ pos.set(k1, i2, l1); iblockstate = chunkForPos.getBlockState(pos); if(iblockstate.getBlock()!=Blocks.air){ iblockstate.getBlock().addCollisionBoxesToList(world, pos, iblockstate, bb, arraylist, null); } } } } } arraylist.trimToSize(); return arraylist; } } After a bit of simple profiling I came out with this You'll notice that the PlaceHolder() method with an 80% self time is made up this complicated set public final void placeHolder(){ l1 = mnZ; smallerOne(); l1++; smallerOne(); l1++; smallerOne(); } The fact that 3 invocations and additions can have a self-time of 80% compared to everything else appalls me. I'm asking what the hell is this? Is it a bug with the profiler, is the structure of the methods bad, or are these invocations truly the most complicated things in the code?
  10. Alright, so I got the models loading and rendering, but the problem is the texture is missing. I can apply any texture I want using renderManager.renderEngine.bindTexture(location); but I want it to use the texture described in the .json . Here's the relevant code: Model Baking Code: IModel cannonBase = event.modelLoader.getModel(RenderCannon.cannonBase); Function<ResourceLocation, TextureAtlasSprite> textureGetter = new Function<ResourceLocation, TextureAtlasSprite>(){ public TextureAtlasSprite apply(ResourceLocation location){ return Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(location.toString()); } } RenderCannon.cannonBaseBaked = cannonBase.bake(cannonBase.getDefaultState(), DefaultVertexFormats.BLOCK, textureGetter); Render Code: BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher(); IBakedModel ibakedmodel = cannonBaseBaked; renderManager.renderEngine.bindTexture(TextureMap.locationBlocksTexture); blockrendererdispatcher.getBlockModelRenderer().renderModelBrightnessColor(ibakedmodel, 1.0F, 1.0F, 1.0F, 1.0F); And the .json model, textures and all of it: { "__comment": "Cannon model - bracket only (for animation)", "textures": { "particle": "blocks/Rusty shaft", "0": "blocks/wood_spruce", "1": "blocks/Rusty shaft", "2": "blocks/Other metal thing" }, "elements": [ { "name": "Bracket base", "from": [ 4.0, 1.0, 4.0 ], "to": [ 12.0, 2.0, 12.0 ], "faces": { "north": { "texture": "#0", "uv": [ 0.0, 0.0, 8.0, 1.0 ] }, "east": { "texture": "#0", "uv": [ 0.0, 0.0, 8.0, 1.0 ] }, "south": { "texture": "#0", "uv": [ 0.0, 0.0, 8.0, 1.0 ] }, "west": { "texture": "#0", "uv": [ 0.0, 0.0, 8.0, 1.0 ] }, "up": { "texture": "#0", "uv": [ 0.0, 0.0, 8.0, 8.0 ] }, "down": { "texture": "#0", "uv": [ 0.0, 0.0, 8.0, 8.0 ] } } }, { "name": "Bracket left bottom", "from": [ 4.0, 2.0, 4.0 ], "to": [ 5.0, 5.0, 12.0 ], "faces": { "north": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 3.0 ] }, "east": { "texture": "#0", "uv": [ 0.0, 13.0, 8.0, 16.0 ] }, "south": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 3.0 ] }, "west": { "texture": "#0", "uv": [ 0.0, 13.0, 8.0, 16.0 ] }, "up": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 8.0 ] }, "down": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 8.0 ] } } }, { "name": "Bracket right bottom", "from": [ 11.0, 2.0, 4.0 ], "to": [ 12.0, 5.0, 12.0 ], "faces": { "north": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 3.0 ] }, "east": { "texture": "#0", "uv": [ 0.0, 13.0, 8.0, 16.0 ] }, "south": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 3.0 ] }, "west": { "texture": "#0", "uv": [ 0.0, 13.0, 8.0, 16.0 ] }, "up": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 8.0 ] }, "down": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 8.0 ] } } }, { "name": "Bracket left middle", "from": [ 4.0, 5.0, 5.0 ], "to": [ 5.0, 7.0, 11.0 ], "faces": { "north": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 2.0 ] }, "east": { "texture": "#0", "uv": [ 0.0, 11.0, 6.0, 13.0 ] }, "south": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 2.0 ] }, "west": { "texture": "#0", "uv": [ 0.0, 11.0, 6.0, 13.0 ] }, "up": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 6.0 ] }, "down": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 6.0 ] } } }, { "name": "Bracket right middle", "from": [ 11.0, 5.0, 5.0 ], "to": [ 12.0, 7.0, 11.0 ], "faces": { "north": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 2.0 ] }, "east": { "texture": "#0", "uv": [ 0.0, 11.0, 6.0, 13.0 ] }, "south": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 2.0 ] }, "west": { "texture": "#0", "uv": [ 0.0, 11.0, 6.0, 13.0 ] }, "up": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 6.0 ] }, "down": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 6.0 ] } } }, { "name": "Bracket left top", "from": [ 4.0, 7.0, 6.0 ], "to": [ 5.0, 8.0, 10.0 ], "faces": { "north": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }, "east": { "texture": "#0", "uv": [ 0.0, 10.0, 4.0, 11.0 ] }, "south": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }, "west": { "texture": "#0", "uv": [ 0.0, 10.0, 4.0, 11.0 ] }, "up": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 4.0 ] }, "down": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 4.0 ] } } }, { "name": "Bracket right top", "from": [ 11.0, 7.0, 6.0 ], "to": [ 12.0, 8.0, 10.0 ], "faces": { "north": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }, "east": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 1.0 ] }, "south": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }, "west": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 1.0 ] }, "up": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 4.0 ] }, "down": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 4.0 ] } } } ] }
  11. BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher(); IBakedModel ibakedmodel = blockrendererdispatcher.getModelFromBlockState(iblockstate, world, (BlockPos)null); blockrendererdispatcher.getBlockModelRenderer().renderModel(world, ibakedmodel, iblockstate, blockpos, worldrenderer, false); RenderFallingBlock requires for the model to already be on a block though. Making a new block for each piece of the model is an organization nightmare D: I'm assuming that I can bypass most of the block requirements, but how do I get an IBakedModel from the .json?
  12. Crap, one of my friends made an entity model for me using .json, does this mean I just can't use it? It'd really bum him out if I couldn't put it in the game
  13. Wait so it says that I need to include the original license in my project, but how does that work? Wouldn't that mean that my software would be under the same license at the library?
  14. So I want to include a library for faster math operations because one of my functions is pure math functions and takes about 3% of all tick time at this point. Anyway, the library is this https://sourceforge.net/projects/jafama/ Im just curious about the licensing of this, could I just add this to my mod and not change anything? Or would I need some disclaimer or license leading back to the library?
  15. What's the point of setupDevSpace anyway?! It's completely useless unless you want to save a bit of time when decompiling.
  16. Old Videos: Old Physics Demo: [embed=425,349]<iframe width="560" height="315" src="https://www.youtube.com/embed/r2b86Wv3HeY" frameborder="0" allowfullscreen></iframe>[/embed] Old Old World Demo: [embed=425,349]<iframe width="560" height="315" src="https://www.youtube.com/embed/hOn9rJdTnKg" frameborder="0" allowfullscreen></iframe>[/embed]
  17. So I'm separating the custom collision system from my mod so I can integrate it into other mods, but I'm having an issue with getting it to build separately and such. The idea is that each mod will come with a copy of the custom collision, and using the library system only 1 version will load and all involved mods will run through that. Things get more complicated though because this library mod needs ASM (Invokestatic Override on moveEntity() and onUpdate(), so only 1 instance can be loaded), and needs to poll data from other mods somehow as well. On top of that, I want to keep it in the same development workspace as the mods that use it, yet still compile correctly with the build.gradle file. I need to define attributes like FMLCorePlugin "Location of Plugin" and FMLCorePluginContainsFMLMod, but these seem to apply to every file in the project, not to specific packages. Anyway how can I structure such a library mod to accomplish all of this?
  18. So I want to make my custom collision system into it's own library that would allow anyone to add non Axis-Aligned shapes into Minecraft. Ideally, I'd want it to work the way adding a library works because if 2 mods add the same library it only loads 1 instance of that library. This custom collision mod/library needs ASM to work though, so would it even run if I tried making it into a library?
  19. Of course, I just record the system time the last time i ran the tick, and subtract the current time. Better than rummaging through MC code anyway.
  20. So I added a variable timestep to my physics simulation, and I want to make the speed things move independent of server lag by changing the speed from 1/20 to how many ticks happened in the last second. Where does Minecraft keep these things?
  21. Wow nobody answered the original question >.< You probably forgot to do "gradlew eclipse" which updates the code eclipse sees.
  22. So I have a class that extends the PlayerControllerMP class, and one of the methods I'm trying to replace is clickBlockCreative(). Am I going crazy or is this a bug!? In the PlayerControllerMP class public static void clickBlockCreative(Minecraft mcIn, PlayerControllerMP p_178891_1_, BlockPos p_178891_2_, EnumFacing p_178891_3_) { if (!mcIn.theWorld.extinguishFire(mcIn.thePlayer, p_178891_2_, p_178891_3_)) { p_178891_1_.onPlayerDestroyBlock(p_178891_2_, p_178891_3_); } } In my class @Override public static void clickBlockCreative(Minecraft mcIn, PlayerControllerMP p_178891_1_, BlockPos p_178891_2_, EnumFacing p_178891_3_){ World worldIn = Minecraft.getMinecraft().theWorld; int shipHit = ValkyrianWarfareMod.clientShipManager.getShipHitTick(); if(shipHit!=0){ worldIn = ((Ship)mcIn.theWorld.getEntityByID(shipHit)).region; p_178891_2_ = ValkyrianWarfareMod.clientShipManager.hitPos; } if (!worldIn.extinguishFire(mcIn.thePlayer, p_178891_2_, p_178891_3_)){ p_178891_1_.onPlayerDestroyBlock(p_178891_2_, p_178891_3_); } } Eclipse spits out an error and it crashes the game. "The method clickBlockCreative(Minecraft, PlayerControllerMP, BlockPos, EnumFacing) of type CustomPlayerController must override or implement a supertype method"
×
×
  • Create New...

Important Information

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