Jump to content

Blaez

Members
  • Posts

    23
  • Joined

  • Last visited

Posts posted by Blaez

  1. honestly for this stuff your better off keeping your old recipes. though if your trying to keep the enchantments

            ItemStack input = playerIn.getHeldItem(hand);
            ItemStack morph1 = new ItemStack(Item.getByNameOrId(this.morph), is.getCount(), is.getMetadata());
                if (is.hasTagCompound()) {
                    morph1.setTagCompound(is.getTagCompound());
                }
                if (hand == EnumHand.MAIN_HAND) {
                    playerIn.inventory.setInventorySlotContents(playerIn.inventory.currentItem, morph1);
                }}

    this might not be entirely related or the best way to handle it but if your wanting it to work with enchanted items you should have it take the nbtdata from the input item and set it to the output something similar to this. there might be better ways but I figured I'd toss this here incase its of help

  2.         if (!world.isRemote && this.data != null) {
                NBTTagCompound atag = is.getTagCompound();
                if (atag == null) atag = new NBTTagCompound();
                if (!atag.hasKey(KEY)) {
                    atag.setBoolean(KEY, true);
                    is.setTagCompound(atag);
                    try {
                        is.setTagCompound(JsonToNBT.getTagFromJson(this.data));
                        is.getTagCompound().setBoolean(KEY, true);
                    } catch (NBTException nbtexception) {
                        LogManager.getLogger(RWBYModels.MODID).error("Couldn't load data tag for " + this.getRegistryName());
                    }
                }
    
            }

    atag is the first part of this which is the current data of the item. the portion inside of try is replacing the tag compound from before while this might be all well and good.it doesn't pass along Enchantments which is why I'm curious if there's a way to merge the two data sets rather then completely override the data though I suspect that's not possible just from looking around. though there is this 

    is.getEnchantmentTagList()

    which would appear to get a retrievable list of the enchantments in the tagcompound though I'm not sure if there is a way to use that data to reapply the enchantments after the data is wiped. **please keep in mind I am not really familiar with nbt stuff so this all could be entirely wrong and I'm missing a simpler way to do this. but live and learn the reason I'm wiping the data in the first place is because the items have attribute modifiers and I don't want those passed to the new item when they transform however I'd like to keep enchantments if possible.

  3. odd, I did delete those files and refresh gradle. it seems to be working now though **after feeding in a new build.gradle file from my old 1.11.2 mod and updating the mappings and such to match the latest.. technology its strange I swear atleast its working now. thanks for that though much appreciated.

  4. Quote

    Microsoft Windows [Version 10.0.16299.371]
    (c) 2017 Microsoft Corporation. All rights reserved.

    C:\Users\Konata\Desktop\java.projects 1.12>gradlew build --stacktrace
    To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/2.14/userguide/gradle_daemon.html.
    This mapping 'snapshot_20171003' was designed for MC 1.12! Use at your own peril.
    #################################################
             ForgeGradle 2.3-SNAPSHOT-27b9d44
      https://github.com/MinecraftForge/ForgeGradle
    #################################################
                     Powered by MCP
                http://modcoderpack.com
         by: Searge, ProfMobius, R4wk, ZeuX
         Fesh0r, IngisKahn, bspkrs, LexManos
    #################################################
    Version string 'rwbym 2.1' does not match SemVer specification
    You should try SemVer : http://semver.org/
    :deobfCompileDummyTask
    :deobfProvidedDummyTask
    :sourceApiJava UP-TO-DATE
    :compileApiJava UP-TO-DATE
    :processApiResources UP-TO-DATE
    :apiClasses UP-TO-DATE
    :sourceMainJava UP-TO-DATE
    :compileJava                                                               
    C:\Users\Konata\Desktop\java.projects 1.12\build\sources\main\java\be\bluexin\rwbym\utility\Utilities.java:3: error: package be.bluexin.rwbym.network does not exist
    import be.bluexin.rwbym.network.ModNetworking;
                                   ^
    1 error
    :compileJava FAILED

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':compileJava'.
    > Compilation failed; see the compiler error output for details.

    * Try:
    Run with --info or --debug option to get more log output.

    * Exception is:
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':compileJava'.
            at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
            at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
            at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
            at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:66)
            at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
            at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
            at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
            at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
            at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
            at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
            at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
            at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
            at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
            at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25)
            at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)
            at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
            at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
            at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
            at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
            at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
            at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
            at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
            at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:153)
            at org.gradle.internal.Factories$1.create(Factories.java:22)
            at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
            at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:53)
            at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:150)
            at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
            at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:98)
            at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:92)
            at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
            at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:63)
            at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:92)
            at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:83)
            at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:99)
            at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
            at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
            at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:48)
            at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:30)
            at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:81)
            at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:46)
            at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:52)
            at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
            at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
            at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37)
            at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
            at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
            at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
            at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
            at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
            at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
            at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
            at org.gradle.util.Swapper.swap(Swapper.java:38)
            at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
            at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
            at org.gradle.launcher.daemon.server.health.DaemonHealthTracker.execute(DaemonHealthTracker.java:40)
            at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
            at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
            at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
            at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
            at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:72)
            at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
            at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
            at org.gradle.launcher.daemon.server.health.HintGCAfterBuild.execute(HintGCAfterBuild.java:41)
            at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
            at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
            at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:237)
            at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
            at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
    Caused by: org.gradle.api.internal.tasks.compile.CompilationFailedException: Compilation failed; see the compiler error output for details.
            at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:48)
            at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:33)
            at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.delegateAndHandleErrors(NormalizingJavaCompiler.java:104)
            at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:53)
            at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:38)
            at org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:35)
            at org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:25)
            at org.gradle.api.tasks.compile.JavaCompile.performCompilation(JavaCompile.java:163)
            at org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:145)
            at org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:93)
            at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
            at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.doExecute(AnnotationProcessingTaskFactory.java:245)
            at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:221)
            at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.execute(AnnotationProcessingTaskFactory.java:232)
            at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210)
            at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
            at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
            ... 68 more


    BUILD FAILED

    Total time: 22.045 secs
     

    Everything was fine until today, I'm not sure exactly what to make of this or how to fix it. though I have tried with latest versions of forgemdk aswell as the latest stable. I'm not sure entirely but I think it might be that something in MC's source is messed up. though I'm not sure if thats the case or not and if it is I'm not sure how to trigger a redownload of the files. but I'd appreciate any help, and keep in mind I understand abit about what I'm doing but I'm definitely not a expert or anything of the sort so bear with me.if the solution is abit complex.. incase it matter's I'm using Intellij/Idea

  5. Thanks for that information. it is much appreciated. I worked it out with a bit of a timer delay and have achieved the desired effect for the most part. however this currently cancels rendering of all players. is there a way to specify just one player say with a player instance? or something like that?

  6. Canceling the event does work. however as I said not entirely, It won't start rendering the player again unless you restart the game. I'm just wondering if there is a way to force the player to be rendered again after canceling the event as it doesn't seem to want to restart or render the player again on its own.

  7. I've Tried this with success however I can't re-enable the rendering event so player remains invisible aswell as being unsure if this would just target one player or if it disables all. which isn't my intent..

    @SubscribeEvent
    public void pre(RenderPlayerEvent.Pre event) {
      if (RWBYSword.runhideevent){
    	event.setCanceled(true);
      }
    }

    This has same problem as above not being able to reset the render of the player aswell as the problems of below.

        @SubscribeEvent
        public void renderPlayerPostEvent(RenderPlayerEvent.Post e) {
    
            FontRenderer fontRenderer = Minecraft.getMinecraft().fontRenderer;
            EntityPlayer player = Minecraft.getMinecraft().player;
            ModelPlayer model = (ModelPlayer) e.getRenderer().getMainModel();
    
            if (e.getEntityPlayer() != null && e.getRenderer().getMainModel() instanceof ModelPlayer) {
                if (RWBYSword.runhideevent)
                model.bipedLeftArm.isHidden =
                        model.bipedLeftArmwear.isHidden =
                        model.bipedBody.isHidden =
                                model.bipedBodyWear.isHidden =
                                        model.bipedHead.isHidden =
                                                model.bipedHeadwear.isHidden =
                                                        model.bipedRightArm.isHidden =
                                                                model.bipedRightArmwear.isHidden =
                                                                        model.bipedLeftLeg.isHidden =
                                                                                model.bipedLeftLegwear.isHidden =
                                                                                        model.bipedRightLeg.isHidden =
                                                                                                model.bipedLeftLegwear.isHidden = true;
    
            }}

    These all have similar effects ie armour and held item will still render which isn't what I'm trying to accomplish

    player.setInvisible(true);
    PotionEffect potioneff = new PotionEffect(MobEffects.INVISIBILITY, 10, 5, true, false);
    playerIn.addPotionEffect(potioneff);

    In Addition to These: Which didn't do anything, which I've put down to being deprecated as my event handler will fire the other events just fine

        @SubscribeEvent
        public void onArmorEvent(RenderPlayerEvent.SetArmorModel e) {
            if (e.getEntityPlayer() !=null) {
                if (RWBYSword.runhideevent){
                    e.setCanceled(true);
            }}
        }
    
        @SubscribeEvent public void onSpecials(RenderPlayerEvent.Specials en){
            if (en.getEntityPlayer() !=null){
                if (RWBYSword.runhideevent){
                en.setCanceled(true);
            }}
        }

     

    I'm open to any suggestions on how to get complete toggle-able invisibility of the target player as my attempts don't seem to be working.

    the effect I'd like to achieve is very similar to /vanish from bukkit or similar. any help would be appreciated.

  8. I'm Trying to apply a Similar Effect to the Code below Where by on hit of an entity the player is bounced backwards in the opposite direction the player is facing.

    Although the below code is for 1.7.2 so its not of much use as reference I figured it would help convey the point. 

    public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase)
        {
            Entity entity =  par3EntityLivingBase;
    
            Vec3 look = par3EntityLivingBase.getLookVec();
    
    
            par3EntityLivingBase.motionX = look.xCoord ;
            par3EntityLivingBase.motionZ = look.zCoord ;
            par3EntityLivingBase.motionY = look.yCoord ;
            par3EntityLivingBase.lastTickPosZ = look.xCoord;
            par3EntityLivingBase.lastTickPosX = look.zCoord;
    
    
            set_Item_State(par1ItemStack, false);
            par1ItemStack.damageItem(1, par3EntityLivingBase);
            return true;
        }
  9. @SubscribeEvent
    public void onItemCrafted(PlayerEvent.ItemCraftedEvent evt) {
        evt.player.inventory.addItemStackToInventory(new ItemStack(Blocks.DIRT, 64));
        System.out.println("random event fired");
    }

     

    This work's however, I'm wondering if there is a way to modify this to accept loot from a custom loot table. I'm not too familiar with loot table's and most of what I can find is older and for out of date versions and only handling loot chests.

    is there a simple way of doing this or if there isn't please don't strain yourself however, I'd appreciate a point in the right direction if nothing else. thanks in advance. Also yes I know this is a bad example and will fire for every item crafted however I'm trying to work out what works first.

  10. 52 minutes ago, diesieben07 said:

    Why are you using 1.11? If you must use 1.11.x, use 1.11.2. But you should really be using 1.12.1.

    What you are experiencing here is a bug that was fixed in version 1.11.2-13.20.0.2210.

    the issue is not corrected in 1.11.2-13.20.0.0.2210 it still exists as of  1.11.2 - 13.20.1.2386  Which leads me to assume its my fault although I'm not sure why. Also my Mod is not easily transferable to 1.12 as many things need to be done in regards to Recipe and Item registration which I'm not trying to deal with right now.

  11. Stacktrace:
        at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:456)
        at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2780)
        at net.minecraft.client.Minecraft.run(Minecraft.java:426)
        at net.minecraft.client.main.Main.main(Main.java:118)
        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:498)
        at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
        at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
        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:498)
        at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
        at GradleStart.main(GradleStart.java:26)

  12. I'm completely at a loss, I've changed rendering from the old depracated methods to Render Factory

    I've tried alot of different things. however I've not been able to find out the error as to why the entity beowolf refuses to render on clients connecting to the server.

     

    https://github.com/Licoifi/rwbym/tree/master/java/be/bluexin/rwbym/weaponry

     

    if someone kind would look over my code I'd appreciate it as this is my last resort before scrapping the project. ;3

     

    and by clarification by refusing to render I mean the entity will still spawn serverside and attack players but will not be killable as the hitbox will not be drawn. I'm not sure where I messed up.

     

    thanks in advance.

     

×
×
  • Create New...

Important Information

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