This commit is contained in:
parent
f16a9180b3
commit
471da14bab
5 changed files with 9 additions and 10 deletions
|
@ -100,8 +100,8 @@ configurations {
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// Cosmic Reach jar
|
// Cosmic Reach jar
|
||||||
cosmicreach "finalforeach:cosmicreach:${cosmic_reach_version}:pre-alpha"
|
cosmicreach "finalforeach:cosmicreach:${cosmic_reach_version}:${cosmic_reach_rev}"
|
||||||
cosmicreachServer "finalforeach:cosmicreach-server:${cosmic_reach_server_version? cosmic_reach_server_version: cosmic_reach_version}:pre-alpha"
|
cosmicreachServer "finalforeach:cosmicreach-server:${cosmic_reach_server_version? cosmic_reach_server_version: cosmic_reach_version}:${cosmic_reach_rev}"
|
||||||
|
|
||||||
// Cosmic Quilt
|
// Cosmic Quilt
|
||||||
internal "org.codeberg.CRModders:cosmic-quilt:${cosmic_quilt_version}"
|
internal "org.codeberg.CRModders:cosmic-quilt:${cosmic_quilt_version}"
|
||||||
|
|
|
@ -4,14 +4,15 @@ org.gradle.parallel=true
|
||||||
org.gradle.caching=false
|
org.gradle.caching=false
|
||||||
|
|
||||||
# Project Info
|
# Project Info
|
||||||
version=1.0.7
|
version=1.0.8
|
||||||
group=net.pietru
|
group=net.pietru
|
||||||
id=cookie_utils
|
id=cookie_utils
|
||||||
|
|
||||||
# Dependency Versions
|
# Dependency Versions
|
||||||
cosmic_reach_version=0.3.27
|
cosmic_reach_rev=alpha
|
||||||
|
cosmic_reach_version=0.4.0
|
||||||
# If unspecified, will use the version above
|
# If unspecified, will use the version above
|
||||||
cosmic_reach_server_version=0.3.27
|
cosmic_reach_server_version=0.4.0
|
||||||
cosmic_quilt_version=2.3.1
|
cosmic_quilt_version=2.3.1
|
||||||
#2.2.0
|
#2.2.0
|
||||||
|
|
||||||
|
|
|
@ -26,8 +26,6 @@ import static net.pietru.cookie_utils.api.Region.is_not_reloading;
|
||||||
|
|
||||||
@Mixin(PlaceBlockPacket.class)
|
@Mixin(PlaceBlockPacket.class)
|
||||||
public class BlockPlaceMixin {
|
public class BlockPlaceMixin {
|
||||||
@Shadow
|
|
||||||
Zone zone;
|
|
||||||
@Shadow
|
@Shadow
|
||||||
BlockPosition blockPos;
|
BlockPosition blockPos;
|
||||||
@Shadow
|
@Shadow
|
||||||
|
|
|
@ -21,13 +21,13 @@ public class PlayerEntityMixin extends EntityMixin{
|
||||||
@Inject(method = "onAttackInteraction", at = @At("HEAD"), cancellable = true)
|
@Inject(method = "onAttackInteraction", at = @At("HEAD"), cancellable = true)
|
||||||
private void event_player_attack(CallbackInfo ci, @Local Entity sourceEntity){
|
private void event_player_attack(CallbackInfo ci, @Local Entity sourceEntity){
|
||||||
if (sourceEntity instanceof PlayerEntity){
|
if (sourceEntity instanceof PlayerEntity){
|
||||||
Account account = ((PlayerEntity) sourceEntity).player.getAccount();
|
Account account = ((PlayerEntity) sourceEntity).getPlayer().getAccount();
|
||||||
|
|
||||||
if (!Permissions.has_user_special_perm(account.getUniqueId()) && !can_enter_position(sourceEntity.getPosition(),"pvp",account.getUniqueId())) {
|
if (!Permissions.has_user_special_perm(account.getUniqueId()) && !can_enter_position(sourceEntity.getPosition(),"pvp",account.getUniqueId())) {
|
||||||
ci.cancel();
|
ci.cancel();
|
||||||
|
|
||||||
MessagePacket packet = new MessagePacket("[Server] " + (is_not_reloading ? "Sorry, but you can't attack people here." : "Sorry but you can't do this action right now. [Config Reload In Progress]"));
|
MessagePacket packet = new MessagePacket("[Server] " + (is_not_reloading ? "Sorry, but you can't attack people here." : "Sorry but you can't do this action right now. [Config Reload In Progress]"));
|
||||||
packet.setupAndSend(ServerSingletons.getConnection(((PlayerEntity) sourceEntity).player));
|
packet.setupAndSend(ServerSingletons.getConnection(((PlayerEntity) sourceEntity).getPlayer()));
|
||||||
}
|
}
|
||||||
} else if (sourceEntity instanceof EntityLaserProjectile) {
|
} else if (sourceEntity instanceof EntityLaserProjectile) {
|
||||||
if (!can_enter_position(sourceEntity.getPosition(),"laser_damage",this.zone)){
|
if (!can_enter_position(sourceEntity.getPosition(),"laser_damage",this.zone)){
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "cosmic_reach",
|
"id": "cosmic_reach",
|
||||||
"versions": ">=0.3.26"
|
"versions": ">=0.4.0"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue