Skip to content

Instantly share code, notes, and snippets.

Henry Jang hjongh

View GitHub Profile
View error
Unable to load class 'org.gradle.api.tasks.TaskProvider'.
Possible causes for this unexpected error include:<ul><li>Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)</li><li>The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)</li><li>Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.</li></ul>In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
View hello.txt
com.mojang.authlib.exceptions.AuthenticationException: The client has sent too many requests within a certain amount of time
at com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService.makeRequest(YggdrasilAuthenticationService.java:65) ~[YggdrasilAuthenticationService.class:?]
at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillGameProfile(YggdrasilMinecraftSessionService.java:175) [YggdrasilMinecraftSessionService.class:?]
at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:59) [YggdrasilMinecraftSessionService$1.class:?]
at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:56) [YggdrasilMinecraftSessionService$1.class:?]
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3524) [guava-17.0.jar:?]
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2317) [guava-17.0.jar:?]
at com.google.common.cache.LocalCache$Segm
View main.java
@Mod(modid = Main.MODID, name = Main.MODNAME, version = Main.VERSION)
public class Main {
public static final String MODID = "skywarsstats";
public static final String MODNAME = "SkywarsStats";
public static final String VERSION = "1.0.0";
@SidedProxy(clientSide="com.hjongh.skywarsstats.ClientProxy", serverSide="com.hjongh.skywarsstats.ServerProxy")
public static CommonProxy proxy;
View eventhandlerclass.java
public class KDIncrement {
SkywarsStats stats;
public KDIncrement(SkywarsStats stat)
{
stats = stat;
}
@SubscribeEvent
View eventhandlerr.java
public class KDIncrement {
SkywarsStats stats;
public KDIncrement(SkywarsStats stat)
{
stats = stat;
}
@SubscribeEvent
View eventhandlerr.java
public class KDIncrement {
SkywarsStats stats;
public KDIncrement(SkywarsStats stat)
{
stats = stat;
}
@SubscribeEvent
View eventhandler.java
@SubscribeEvent
public void eventHandler(LivingDeathEvent event)
{
if (event.entity instanceof EntityPlayer)
{
if (event.entity.getName().equals(Minecraft.getMinecraft().thePlayer.getName()))
stats.incrementDeaths();
else if (event.source.getSourceOfDamage().getName().equals(Minecraft.getMinecraft().thePlayer.getName()))
stats.incrementKills();
}
View build.gradle
// For those who want the bleeding edge
buildscript {
repositories {
jcenter()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
}
View hitboxrender.java
public class HitboxRenderTools {
public static void drawOutlinedBoundingBox(AxisAlignedBB aa) {
Tessellator tessellator = Tessellator.getInstance();
WorldRenderer wr = tessellator.getWorldRenderer();
wr.begin(2, DefaultVertexFormats.POSITION);
wr.pos(aa.minX, aa.minY, aa.minZ).endVertex();
wr.pos(aa.maxX, aa.minY, aa.minZ).endVertex();
wr.pos(aa.maxX, aa.minY, aa.maxZ).endVertex();
View ArrowHitbox4.java
public class ArrowHitboxes {
@SubscribeEvent
public void worldUpdate(RenderWorldLastEvent e) throws IllegalArgumentException, IllegalAccessException {
for(Object o : Minecraft.getMinecraft().theWorld.loadedEntityList) {
if(o instanceof EntityArrow) {
EntityArrow obj = (EntityArrow) o;
boolean arrow = (Boolean) Main.inGround.get(obj);
You can’t perform that action at this time.