-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
98 changed files
with
3,763 additions
and
2,619 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
# | ||
# SkySkipped - Hypixel Skyblock QOL mod | ||
# Copyright (C) 2023 Cephetir | ||
# | ||
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | ||
# Version 2, December 2004 | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU Affero General Public License as published | ||
# by the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# Copyright (C) 2022 Cephetir | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Affero General Public License for more details. | ||
# | ||
# Everyone is permitted to copy and distribute verbatim or modified | ||
# copies of this license document, and changing it is allowed as long | ||
# as the name is changed. | ||
# You should have received a copy of the GNU Affero General Public License | ||
# along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
# | ||
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | ||
# TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | ||
# | ||
# 0. You just DO WHAT THE FUCK YOU WANT TO. | ||
# | ||
org.gradle.jvmargs=-Xmx2G | ||
org.gradle.jvmargs=-Xmx4G | ||
org.gradle.caching=true | ||
org.gradle.parallel=true | ||
kotlin.code.style=official | ||
loom.platform=forge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.4 | ||
3.5 |
45 changes: 45 additions & 0 deletions
45
src/main/java/me/cephetir/skyskipped/mixins/MixinAbstractClientPlayer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* SkySkipped - Hypixel Skyblock QOL mod | ||
* Copyright (C) 2023 Cephetir | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published | ||
* by the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package me.cephetir.skyskipped.mixins; | ||
|
||
import com.mojang.authlib.GameProfile; | ||
import me.cephetir.skyskipped.SkySkipped; | ||
import net.minecraft.client.entity.AbstractClientPlayer; | ||
import net.minecraft.entity.player.EntityPlayer; | ||
import net.minecraft.util.ResourceLocation; | ||
import net.minecraft.world.World; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; | ||
|
||
@Mixin(AbstractClientPlayer.class) | ||
public abstract class MixinAbstractClientPlayer extends EntityPlayer { | ||
|
||
public MixinAbstractClientPlayer(World worldIn, GameProfile gameProfileIn) { | ||
super(worldIn, gameProfileIn); | ||
} | ||
|
||
@Inject(method = "getLocationCape", at = @At("HEAD"), cancellable = true) | ||
private void getLocationCape(CallbackInfoReturnable<ResourceLocation> cir) { | ||
ResourceLocation cape = SkySkipped.getCape(this.getGameProfile().getId().toString()); | ||
if (cape != null) | ||
cir.setReturnValue(cape); | ||
} | ||
} |
53 changes: 53 additions & 0 deletions
53
src/main/java/me/cephetir/skyskipped/mixins/MixinBlock.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
* SkySkipped - Hypixel Skyblock QOL mod | ||
* Copyright (C) 2023 Cephetir | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published | ||
* by the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package me.cephetir.skyskipped.mixins; | ||
|
||
import me.cephetir.bladecore.core.event.BladeEventBus; | ||
import me.cephetir.skyskipped.event.events.BlockCollisionEvent; | ||
import net.minecraft.block.Block; | ||
import net.minecraft.block.state.IBlockState; | ||
import net.minecraft.entity.Entity; | ||
import net.minecraft.util.AxisAlignedBB; | ||
import net.minecraft.util.BlockPos; | ||
import net.minecraft.world.World; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
|
||
import java.util.List; | ||
|
||
@Mixin(Block.class) | ||
public abstract class MixinBlock { | ||
@Shadow | ||
public abstract AxisAlignedBB getCollisionBoundingBox(World worldIn, BlockPos pos, IBlockState state); | ||
|
||
@Inject(method = "addCollisionBoxesToList", at = @At("HEAD"), cancellable = true) | ||
public void addCollisionBoxesToList(World worldIn, BlockPos pos, IBlockState state, AxisAlignedBB mask, List<AxisAlignedBB> list, Entity collidingEntity, CallbackInfo ci) { | ||
AxisAlignedBB box = this.getCollisionBoundingBox(worldIn, pos, state); | ||
BlockCollisionEvent event = new BlockCollisionEvent((Block) (Object) this, box, pos, collidingEntity); | ||
if (BladeEventBus.INSTANCE.post(event)) | ||
ci.cancel(); | ||
else if (event.getBoundingBox() != box) { | ||
list.add(event.getBoundingBox()); | ||
ci.cancel(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.