Skip to content

Commit

Permalink
Update 1.11.1
Browse files Browse the repository at this point in the history
  • Loading branch information
gecolay committed Nov 6, 2024
1 parent c9848dd commit ba5402d
Show file tree
Hide file tree
Showing 33 changed files with 98 additions and 33 deletions.
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>dev.geco.gsit</groupId>
<artifactId>GSit</artifactId>
<version>1.11.0</version>
<version>1.11.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>dev.geco.gsit</groupId>
<artifactId>GSit</artifactId>
<version>1.11.0</version>
<version>1.11.1</version>
</parent>

<build>
Expand Down
2 changes: 1 addition & 1 deletion mcv1_17/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>dev.geco.gsit</groupId>
<artifactId>GSit</artifactId>
<version>1.11.0</version>
<version>1.11.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion mcv1_17_1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>dev.geco.gsit</groupId>
<artifactId>GSit</artifactId>
<version>1.11.0</version>
<version>1.11.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion mcv1_18/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>dev.geco.gsit</groupId>
<artifactId>GSit</artifactId>
<version>1.11.0</version>
<version>1.11.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion mcv1_18_2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>dev.geco.gsit</groupId>
<artifactId>GSit</artifactId>
<version>1.11.0</version>
<version>1.11.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion mcv1_19/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>dev.geco.gsit</groupId>
<artifactId>GSit</artifactId>
<version>1.11.0</version>
<version>1.11.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion mcv1_19_1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>dev.geco.gsit</groupId>
<artifactId>GSit</artifactId>
<version>1.11.0</version>
<version>1.11.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion mcv1_19_3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>dev.geco.gsit</groupId>
<artifactId>GSit</artifactId>
<version>1.11.0</version>
<version>1.11.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion mcv1_19_4/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>dev.geco.gsit</groupId>
<artifactId>GSit</artifactId>
<version>1.11.0</version>
<version>1.11.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion mcv1_20/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>dev.geco.gsit</groupId>
<artifactId>GSit</artifactId>
<version>1.11.0</version>
<version>1.11.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion mcv1_20_2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>dev.geco.gsit</groupId>
<artifactId>GSit</artifactId>
<version>1.11.0</version>
<version>1.11.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion mcv1_20_3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>dev.geco.gsit</groupId>
<artifactId>GSit</artifactId>
<version>1.11.0</version>
<version>1.11.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion mcv1_20_5/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>dev.geco.gsit</groupId>
<artifactId>GSit</artifactId>
<version>1.11.0</version>
<version>1.11.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion mcv1_21/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>dev.geco.gsit</groupId>
<artifactId>GSit</artifactId>
<version>1.11.0</version>
<version>1.11.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion mcv1_21_2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>dev.geco.gsit</groupId>
<artifactId>GSit</artifactId>
<version>1.11.0</version>
<version>1.11.1</version>
</parent>

<properties>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
package dev.geco.gsit.mcv.x.objects;

import java.lang.reflect.*;
import java.util.*;

import com.google.common.collect.*;

import org.bukkit.*;
import org.bukkit.craftbukkit.v1_21_R2.*;

import net.minecraft.advancements.*;
import net.minecraft.server.level.*;
import net.minecraft.world.entity.*;

public class PlayerSeatEntity extends AreaEffectCloud {

private final Field vehicle;

public PlayerSeatEntity(Location Location) {

super(((CraftWorld) Location.getWorld()).getHandle(), Location.getX(), Location.getY(), Location.getZ());

persist = false;

setRadius(0);
setNoGravity(true);
setInvulnerable(true);
setDuration(Integer.MAX_VALUE);
setWaitTime(0);
addTag("GSit_PlayerSeatEntity");

List<Field> vehicleList = new ArrayList<>();
for(Field field : Entity.class.getDeclaredFields()) if(field.getType().equals(Entity.class)) vehicleList.add(field);
vehicle = vehicleList.getFirst();
vehicle.setAccessible(true);
}

public void tick() { }

protected void handlePortal() { }

public boolean dismountsUnderwater() { return false; }

public void setVehicle(Entity Vehicle) {

try {
vehicle.set(this, Vehicle);
} catch (Throwable ignored) { }

if(Vehicle.passengers.isEmpty()) {
Vehicle.passengers = ImmutableList.of(this);
} else {
List<Entity> list = Lists.newArrayList(Vehicle.passengers);
list.add(this);
Vehicle.passengers = ImmutableList.copyOf(list);
}

Vehicle.gameEvent(net.minecraft.world.level.gameevent.GameEvent.ENTITY_MOUNT, this);

Vehicle.passengers.stream().flatMap(Entity::getSelfAndPassengers).filter((e) -> e instanceof ServerPlayer).forEach((e) -> {
CriteriaTriggers.START_RIDING_TRIGGER.trigger((ServerPlayer) e);
});
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ public UUID createPlayerSeatEntity(Entity Holder, Entity Rider) {

for(int entityCount = 1; entityCount <= maxEntities; entityCount++) {

net.minecraft.world.entity.Entity playerSeatEntity = new PlayerSeatEntity(Holder.getLocation());
PlayerSeatEntity playerSeatEntity = new PlayerSeatEntity(Holder.getLocation());

playerSeatEntity.startRiding(lastEntity, true);
playerSeatEntity.setVehicle(lastEntity);

if(entityCount == maxEntities) ((CraftEntity) Rider).getHandle().startRiding(playerSeatEntity, true);

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>dev.geco.gsit</groupId>
<artifactId>GSit</artifactId>
<name>GSit</name>
<version>1.11.0</version>
<version>1.11.1</version>
<description>Relax with other players on nice seats!</description>
<url>https://www.spigotmc.org/resources/62325</url>
<inceptionYear>2018</inceptionYear>
Expand Down
2 changes: 1 addition & 1 deletion v1_17/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>dev.geco.gsit</groupId>
<artifactId>GSit</artifactId>
<version>1.11.0</version>
<version>1.11.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion v1_17_1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>dev.geco.gsit</groupId>
<artifactId>GSit</artifactId>
<version>1.11.0</version>
<version>1.11.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion v1_18/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>dev.geco.gsit</groupId>
<artifactId>GSit</artifactId>
<version>1.11.0</version>
<version>1.11.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion v1_18_2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>dev.geco.gsit</groupId>
<artifactId>GSit</artifactId>
<version>1.11.0</version>
<version>1.11.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion v1_19/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>dev.geco.gsit</groupId>
<artifactId>GSit</artifactId>
<version>1.11.0</version>
<version>1.11.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion v1_19_1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>dev.geco.gsit</groupId>
<artifactId>GSit</artifactId>
<version>1.11.0</version>
<version>1.11.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion v1_19_3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>dev.geco.gsit</groupId>
<artifactId>GSit</artifactId>
<version>1.11.0</version>
<version>1.11.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion v1_19_4/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>dev.geco.gsit</groupId>
<artifactId>GSit</artifactId>
<version>1.11.0</version>
<version>1.11.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion v1_20/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>dev.geco.gsit</groupId>
<artifactId>GSit</artifactId>
<version>1.11.0</version>
<version>1.11.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion v1_20_2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>dev.geco.gsit</groupId>
<artifactId>GSit</artifactId>
<version>1.11.0</version>
<version>1.11.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion v1_20_3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>dev.geco.gsit</groupId>
<artifactId>GSit</artifactId>
<version>1.11.0</version>
<version>1.11.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion v1_20_5/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>dev.geco.gsit</groupId>
<artifactId>GSit</artifactId>
<version>1.11.0</version>
<version>1.11.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion v1_21/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>dev.geco.gsit</groupId>
<artifactId>GSit</artifactId>
<version>1.11.0</version>
<version>1.11.1</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion v1_21_2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>dev.geco.gsit</groupId>
<artifactId>GSit</artifactId>
<version>1.11.0</version>
<version>1.11.1</version>
</parent>

<properties>
Expand Down

0 comments on commit ba5402d

Please sign in to comment.