Jump to content

[1.4.5/6/7] keepcalm's mods - Events API, BukkitForge - Interdim TPs, Lockette!


keepcalm

Recommended Posts

  • Replies 223
  • Created
  • Last Reply

Top Posters In This Topic

Thank you for the Events API, but I can't get it to work.

 

I tried it with a fresh MC146, MCP725, Forge489 and BlockBreak source downloaded on 2012-01-15.

 

Eclipse gives a few problems in keepkalm.mods.events ForgeEventHelper.java, but it still compiles.

import org.bukkit.Bukkit;

--- remove unused import ---

 

	public static boolean onBlockDamage(ItemInWorldManager man) {

	// mcp has ridiculously long names

	if (man.curblockDamage % 2 == 1) {
		return false;
	}

	PlayerDamageBlockEvent ev = new PlayerDamageBlockEvent(man.thisPlayerMP, man.partiallyDestroyedBlockX,
			man.partiallyDestroyedBlockY, man.partiallyDestroyedBlockZ,
			man.theWorld, man.curblockDamage, man.durabilityRemainingOnBlock);

	MinecraftForge.EVENT_BUS.post(ev);

	if (ev.isCanceled()) {
		return true;
	}
	return false;

}

--- with man.xyz, change visibility of xyz to public ---

 

Without the BlockBreakNin.jar in the coremods folder, it runs, but doesn't work.

With the jar in the folder it gives a runtime error:

2013-01-16 09:49:10 [iNFO] [ForgeModLoader] Forge Mod Loader version 4.6.17.515 for Minecraft 1.4.6 loading
2013-01-16 09:49:11 [iNFO] [sTDERR] Exception in thread "main" java.lang.RuntimeException: java.lang.ExceptionInInitializerError
2013-01-16 09:49:11 [iNFO] [sTDERR] 	at cpw.mods.fml.relauncher.FMLRelauncher.setupHome(FMLRelauncher.java:175)
2013-01-16 09:49:11 [iNFO] [sTDERR] 	at cpw.mods.fml.relauncher.FMLRelauncher.relaunchServer(FMLRelauncher.java:133)
2013-01-16 09:49:11 [iNFO] [sTDERR] 	at cpw.mods.fml.relauncher.FMLRelauncher.handleServerRelaunch(FMLRelauncher.java:33)
2013-01-16 09:49:11 [iNFO] [sTDERR] 	at net.minecraft.server.MinecraftServer.main(MinecraftServer.java:1375)
2013-01-16 09:49:11 [iNFO] [sTDERR] Caused by: java.lang.ExceptionInInitializerError
2013-01-16 09:49:11 [iNFO] [sTDERR] 	at keepcalm.mods.events.asm.transformers.events.BlockEventHelpers.<init>(BlockEventHelpers.java:37)
2013-01-16 09:49:11 [iNFO] [sTDERR] 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
2013-01-16 09:49:11 [iNFO] [sTDERR] 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
2013-01-16 09:49:11 [iNFO] [sTDERR] 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
2013-01-16 09:49:11 [iNFO] [sTDERR] 	at java.lang.reflect.Constructor.newInstance(Unknown Source)
2013-01-16 09:49:11 [iNFO] [sTDERR] 	at java.lang.Class.newInstance0(Unknown Source)
2013-01-16 09:49:11 [iNFO] [sTDERR] 	at java.lang.Class.newInstance(Unknown Source)
2013-01-16 09:49:11 [iNFO] [sTDERR] 	at cpw.mods.fml.relauncher.RelaunchClassLoader.registerTransformer(RelaunchClassLoader.java:75)
2013-01-16 09:49:11 [iNFO] [sTDERR] 	at cpw.mods.fml.relauncher.RelaunchLibraryManager.handleLaunch(RelaunchLibraryManager.java:238)
2013-01-16 09:49:11 [iNFO] [sTDERR] 	at cpw.mods.fml.relauncher.FMLRelauncher.setupHome(FMLRelauncher.java:155)
2013-01-16 09:49:11 [iNFO] [sTDERR] 	... 3 more
2013-01-16 09:49:11 [iNFO] [sTDERR] Caused by: java.lang.NullPointerException
2013-01-16 09:49:11 [iNFO] [sTDERR] 	at java.util.Properties$LineReader.readLine(Unknown Source)
2013-01-16 09:49:11 [iNFO] [sTDERR] 	at java.util.Properties.load0(Unknown Source)
2013-01-16 09:49:11 [iNFO] [sTDERR] 	at java.util.Properties.load(Unknown Source)
2013-01-16 09:49:11 [iNFO] [sTDERR] 	at keepcalm.mods.events.asm.transformers.events.ObfuscationHelper.<clinit>(ObfuscationHelper.java:140)
2013-01-16 09:49:11 [iNFO] [sTDERR] 	... 13 more

Link to comment
Share on other sites

EPIC!!

 

Thanks for all your work!

 

But I have a few requests:

GreifPrevention compatibility. I works but many features broken.

http://dev.bukkit.org/server-mods/grief-prevention/

 

CoreProtect compatibility Also work but will not rollback non vanilla blocks. It detects them if they were removed but not placed.

http://dev.bukkit.org/server-mods/coreprotect/

 

And A little help. The perms load, I set them up, and I can assign groups to my players, but it does't auto assign them nor are they able to use any commands while in their groups. I have tried both PermissionsEx and GroupManager. All commands seem to work fine if you are OP.

 

Thanks again

 

Link to comment
Share on other sites

Fantastic! I'm so pleased that someone has decided to continue this challenging project. My hat goes off to you sir. Good luck facing the small mountain of bug reports turning up at Github  ;) I will contribute some of my own there shortly.

 

Godspeed you magnificent gentleman.

Link to comment
Share on other sites

Whenever I load Ptweaks it gives this error.

 

[bukkitForge] Error occurred while enabling PTweaks v6.0 (Is it up to date?)
java.lang.NoClassDefFoundError: org/bukkit/craftbukkit/v1_4_R1/CraftServer
at me.devplugin.ptweaks.AutoSaveStopper.<init>(AutoSaveStopper.java:15)
at me.devplugin.ptweaks.PerformanceTweaks.onEnable(PerformanceTweaks.java:22)
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217)
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:423)
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:381)
at keepcalm.mods.bukkit.bukkitAPI.BukkitServer.loadPlugin(BukkitServer.java:956)
at keepcalm.mods.bukkit.bukkitAPI.BukkitServer.enablePlugins(BukkitServer.java:940)
at keepcalm.mods.bukkit.bukkitAPI.BukkitServer.<init>(BukkitServer.java:277)
at keepcalm.mods.bukkit.asm.BukkitStarter.run(BukkitStarter.java:46)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.bukkit.craftbukkit.v1_4_R1.CraftServer
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:44)
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:39)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 10 more

Link to comment
Share on other sites

so far only tested the permissionsEX you added and server events (missed that little plugin...looks like i may need to submit more lines to it)

 

its working great VERY GOOD WORK!!!

 

now i just need to hunt down towny, iconomy and an old stargate plugin i used to use and ill be one VERY happy admin

Link to comment
Share on other sites

Hey KeepCalm, can i make a spotlight review on this, because everyone need to see this? I will give you the link to the video spotlight.

 

Sounds cool, thanks :)

Protip: try and find answers yourself before asking on the forum.

It's pretty likely that there is an answer.

 

Was I helpful? Give me a thank you!

 

 

width=635 height=903http://bit.ly/HZ03zy[/img]

 

 

Tired of waiting for mods to port to bukkit?

use BukkitForge! (now with a working version of WorldEdit!)

Link to comment
Share on other sites

Oh, one problem I have with bukkitforge is The latest Voxelsniper does not work. (No crash)

http://dev.bukkit.org/server-mods/voxelsniper/

 

iDisguise (No Crash)

http://dev.bukkit.org/server-mods/idisguise/

 

Factions (No Crash)

http://dev.bukkit.org/server-mods/factions/

 

Be Herobrine (Only works with Disguisecraft, which does not work as well.)(No crash)

http://dev.bukkit.org/server-mods/disguisecraft/

http://dev.bukkit.org/server-mods/be-herobrine/

 

Command Book. It works fine, but the spawnmob command is missing mob over another mob (such as spawning a creeper over a bat, or spiderJockey: skeleton over a spider. The command is this: [/spawnmob bat|creeper]

http://dev.bukkit.org/server-mods/commandbook/

 

CookieMonster (No crash)

http://dev.bukkit.org/server-mods/cookiemonster/

Link to comment
Share on other sites

In the Events API

 

A small thing:

In META-INF/MANIFEST.MF

keepcalm.mods.blockbreak.asm.BlockBreakLoadingPlugin

should be

keepcalm.mods.events.asm.BlockBreakLoadingPlugin

like it is in BlockBreakNin.jar

 

and a bigger problem (for me it is)

 

After adding mcp.properties and obf.properties to the src/minecraft folder and changing some of the variables in ItemInWorldManager.java from private to public, it works when running from Eclipse.

 

After recompile and reobfuscate, there is now the file "ir.class" in the minecraft folder.

I can add this to the coremod .jar file, but it doesn't seem to be loaded.

It gives this error when trying to break a block:

 

 

Description: Ticking entity

java.lang.IllegalAccessError: tried to access field ir.i from class keepcalm.mods.events.ForgeEventHelper
at keepcalm.mods.events.ForgeEventHelper.onBlockDamage(ForgeEventHelper.java:218)
at ir.a(ItemInWorldManager.java:142)
at iq.j_(EntityPlayerMP.java:220)
at yc.a(World.java:2295)
at in.a(WorldServer.java:647)
at yc.g(World.java:2257)
at yc.h(World.java:2103)
at in.h(WorldServer.java:516)
at net.minecraft.server.MinecraftServer.r(MinecraftServer.java:679)
at ho.r(DedicatedServer.java:270)
at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:598)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:497)
at fy.run(SourceFile:849)

 

 

 

Link to comment
Share on other sites

another bug

wormhole x-treme doesnt detect the button press needed to create a gate, even with the commands or makeing the gate the old fashioned way

http://forums.bukkit.org/threads/tp-wormhole-x-treme-multi-world-capable-stargates-moved-to-bukkitdev.23973/

 

 

for those above with issues with PermissionPEX, make sure you use the one linked on the first page, permissionsPEX works fine for me... server_events and wormhole x-treme however dont :( (hence the bug reports) if your unable to fix it for these please let me know as there the only plugins i really wanted to use :)

 

 

updated to #70, both bugs reported still exist :(

Link to comment
Share on other sites

I installed a test server with BukkitForge, Factions plugin and ComputerCraft mod.

 

Factions seems to work fine (did very little testing). A piece of land claimed by one player couldn't be destroyed or build upon by other players.

 

But if an other player made a ComputerCraft turtle, they could use that to break blocks in the protected area.

Link to comment
Share on other sites

Using #87, and PEX from here, PermissionsEx should now work, along with all the other perms plugins.

Protip: try and find answers yourself before asking on the forum.

It's pretty likely that there is an answer.

 

Was I helpful? Give me a thank you!

 

 

width=635 height=903http://bit.ly/HZ03zy[/img]

 

 

Tired of waiting for mods to port to bukkit?

use BukkitForge! (now with a working version of WorldEdit!)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements




  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • They were already updated, and just to double check I even did a cleanup and fresh update from that same page. I'm quite sure drivers are not the problem here. 
    • i tried downloading the drivers but it says no AMD graphics hardware has been detected    
    • Update your AMD/ATI drivers - get the drivers from their website - do not update via system  
    • As the title says i keep on crashing on forge 1.20.1 even without any mods downloaded, i have the latest drivers (nvidia) and vanilla minecraft works perfectly fine for me logs: https://pastebin.com/5UR01yG9
    • Hello everyone, I'm making this post to seek help for my modded block, It's a special block called FrozenBlock supposed to take the place of an old block, then after a set amount of ticks, it's supposed to revert its Block State, Entity, data... to the old block like this :  The problem I have is that the system breaks when handling multi blocks (I tried some fix but none of them worked) :  The bug I have identified is that the function "setOldBlockFields" in the item's "setFrozenBlock" function gets called once for the 1st block of multiblock getting frozen (as it should), but gets called a second time BEFORE creating the first FrozenBlock with the data of the 1st block, hence giving the same data to the two FrozenBlock :   Old Block Fields set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=head] BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@73681674 BlockEntityData : id:"minecraft:bed",x:3,y:-60,z:-6} Old Block Fields set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} Frozen Block Entity set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockPos{x=3, y=-60, z=-6} BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} Frozen Block Entity set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockPos{x=2, y=-60, z=-6} BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} here is the code inside my custom "freeze" item :    @Override     public @NotNull InteractionResult useOn(@NotNull UseOnContext pContext) {         if (!pContext.getLevel().isClientSide() && pContext.getHand() == InteractionHand.MAIN_HAND) {             BlockPos blockPos = pContext.getClickedPos();             BlockPos secondBlockPos = getMultiblockPos(blockPos, pContext.getLevel().getBlockState(blockPos));             if (secondBlockPos != null) {                 createFrozenBlock(pContext, secondBlockPos);             }             createFrozenBlock(pContext, blockPos);             return InteractionResult.SUCCESS;         }         return super.useOn(pContext);     }     public static void createFrozenBlock(UseOnContext pContext, BlockPos blockPos) {         BlockState oldState = pContext.getLevel().getBlockState(blockPos);         BlockEntity oldBlockEntity = oldState.hasBlockEntity() ? pContext.getLevel().getBlockEntity(blockPos) : null;         CompoundTag oldBlockEntityData = oldState.hasBlockEntity() ? oldBlockEntity.serializeNBT() : null;         if (oldBlockEntity != null) {             pContext.getLevel().removeBlockEntity(blockPos);         }         BlockState FrozenBlock = setFrozenBlock(oldState, oldBlockEntity, oldBlockEntityData);         pContext.getLevel().setBlockAndUpdate(blockPos, FrozenBlock);     }     public static BlockState setFrozenBlock(BlockState blockState, @Nullable BlockEntity blockEntity, @Nullable CompoundTag blockEntityData) {         BlockState FrozenBlock = BlockRegister.FROZEN_BLOCK.get().defaultBlockState();         ((FrozenBlock) FrozenBlock.getBlock()).setOldBlockFields(blockState, blockEntity, blockEntityData);         return FrozenBlock;     }  
  • Topics

×
×
  • Create New...

Important Information

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