Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

thebest108

Members
  • Posts

    503
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Location
    SOS
  • Personal Text
    No, I'm the stupid one

Recent Profile Visitors

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

thebest108's Achievements

Dragon Slayer

Dragon Slayer (6/8)

0

Reputation

  1. Here's the log, am I missing something with my method visitors or something? I have no idea where to start with this ---- Minecraft Crash Report ---- WARNING: coremods are present: LoadingPlugin (RandomThings-MC1.10-3.7.4.jar) LoadingHook (Mekanism-1.10.2-9.1.0.288.jar) ValkyrienWarfareBase CoreMod (Valkyrien Warfare .7s_4.jar) FMLPlugin (InventoryTweaks-1.61-58.jar) ValkyrienWarfareBase Mod Compatibility Hack (VW Mod Compatibility Hack.jar) Contact their authors BEFORE contacting forge // But it works on my machine. Time: 8/8/16 3:52 PM Description: There was a severe problem during mod loading that has caused the game to fail net.minecraftforge.fml.common.LoaderException: java.lang.VerifyError: Operand stack overflow Exception Details: Location: vazkii/psi/common/item/ItemCAD.lambda$addInformation$0(Lnet/minecraft/item/ItemStack;Ljava/util/List;)V @0: aload_1 Reason: Exceeded max stack size. Current Frame: bci: @0 flags: { } locals: { 'vazkii/psi/common/item/ItemCAD', 'net/minecraft/item/ItemStack', 'java/util/List' } stack: { } Bytecode: 0x0000000: 2b13 0368 at net.minecraftforge.fml.common.LoadController.transition(LoadController.java:186) at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:610) at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:255) at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:439) at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:351) at net.minecraft.client.main.Main.main(SourceFile:124) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) Caused by: java.lang.VerifyError: Operand stack overflow Exception Details: Location: vazkii/psi/common/item/ItemCAD.lambda$addInformation$0(Lnet/minecraft/item/ItemStack;Ljava/util/List;)V @0: aload_1 Reason: Exceeded max stack size. Current Frame: bci: @0 flags: { } locals: { 'vazkii/psi/common/item/ItemCAD', 'net/minecraft/item/ItemStack', 'java/util/List' } stack: { } Bytecode: 0x0000000: 2b13 0368 at vazkii.psi.common.item.base.ModItems.init(ModItems.java:80) at vazkii.psi.common.core.proxy.CommonProxy.preInit(CommonProxy.java:43) at vazkii.psi.client.core.proxy.ClientProxy.preInit(ClientProxy.java:50) at vazkii.psi.common.Psi.preInit(Psi.java:35) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:595) at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:239) at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:217) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:142) at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:607) ... 10 more A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details: Minecraft Version: 1.10.2 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_25, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 364776496 bytes (347 MB) / 936144896 bytes (892 MB) up to 7462518784 bytes (7116 MB) JVM Flags: 6 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx7G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn512M IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP 9.32 Powered by Forge 12.18.1.2044 31 mods loaded, 31 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCH mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) UCH FML{8.0.99.99} [Forge Mod Loader] (forge-1.10.2-12.18.1.2044.jar) UCH Forge{12.18.1.2044} [Minecraft Forge] (forge-1.10.2-12.18.1.2044.jar) UCH Baubles{1.2.1.0} [baubles] (Baubles-1.9.4-1.2.1.0.jar) UCH 3DManeuverGear{1.10.2-@MAJOR@.@MINOR@.@REVIS@} [3D Maneuver Gear] (3DManeuverGear-1.10.2-0.10.jar) UCH bedcraftbeyond{2.4.1} [bedCraft and Beyond] (BedCraftAndBeyond-1.10.2-2.4.1.jar) UCH chisel{MC1.9.4-0.0.6.33} [Chisel] (Chisel-MC1.9.4-0.0.6.33.jar) UCH mcmultipart{1.2.0} [MCMultiPart] (MCMultiPart-1.2.0-universal.jar) UCH chiselsandbits{11.7} [Chisels & Bits] (chiselsandbits-11.7.jar) UCH cosmeticarmorreworked{1.10.2-v1a} [CosmeticArmorReworked] (CosmeticArmorReworked-1.10.2-v1a.jar) UCH craftingtweaks{5.0.6} [Crafting Tweaks] (craftingtweaks-mc1.9.4-5.0.6.jar) UCH flatcoloredblocks{mc1.10-v4.1} [Flat Colored Blocks] (flatcoloredblocks-mc1.10-v4.1.jar) UCH inventorytweaks{1.61-58-a1fd884} [inventory Tweaks] (InventoryTweaks-1.61-58.jar) UCH JEI{3.7.8.235} [Just Enough Items] (jei_1.10.2-3.7.8.235.jar) UCH journeymap{1.10.2-5.2.4} [JourneyMap] (journeymap-1.10.2-5.2.4-unlimited.jar) UCH jeresources{0.4.6.42} [Just Enough Resources] (JustEnoughResources-1.10.2-0.4.6.42.jar) UCH mantle{1.10.2-0.10.4.jenkins163} [Mantle] (Mantle-1.10.2-0.10.4.jar) UCH Mekanism{9.1.0} [Mekanism] (Mekanism-1.10.2-9.1.0.288.jar) UCH MekanismGenerators{9.1.0} [MekanismGenerators] (MekanismGenerators-1.10.2-9.1.0.288.jar) UCH MekanismTools{9.1.0} [MekanismTools] (MekanismTools-1.10.2-9.1.0.288.jar) UCE Psi{r1.0-37} [Psi] (Psi-r1.0-37.jar) UCH randomthings{3.7.4} [Random Things] (RandomThings-MC1.10-3.7.4.jar) UCH tconstruct{1.10-2.3.3a.jenkins271} [Tinkers' Construct] (TConstruct-1.10-2.3.3a.jar) UCH valkyrienwarfare{0.7s} [Valkyrien Warfare] (Valkyrien Warfare .7s_4.jar) UCH valkyrienwarfarecombat{0.0} [Valkyrien Warfare Combat] (Valkyrien Warfare .7s_4.jar) UCH valkyrienwarfarecontrol{0.3b} [Valkyrien Warfare Control] (Valkyrien Warfare .7s_4.jar) UCH Waila{1.7.0} [Waila] (Waila-1.7.0-B3_1.9.4.jar) UCH WailaHarvestability{1.1.7} [Waila Harvestability] (WailaHarvestability-mc1.10-1.1.7.jar) UCH ICSE{1.1.0.0} [i Can See Everything] (Wawla-1.10.2-2.3.0.197.jar) UCH wawla{2.3.0.194} [What Are We Looking At] (Wawla-1.10.2-2.3.0.197.jar) UCH worldedit{6.1.3} [WorldEdit] (worldedit-forge-mc1.9.4-6.1.3-dist.jar) Loaded coremods (and transformers): LoadingPlugin (RandomThings-MC1.10-3.7.4.jar) lumien.randomthings.asm.ClassTransformer LoadingHook (Mekanism-1.10.2-9.1.0.288.jar) ValkyrienWarfareBase CoreMod (Valkyrien Warfare .7s_4.jar) ValkyrienWarfareBase.CoreMod.ValkyrienWarfareTransformer FMLPlugin (InventoryTweaks-1.61-58.jar) invtweaks.forge.asm.ContainerTransformer ValkyrienWarfareBase Mod Compatibility Hack (VW Mod Compatibility Hack.jar) ValkyrienWarfareBase.CoreMod.CompiledHack.ValkyrienWarfareTransformerHack GL info: ' Vendor: 'Intel' Version: '4.4.0 - Build 20.19.15.4360' Renderer: 'Intel(R) HD Graphics 5500' Pulsar/tconstruct loaded Pulses: - TinkerCommons (Enabled/Forced) - TinkerWorld (Enabled/Not Forced) - TinkerTools (Enabled/Not Forced) - TinkerSmeltery (Enabled/Not Forced) - TinkerGadgets (Enabled/Not Forced) - TinkerOredict (Enabled/Forced) - TinkerIntegration (Enabled/Forced) - TinkerFluids (Enabled/Forced) - TinkerMaterials (Enabled/Forced) - chiselsandbitsIntegration (Enabled/Not Forced) - craftingtweaksIntegration (Enabled/Not Forced) - WailaIntegration (Enabled/Not Forced)
  2. Hmm yeah, after adding this to my BlockHovercraftController inventory works again; only problem is now I cant use the inventory of the controller because it never opened server side @Override public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) { PhysicsWrapperEntity wrapper = ValkyrienWarfareMod.physicsManager.getObjectManagingPos(worldIn, pos); if(heldItem!=null&&heldItem.getItem() instanceof ItemSystemLinker){ return false; } if(wrapper!=null){ if(!worldIn.isRemote){ playerIn.openGui(ValkyrienWarfareControlMod.instance, ControlGUIEnum.HoverCraftController.ordinal(), worldIn, pos.getX(), pos.getY(), pos.getZ()); playerIn.openContainer = playerIn.inventoryContainer; } return true; } return false; }
  3. Oh sorry, this too public class HovercraftControllerGUIInputHandler implements IMessageHandler<HovercraftControllerGUIInputMessage, IMessage>{ @Override public IMessage onMessage(final HovercraftControllerGUIInputMessage message, final MessageContext ctx) { IThreadListener mainThread = ctx.getServerHandler().serverController; mainThread.addScheduledTask(new Runnable(){ @Override public void run(){ PhysicsWrapperEntity wrapper = ValkyrienWarfareMod.physicsManager.getObjectManagingPos(ctx.getServerHandler().playerEntity.worldObj, message.tilePos); TileEntity tileEnt = wrapper.wrapping.VKChunkCache.getTileEntity(message.tilePos); if(tileEnt!=null){ if(tileEnt instanceof TileEntityHoverController){ ((TileEntityHoverController)tileEnt).handleGUIInput(message, ctx); } }else{ System.out.println("Player: "+ctx.getServerHandler().playerEntity.getName()+" sent a broken packet"); } } }); return null; } }
  4. Well, it basically grabs some numbers from the client TileEntity and sends them to the server to update the information to what the player typed in. public class HovercraftControllerGUIInputMessage implements IMessage{ public BlockPos tilePos; public int physEntId; public double newIdealHeight; public double newStablitiyBias; public double newLinearVelocityBias; public HovercraftControllerGUIInputMessage(){} public HovercraftControllerGUIInputMessage(HovercraftControllerGUI guiIn){ tilePos = guiIn.tileEnt.getPos(); physEntId = ValkyrienWarfareMod.physicsManager.getObjectManagingPos(guiIn.mc.theWorld, tilePos).getEntityId(); try{ newIdealHeight = Double.parseDouble(guiIn.textFields.get(0).getText()); newStablitiyBias = Double.parseDouble(guiIn.textFields.get(1).getText()); newLinearVelocityBias = Double.parseDouble(guiIn.textFields.get(2).getText()); }catch(Exception e){ guiIn.updateTextFields(); } } @Override public void fromBytes(ByteBuf buf) { tilePos = new BlockPos(buf.readInt(),buf.readInt(),buf.readInt()); physEntId = buf.readInt(); newIdealHeight = buf.readDouble(); newStablitiyBias = buf.readDouble(); newLinearVelocityBias = buf.readDouble(); } @Override public void toBytes(ByteBuf buf) { buf.writeInt(tilePos.getX()); buf.writeInt(tilePos.getY()); buf.writeInt(tilePos.getZ()); buf.writeInt(physEntId); buf.writeDouble(newIdealHeight); buf.writeDouble(newStablitiyBias); buf.writeDouble(newLinearVelocityBias); } } Nothing that could affect the GUI though, all this does is move numbers around
  5. Alright, I've posted all the relevant code and I cannot possibly see a reason as to why the player loses the ability to craft after simply opening a GUI!
  6. HovercraftControllerBlock (Opens the GUI) public class BlockHovercraftController extends Block implements ITileEntityProvider{ public BlockHovercraftController(Material materialIn){ super(materialIn); } @Override public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) { PhysicsWrapperEntity wrapper = ValkyrienWarfareMod.physicsManager.getObjectManagingPos(worldIn, pos); if(heldItem!=null&&heldItem.getItem() instanceof ItemSystemLinker){ return false; } if(wrapper!=null){ if(!worldIn.isRemote){ playerIn.openGui(ValkyrienWarfareControlMod.instance, ControlGUIEnum.HoverCraftController.ordinal(), worldIn, pos.getX(), pos.getY(), pos.getZ()); } return true; } return false; } @Override public TileEntity createNewTileEntity(World worldIn, int meta){ return new TileEntityHoverController(); } } Container for the Block public class HovercraftControllerContainer extends Container{ public TileEntityHoverController tile; public HovercraftControllerContainer(){} public HovercraftControllerContainer(TileEntityHoverController tileEntity){ tile = tileEntity; } @Override public boolean canInteractWith(EntityPlayer playerIn){ return true; } @Override public void onContainerClosed(EntityPlayer playerIn) { super.onContainerClosed(playerIn); } } The GUI code for the block public class HovercraftControllerGUI extends GuiContainer{ private static ResourceLocation background = new ResourceLocation(ValkyrienWarfareControlMod.MODID.toLowerCase(), "textures/gui/ControlSystemGUI.png"); public TileEntityHoverController tileEnt; public ArrayList<GuiTextField> textFields = new ArrayList<GuiTextField>(); public HovercraftControllerGUI(EntityPlayer player,TileEntityHoverController entity){ super(player.inventoryContainer); mc = Minecraft.getMinecraft(); tileEnt = entity; } public void updateTextFields(){ textFields.get(0).setText(tileEnt.idealHeight+""); //TOP textFields.get(1).setText(Math.round(tileEnt.stabilityBias*100D)/100D+""); //MID textFields.get(2).setText(tileEnt.linearVelocityBias+""); //BOT } @Override protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException{ // super.mouseClicked(mouseX,mouseY,mouseButton); boolean prevFocused = false; boolean postFocused = false; for(GuiTextField text:textFields){ prevFocused = text.isFocused()||prevFocused; text.mouseClicked(mouseX, mouseY, mouseButton); postFocused = text.isFocused()||postFocused; } if(prevFocused&&!postFocused){ updateServer(); } } public void updateServer(){ if(tileEnt==null){ return; } HovercraftControllerGUIInputMessage toSend = new HovercraftControllerGUIInputMessage(this); ValkyrienWarfareControlMod.controlNetwork.sendToServer(toSend); } @Override protected void keyTyped(char typedChar, int keyCode) throws IOException{ boolean typed = false; for(GuiTextField text:textFields){ typed = typed||text.textboxKeyTyped(typedChar, keyCode); } if(!typed){ updateServer(); super.keyTyped(typedChar, keyCode); } } @Override public void updateScreen() { super.updateScreen(); for(GuiTextField text:textFields){ text.updateCursorCounter(); } } @Override public void initGui(){ textFields.clear(); int fieldWidth = 40; int fieldHeight = 20; GuiTextField top = new GuiTextField(0, fontRendererObj,(width-fieldWidth)/2-59, (height-fieldHeight)/2-77, fieldWidth, fieldHeight); GuiTextField mid = new GuiTextField(0, fontRendererObj,(width-fieldWidth)/2-59, (height-fieldHeight)/2-49, fieldWidth, fieldHeight); GuiTextField bot = new GuiTextField(0, fontRendererObj,(width-fieldWidth)/2-59, (height-fieldHeight)/2-20, fieldWidth, fieldHeight); top.setEnableBackgroundDrawing(false); mid.setEnableBackgroundDrawing(false); bot.setEnableBackgroundDrawing(false); textFields.add(top); textFields.add(mid); textFields.add(bot); updateTextFields(); // buttonList.add(new GuiButton(1, width/2-100, height/2-24, "Bastard button")); } @Override public void onGuiClosed(){ updateServer(); super.onGuiClosed(); // Keyboard.enableRepeatEvents(false); // this.inventorySlots.removeCraftingFromCrafters(this); } @Override public void drawScreen(int par1, int par2, float par3){ // super.drawScreen(par1, par2, par3); // drawBackground(par1); drawGuiContainerBackgroundLayer(par3,par1,par2); for (int i = 0; i < this.buttonList.size(); ++i) { ((GuiButton)this.buttonList.get(i)).drawButton(this.mc, par1, par2); } for (int j = 0; j < this.labelList.size(); ++j) { ((GuiLabel)this.labelList.get(j)).drawLabel(this.mc, par1, par2); } for(GuiTextField text:textFields){ text.drawTextBox(); } } @Override public boolean doesGuiPauseGame(){ return false; } @Override protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) { // GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.getTextureManager().bindTexture(background); int textureX = 7; int textureY = 7; int textureWidth = 239; int textureHeight = 232; drawTexturedModalRect((width-textureWidth)/2, (height-textureHeight)/2, textureX, textureY, textureWidth, textureHeight); } @Override public void drawBackground(int tint) { GlStateManager.disableLighting(); GlStateManager.disableFog(); Tessellator tessellator = Tessellator.getInstance(); VertexBuffer worldrenderer = tessellator.getBuffer(); this.mc.getTextureManager().bindTexture(background); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); float f = 32.0F; worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR); worldrenderer.pos(0.0D, (double)this.height, 0.0D).tex(0.0D, (double)((float)this.height / 32.0F + (float)tint)).color(64, 64, 64, 255).endVertex(); worldrenderer.pos((double)this.width, (double)this.height, 0.0D).tex((double)((float)this.width / 32.0F), (double)((float)this.height / 32.0F + (float)tint)).color(64, 64, 64, 255).endVertex(); worldrenderer.pos((double)this.width, 0.0D, 0.0D).tex((double)((float)this.width / 32.0F), (double)tint).color(64, 64, 64, 255).endVertex(); worldrenderer.pos(0.0D, 0.0D, 0.0D).tex(0.0D, (double)tint).color(64, 64, 64, 255).endVertex(); tessellator.draw(); } } And the GUIHandler public class ControlGUIHandler implements IGuiHandler{ @Override public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { if(ID == ControlGUIEnum.HoverCraftController.ordinal()){ TileEntity tileEnt = world.getTileEntity(new BlockPos(x,y,z)); if(!(tileEnt instanceof TileEntityHoverController)){ return null; } TileEntityHoverController tile = (TileEntityHoverController) tileEnt; ((EntityPlayerMP)player).connection.sendPacket(tile.getUpdatePacket()); return new HovercraftControllerContainer(tile); } return null; } @Override public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { if(ID == ControlGUIEnum.HoverCraftController.ordinal()){ return new HovercraftControllerGUI(player,(TileEntityHoverController) world.getTileEntity(new BlockPos(x,y,z))); } return null; } } Also the TileEntityHoverController public class TileEntityHoverController extends TileEntity{ public ArrayList<BlockPos> enginePositions = new ArrayList<BlockPos>(); public double idealHeight = 16D; public double stabilityBias = .3D; public double linearVelocityBias = 1D; public double angularVelocityBias = 20D; public Vector normalVector = new Vector(0D,1D,0D); public double angularConstant = 100000000D; public double linearConstant = 1000000D; public boolean autoStabalizerControl = true; public TileEntityHoverController(){ // validate(); } /* * Returns the Force Vector the engine will send to the Physics Engine */ public Vector getForceForEngine(AntiGravEngineTileEntity engine,World world, BlockPos enginePos, IBlockState state, PhysicsObject physObj, double secondsToApply){ // physObj.physicsProcessor.convertTorqueToVelocity(); // secondsToApply*=5D; // idealHeight = 100D; if(autoStabalizerControl){ setAutoStabilizationValue(physObj); } double linearDist = -getControllerDistFromIdealY(physObj); double angularDist = -getEngineDistFromIdealAngular(enginePos,physObj,secondsToApply); engine.angularThrust.Y -= (angularConstant*secondsToApply)*angularDist; engine.linearThrust.Y -= (linearConstant*secondsToApply)*linearDist; engine.angularThrust.Y = Math.max(engine.angularThrust.Y, 0D); engine.linearThrust.Y = Math.max(engine.linearThrust.Y, 0D); engine.angularThrust.Y = Math.min(engine.angularThrust.Y, engine.maxThrust*stabilityBias); engine.linearThrust.Y = Math.min(engine.linearThrust.Y, engine.maxThrust*(1D-stabilityBias)); Vector aggregateForce = engine.linearThrust.getAddition(engine.angularThrust); aggregateForce.multiply(secondsToApply); // System.out.println(aggregateForce); return aggregateForce; } public double getEngineDistFromIdealAngular(BlockPos enginePos,PhysicsObject physObj,double secondsToApply){ Vector controllerPos = new Vector(pos.getX()+.5D,pos.getY()+.5D,pos.getZ()+.5D); Vector enginePosVec = new Vector(enginePos.getX()+.5D,enginePos.getY()+.5D,enginePos.getZ()+.5D); controllerPos.subtract(physObj.physicsProcessor.centerOfMass); enginePosVec.subtract(physObj.physicsProcessor.centerOfMass); Vector unOrientedPosDif = new Vector(enginePosVec.X-controllerPos.X,enginePosVec.Y-controllerPos.Y,enginePosVec.Z-controllerPos.Z); double idealYDif = unOrientedPosDif.dot(normalVector); RotationMatrices.doRotationOnly(physObj.coordTransform.lToWRotation, controllerPos); RotationMatrices.doRotationOnly(physObj.coordTransform.lToWRotation, enginePosVec); double inWorldYDif = enginePosVec.Y-controllerPos.Y; Vector angularVelocityAtPoint = physObj.physicsProcessor.angularVelocity.cross(enginePosVec); angularVelocityAtPoint.multiply(secondsToApply); return idealYDif-(inWorldYDif+angularVelocityAtPoint.Y*angularVelocityBias); } public double getControllerDistFromIdealY(PhysicsObject physObj){ Vector controllerPos = new Vector(pos.getX()+.5D,pos.getY()+.5D,pos.getZ()+.5D); physObj.coordTransform.fromLocalToGlobal(controllerPos); return idealHeight-(controllerPos.Y+(physObj.physicsProcessor.linearMomentum.Y*physObj.physicsProcessor.invMass*linearVelocityBias)); } public void handleGUIInput(HovercraftControllerGUIInputMessage message, MessageContext ctx){ idealHeight = message.newIdealHeight; if(message.newStablitiyBias<0||message.newStablitiyBias>1D){ //Out of bounds, set to auto autoStabalizerControl = true; }else{ double stabilityDif = Math.abs(stabilityBias-message.newStablitiyBias); // if(stabilityDif>.05D){ stabilityBias = message.newStablitiyBias; autoStabalizerControl = false; // } } linearVelocityBias = message.newLinearVelocityBias; markDirty(); } private void setAutoStabilizationValue(PhysicsObject physObj){ // double epsilon = 5D; // double biasChange = .00005D; // // Vector controllerPos = new Vector(pos.getX()+.5D,pos.getY()+.5D,pos.getZ()+.5D); // physObj.coordTransform.fromLocalToGlobal(controllerPos); // // double controllerDist = idealHeight-controllerPos.Y; // // double yVelocity = physObj.physicsProcessor.linearMomentum.Y*physObj.physicsProcessor.invMass*linearVelocityBias; // // if(Math.abs(controllerDist)>epsilon){ // if(Math.signum(controllerDist)!=Math.signum(yVelocity)){ // stabilityBias+=(biasChange*controllerDist); // }else{ // stabilityBias-=(biasChange*controllerDist); // } // } // //Limit bias to between 0 and 1 // stabilityBias = Math.max(Math.min(stabilityBias, 1D), 0D); } @Override public SPacketUpdateTileEntity getUpdatePacket() { SPacketUpdateTileEntity packet = new SPacketUpdateTileEntity(pos,0,writeToNBT(new NBTTagCompound())); return packet; } @Override public void onDataPacket(net.minecraft.network.NetworkManager net, net.minecraft.network.play.server.SPacketUpdateTileEntity pkt) { readFromNBT(pkt.getNbtCompound()); } @Override public void readFromNBT(NBTTagCompound compound){ enginePositions = NBTUtils.readBlockPosArrayListFromNBT("enginePositions", compound); normalVector = NBTUtils.readVectorFromNBT("normalVector", compound); if(normalVector.isZero()){ normalVector = new Vector(0,1,0); } idealHeight = compound.getDouble("idealHeight"); stabilityBias = compound.getDouble("stabilityBias"); linearVelocityBias = compound.getDouble("linearVelocityBias"); angularVelocityBias = compound.getDouble("angularVelocityBias"); autoStabalizerControl = compound.getBoolean("autoStabalizerControl"); super.readFromNBT(compound); } @Override public NBTTagCompound writeToNBT(NBTTagCompound compound){ NBTUtils.writeBlockPosArrayListToNBT("enginePositions", enginePositions, compound); NBTUtils.writeVectorToNBT("normalVector", normalVector, compound); compound.setDouble("idealHeight", idealHeight); compound.setDouble("stabilityBias", stabilityBias); compound.setDouble("linearVelocityBias", linearVelocityBias); compound.setDouble("angularVelocityBias", angularVelocityBias); compound.setBoolean("autoStabalizerControl", autoStabalizerControl); return super.writeToNBT(compound); } }
  7. Believe me as I've been stupid enough to try this; DO NOT REPLACE THE ENTITYRENDERER! You'll break Optifine, you'll break shaders, you'll need to rewrite all your code with every update; just dont do it. Changing the EntityRenderer.updateLightmap() is extremely basic using an ASM system, or a Forge Hook if you get one. I'd much rather look into both than making that mistake again
  8. I cant seem to get a solution for this, but every time I open my custom container; my ability to craft in the 2x2 completely disappears, and I have to relog into the world just to fix this. Help?
  9. Nvm, I fixed this by @Overriding the getLowestRiderEntity() method to return null for my cannon entity; you'd think the damn code would be more intuitive than that!
  10. Im trying to make a cannon entity that can be mounted, which upon right click fires cannonballs. The problem is that the processInitialInteract() method (Or any interaction method for that matter) won't get called once the player is already riding that entity. Help?
  11. All the tutorials refer to a method called .setTextureName() which doesnt exist in 1.10! Help?
  12. I used to use this to allow the player to open containers that were further away than the normal range Minecraft allowed them to be opened. This worked in 1.8 and 1.9, but in 1.10 the chest instantly closes now when I use this. Help?
  13. So I've never really worked with Items in Minecraft before, and I'm pretty confused. I want to make an item where I right click on a Controller block and then right click on all the blocks the Controller will operate. This would require somehow storing a BlockPos in the item; and I'm not even sure if items get their own instances (like TileEntities), or if they're just designed to handle logic (like Blocks). Anyway, whats the simplest way I can do this?
  14. The ASM of the mod Im making involves replacing all calls to a certain method in Minecraft, and my current method seems to be working fine with all other classes; except for the Minecraft class itself! Most recently this occurred when replacing the getMouseOver() method in the EntityRenderer class, resulting in this strange sequence of errors; (See BlockPos player is looking at is Millions!!! of blocks away from the player, and I opened a chest through a solid block) The bug is hard to notice at first, but basically whats happening is I can open a chest through the seemingly solid spruce plank. Whats causing this is the getMouseOver(F) method is called every MinecraftTick along with every RenderTick; and the game uses the info from the MinecraftTick to process interacting with the world, but the RenderTick is responsible for showing the info on the screen. The RenderTick call got transformed, but not the MinecraftTick; resulting in the me opening a chest through a solid block of wood. This problem doesnt occur in the MDK for Minecraft, which leads me to believe this is either a bug; or that I've made some fundamental error in the construction of this coremod. As far as I can tell this means for some reason no ASM transforms can occur on the Minecraft class outside of the MDK. To test this I purposely crashed the game after the transformer ran through the MC class if(callingGetMouseOver){ runTransformer("getMouseOver",m_className,calledOwner); if(m_className.equals(MinecraftName){ System.out.println(MinecraftName); System.out.println(m_className); int i = 10; i/=0; } } This crash logged me [05:16:12] [main/INFO] [sTDOUT]: [ValkyrienWarfareBase.CoreMod.TransformAdapter:runTransformer:93]: bcd [05:16:12] [main/INFO] [sTDOUT]: [ValkyrienWarfareBase.CoreMod.TransformAdapter:runTransformer:94]: bcd [05:16:12] [main/ERROR] [LaunchWrapper]: Unable to launch java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_25] at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_25] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] Caused by: java.lang.NoSuchMethodError: net.minecraft.client.Minecraft.func_71386_F()J at net.minecraft.client.main.Main.main(SourceFile:39) ~[Main.class:?] ... 6 more Exception in thread "main" [05:16:12] [main/INFO] [sTDERR]: [java.lang.ThreadGroup:uncaughtException:1052]: net.minecraftforge.fml.relauncher.FMLSecurityManager$ExitTrappedException [05:16:12] [main/INFO] [sTDERR]: [java.lang.ThreadGroup:uncaughtException:1052]: at net.minecraftforge.fml.relauncher.FMLSecurityManager.checkPermission(FMLSecurityManager.java:30) [05:16:12] [main/INFO] [sTDERR]: [java.lang.ThreadGroup:uncaughtException:1052]: at java.lang.SecurityManager.checkExit(SecurityManager.java:761) [05:16:12] [main/INFO] [sTDERR]: [java.lang.ThreadGroup:uncaughtException:1052]: at java.lang.Runtime.exit(Runtime.java:107) [05:16:12] [main/INFO] [sTDERR]: [java.lang.ThreadGroup:uncaughtException:1052]: at java.lang.System.exit(System.java:968) [05:16:12] [main/INFO] [sTDERR]: [java.lang.ThreadGroup:uncaughtException:1052]: at net.minecraft.launchwrapper.Launch.launch(Launch.java:138) [05:16:12] [main/INFO] [sTDERR]: [java.lang.ThreadGroup:uncaughtException:1052]: at net.minecraft.launchwrapper.Launch.main(Launch.java:28) So that proves that the Minecraft class was indeed run through the transformer, and the getMouseOver() in the Minecraft class was detected resulting in the crash. However as shown in the photo above, the transform didn't actually modify the Minecraft class despite running the same ASM transforms that work on every other class of the game NOTE: This doesn't occur in the MDK Version of Minecraft, only outside of the dev environment does this issue occur I'm not sure if this is a bug or a feature, if anyone wants to clear this up some insight would be greatly appreciated!
  15. And how do I do that? I already made the models using sketchup; is there a way I could import them in a different modeling program to fix it? (Edit): Also, how would I fix it?
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.